亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? semevlib.c

?? vxwork源代碼
?? C
字號:
/* semEvLib.c - VxWorks events support for semaphores *//* Copyright 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01b,18oct01,bwa  Modified comment for options in semEvStart.() Added check for		 current task in semEvStop().01a,20sep01,bwa  written*//*DESCRIPTIONThis library is an extension to eventLib, the events library. Its purpose  is to support events for semaphores.The functions in this library are used to control registration of tasks on asemaphore. The routine semEvStart() registers a task and starts thenotification process. The function semEvStop() un-registers the task, which stops the notification mechanism.When a task is registered and the semaphore becomes available, the eventsspecified are sent to that task. However, if a semTake() is to be doneafterwards, there is no guarantee that the semaphore will still be available. INCLUDE FILES: semEvLib.hSEE ALSO: eventLib, semLib,.pG "Basic OS"*/#include "vxWorks.h"#include "taskLib.h"#include "errnoLib.h"#include "intLib.h"#include "semLib.h"#include "taskArchLib.h"#include "eventLib.h"#include "private/windLibP.h"#include "private/semLibP.h"/* prototypes (local functions) */LOCAL BOOL semEvBMIsFree (const SEM_ID semId);LOCAL BOOL semEvCIsFree  (const SEM_ID semId);/* externs */extern CLASS_ID semClassId;/* globals */FUNCPTR semEvIsFreeTbl [MAX_SEM_TYPE]  = {(FUNCPTR)semEvBMIsFree,					  (FUNCPTR)semEvBMIsFree,					  (FUNCPTR)semEvCIsFree,					  (FUNCPTR)semEvBMIsFree,					  (FUNCPTR)semInvalid,					  (FUNCPTR)semInvalid,					  (FUNCPTR)semInvalid,					  (FUNCPTR)semInvalid};/********************************************************************************* semEvLibInit - dummy lib init function, used to pull lib in kernel** NOMANUAL*/void semEvLibInit (void)    {    }/********************************************************************************* semEvStart - start event notification process for a semaphore** This routine turns on the event notification process for a given semaphore.* When the semaphore becomes available but no task is pending on it, the * events specified will be sent to the task registered by this function.* A task can overwrite its own registration without first invoking semEvStop()* or specifying the ALLOW_OVERWRITE option.** The <option> parameter is used for 3 user options:* - Specify if the events are to be sent only once or every time the semaphore * is free until semEvStop() is called. The option * .iP "EVENTS_SEND_ONCE (0x1)"* tells the semaphore to send the events one time only.* - Specify if another task can register itself while the current task is* still registered. If so, the current task registration is overwritten without* any warning. The option * .iP "EVENTS_ALLOW_OVERWRITE (0x2)"* allows subsequent registrations to overwrite the current one.* - Specify if events are to be sent at the time of the registration in the* case the semaphore is free. The option* .iP "EVENTS_SEND_IF_FREE (0x4)"* tells the registration process to send events if the semaphore is free.* If none of these options are to be used, the option* .iP "EVENTS_OPTIONS_NONE" (0x0)* has to be passed to the <options> parameter.** WARNING: This routine cannot be called from interrupt level.** RETURNS: OK on success, or ERROR.** ERRNO* .iP "S_objLib_OBJ_ID_ERROR"* The semaphore ID is invalid.* .iP "S_eventLib_ALREADY_REGISTERED"* A task is already registered on the semaphore.* .iP "S_intLib_NOT_ISR_CALLABLE"* Routine has been called from interrupt level.* .iP "S_eventLib_EVENTSEND_FAILED"* User chose to send events right away and that operation failed.* .iP "S_eventLib_ZERO_EVENTS"* User passed in a value of zero to the <events> parameter.** SEE ALSO: eventLib, semLib, semEvStop()*/STATUS semEvStart    (    SEM_ID semId,	/* semaphore on which to register events */    UINT32 events, 	/* 32 possible events to register        */    UINT8 options	/* event-related semaphore options	 */    )    {    FUNCPTR fcn; /* fcn that finds if the sem is free, passed to eventStart */    if (events == 0x0)	{	errnoSet (S_eventLib_ZERO_EVENTS);	return (ERROR);	}    if (INT_RESTRICT () != OK)	return (ERROR);    /* errno set by INT_RESTRICT() */    TASK_LOCK (); /* to prevent sem from being deleted */    if (OBJ_VERIFY(semId,semClassId) != OK)	{	TASK_UNLOCK ();	return (ERROR);    /* errno is set by OBJ_VERIFY */	}    fcn = semEvIsFreeTbl [semId->semType & SEM_TYPE_MASK];    /* TASK_UNLOCK() will be done by eventStart() */    return (eventStart ((OBJ_ID)semId, &semId->events, fcn, events, options) );    }/********************************************************************************* semEvCIsFree - verify if a counting semaphore is free** RETURNS: TRUE if semaphore is free, FALSE if not** NOTE: the semId has to be validated before calling this function since it*       doesn't validate it itself before dereferencing the pointer.** NOMANUAL*/LOCAL BOOL semEvCIsFree    (    const SEM_ID semId    )    {    if (SEMC_IS_FREE (semId))	return (TRUE);    return (FALSE);    }/********************************************************************************* semEvBMIsFree - verify if a mutex or binary semaphore is free** RETURNS: TRUE if semaphore is free, FALSE if not** NOTE: the semId has to be validated before calling this function since it*       doesn't validate it itself before dereferencing the pointer.** NOMANUAL*/LOCAL BOOL semEvBMIsFree    (    const SEM_ID semId    )    {    if (SEMBM_IS_FREE (semId))	return (TRUE);    return (FALSE);    }/********************************************************************************* semEvStop - stop event notification process for a semaphore** This routine turns off the event notification process for a given semaphore.* It thus allows another task to register itself for event notification on* that particular semaphore.* * RETURNS: OK on success, or ERROR.** ERRNO* .iP "S_objLib_OBJ_ID_ERROR"* The semaphore ID is invalid.* .iP "S_intLib_NOT_ISR_CALLABLE"* Routine has been called at interrupt level.* .iP "S_eventLib_TASK_NOT_REGISTERED"* Routine has not been called by the registered task.** SEE ALSO: eventLib, semLib, semEvStart()*/STATUS semEvStop    (    SEM_ID semId    )    {    int level;    if (INT_RESTRICT () != OK)	return (ERROR);    /*     * intLock is used instead of TASK_LOCK because it is faster (since     * TASK_UNLOCK calls intLock anyway) and the time the ints are locked is     * really short     */    level = intLock ();    if (OBJ_VERIFY (semId,semClassId) != OK)	{	intUnlock (level);	return (ERROR);    /* errno is set by OBJ_VERIFY */	}    if (semId->events.taskId != (int)taskIdCurrent)	{	intUnlock (level);	errnoSet (S_eventLib_TASK_NOT_REGISTERED);	return (ERROR);	}    semId->events.taskId = (int)NULL;    intUnlock (level);    return (OK);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品tushy高清| 欧美日韩中字一区| 亚洲美女少妇撒尿| 欧美午夜精品一区二区三区| 亚洲国产日韩一区二区| 久久免费视频色| 91麻豆国产在线观看| 亚洲午夜激情网页| 91麻豆精品国产91久久久| 韩国精品免费视频| 亚洲综合在线免费观看| 精品盗摄一区二区三区| 色婷婷综合久久久久中文| 激情综合五月婷婷| 依依成人精品视频| 国产欧美久久久精品影院| 在线91免费看| 不卡的看片网站| 亚洲大片免费看| 国产精品视频你懂的| 91精品国产美女浴室洗澡无遮挡| 成人a级免费电影| 久久成人免费电影| 亚洲成人黄色影院| 亚洲天堂精品在线观看| 亚洲精品在线免费播放| 欧美在线看片a免费观看| 国内精品不卡在线| 日韩avvvv在线播放| 亚洲视频免费在线| 国产亚洲综合色| 日韩一级免费观看| 欧美午夜视频网站| 色天天综合色天天久久| 成人动漫中文字幕| 狠狠色狠狠色合久久伊人| 亚洲免费在线电影| 中文一区一区三区高中清不卡| 日韩视频国产视频| 日韩一级视频免费观看在线| 欧美日韩国产一级| 欧美日韩中文一区| 91精品91久久久中77777| 国模无码大尺度一区二区三区| 日本女人一区二区三区| 香蕉影视欧美成人| 一卡二卡欧美日韩| 亚洲青青青在线视频| 国产精品免费aⅴ片在线观看| 2023国产精华国产精品| 欧美视频完全免费看| 99久久精品国产网站| 成人黄色电影在线| 成人开心网精品视频| 国产东北露脸精品视频| 国产一区二区精品久久| 国产乱理伦片在线观看夜一区| 久久 天天综合| 国产主播一区二区三区| 美日韩黄色大片| 日韩av中文字幕一区二区三区| 日韩国产欧美三级| 一区二区三区美女视频| 亚洲免费av网站| 亚洲尤物视频在线| 亚洲v精品v日韩v欧美v专区| 亚洲3atv精品一区二区三区| 性感美女极品91精品| 免费亚洲电影在线| 国产一区二区在线看| 韩国成人精品a∨在线观看| 国产一区二区三区免费观看| 国产福利一区二区三区| 91在线看国产| 在线免费观看日本一区| 欧美日韩一区二区三区四区| 欧美一区二区啪啪| 久久综合九色综合97婷婷| 日韩欧美在线网站| 欧美极品少妇xxxxⅹ高跟鞋| 一区二区中文视频| 亚洲电影视频在线| 精品一区二区三区免费| 极品美女销魂一区二区三区免费| 国产精品一区专区| 91久久免费观看| 日韩亚洲欧美高清| 中文字幕欧美国产| 一色屋精品亚洲香蕉网站| 亚洲综合在线第一页| 蜜臀av一区二区| 成人福利在线看| 欧美日韩黄视频| 久久精品日产第一区二区三区高清版| 国产精品不卡视频| 日韩在线播放一区二区| 国产成人超碰人人澡人人澡| 91免费在线看| 欧美成人在线直播| 亚洲色图在线视频| 伦理电影国产精品| 风流少妇一区二区| caoporm超碰国产精品| 7777精品伊人久久久大香线蕉超级流畅 | 欧美精品第1页| 久久精品视频网| 日韩精品免费专区| 暴力调教一区二区三区| 在线观看成人免费视频| 精品国产乱码久久久久久夜甘婷婷| 国产日韩v精品一区二区| 五月综合激情日本mⅴ| 懂色av一区二区三区蜜臀| 日本伦理一区二区| 国产午夜亚洲精品理论片色戒| 亚洲成av人片在www色猫咪| 成人美女视频在线观看18| 欧美一级二级三级蜜桃| 一区二区久久久| 成人做爰69片免费看网站| 欧美一区二区播放| 国产日韩精品视频一区| 蜜桃视频在线一区| 欧美日韩视频在线一区二区| 国产精品狼人久久影院观看方式| 日本不卡一区二区三区高清视频| 99精品国产热久久91蜜凸| 精品国产乱码久久久久久久| 亚洲在线一区二区三区| 激情综合色播五月| 在线视频一区二区免费| 国产精品久久久久久久久果冻传媒| 麻豆中文一区二区| 欧美美女喷水视频| 亚洲午夜一二三区视频| 99热国产精品| 国产精品剧情在线亚洲| 日本欧美一区二区| 欧美丝袜第三区| 亚洲综合网站在线观看| 99riav久久精品riav| 亚洲欧美另类图片小说| 色av成人天堂桃色av| 亚洲影院在线观看| 欧美高清激情brazzers| 亚洲国产精品天堂| 欧美一区永久视频免费观看| 老司机午夜精品| 久久久www成人免费毛片麻豆| 国产.欧美.日韩| 一区二区三区小说| 欧美精品粉嫩高潮一区二区| 麻豆国产精品一区二区三区| 久久蜜桃av一区二区天堂| 9色porny自拍视频一区二区| 亚洲精品中文在线| 91精品久久久久久久99蜜桃| 精品制服美女丁香| 欧美韩国一区二区| 色av成人天堂桃色av| 婷婷国产在线综合| www国产精品av| 99vv1com这只有精品| 日韩福利视频导航| 久久久国产精品午夜一区ai换脸| 97久久超碰国产精品| 图片区日韩欧美亚洲| 久久综合久久综合九色| 91美女精品福利| 麻豆91小视频| 国产精品毛片无遮挡高清| 欧美人与禽zozo性伦| 国产精品99久久久久久久女警| 亚洲乱码国产乱码精品精98午夜| 欧美一级一区二区| 北条麻妃一区二区三区| 日韩中文字幕麻豆| 国产欧美一区二区精品性| 91国产视频在线观看| 国产在线看一区| 亚洲一区二区三区在线看| 久久久久久久久一| 欧美日韩一级二级| 成人一区二区三区| 日韩国产精品久久久久久亚洲| 国产精品美女一区二区三区| 91精品免费观看| 91视视频在线直接观看在线看网页在线看| 日韩成人dvd| 亚洲精选视频在线| 欧美国产丝袜视频| 日韩一区二区三区视频在线 | 精品国内二区三区| 91成人免费网站| 粉嫩aⅴ一区二区三区四区五区| 亚洲18女电影在线观看| 日韩毛片精品高清免费| 久久九九久精品国产免费直播| 欧美日韩一区二区不卡| 91免费看片在线观看|