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

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

?? _pthreadlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
      {      strncpy(name, pAttr->threadAttrName, NAME_MAX - 1);      name[NAME_MAX - 1] = EOS;      }    /*     * Determine the priority. This is also based on the inheritsched     * attribute; we handled the scheduling policy inheritance above.     */    if (pAttr->threadAttrInheritsched == PTHREAD_INHERIT_SCHED)	{	taskPriorityGet(taskIdSelf(), &pMyThread->priority);	/* Convert to POSIX format */	pMyThread->priority = PX_VX_PRI_CONV (priNumMode, pMyThread->priority);	}    else	pMyThread->priority = pAttr->threadAttrSchedparam.sched_priority;    if (!(pMyThread->flags & STACK_PASSED_IN))	{	if (!(pTcb = (WIND_TCB *)taskCreat(name, 		         PX_VX_PRI_CONV(priNumMode, pMyThread->priority),			 VX_FP_TASK,			 stacksize, 			 (FUNCPTR) wrapperFunc, 			 (int)start_routine, 			 (int)arg,			 0, 0, 0, 0, 0, 0, 0, 0)))	    {	    if (pMyThread->flags & JOINABLE)		semDelete(pMyThread->exitJoinSemId);	    semDelete(pMyThread->mutexSemId);	    free(pMyThread);	    return (EAGAIN);	    }	}    else	{	/*	 * Since we have a passed in stack pointer, we need to do what	 * taskCreat() does, and put the TCB on the stack.	 */#if     (_STACK_DIR == _STACK_GROWS_DOWN)	/*	 * A portion of the very top of the stack is clobbered with a	 * FREE_BLOCK in the objFree() associated with taskDestroy().	 * There is no adverse consequence of this, and is thus not 	 * accounted for.	 *	 * Given we set the stacksize above there is no need to check that	 * there is enough room on the stack for the tcb.  There will be	 */	stackaddr = (char *) STACK_ROUND_DOWN (stackaddr +  stacksize - 					       sizeof(WIND_TCB));	pTcb = (WIND_TCB *) stackaddr;	/* 	 * We must adjust the stacksize as well.  However, because of the	 * STACK_ROUND_DOWN the cleanest way to calculate this is to compare	 * the original stack address to the new stack address.	 */	stacksize = ((UINT) stackaddr - (UINT) pAttr->threadAttrStackaddr);#else	/* _STACK_GROWS_UP */#warning "Exception stack growing up not tested"	/*	 * To protect a portion of the WIND_TCB that is clobbered with a	 * FREE_BLOCK in the objFree() associated with taskDestroy(),	 * we goose the base of tcb by 16 bytes.	 *	 * Given we set the stacksize above there is no need to check that	 * there is enough room on the stack for the tcb.  There will be	 */	pTcb = (WIND_TCB *) (stackaddr + 16);	stackaddr = (char *) STACK_ROUND_UP (stackaddr + 16 + 					      sizeof(WIND_TCB));	/* 	 * We must adjust the stacksize as well.  However, because of the	 * STACK_ROUND_UP the cleanest way to calculate this is to compare	 * the original stack address to the new stack address before 	 * subtracting from the stacksize.	 */	stacksize = (stacksize - ((UINT) stackaddr - 				  (UINT) pAttr->threadAttrStackaddr));#endif	if (taskInit(pTcb, name,		     PX_VX_PRI_CONV(priNumMode, pMyThread->priority),		     (VX_FP_TASK | VX_NO_STACK_FILL), stackaddr, stacksize,		     (FUNCPTR) wrapperFunc, (int)start_routine, (int)arg,		     0, 0, 0, 0, 0, 0, 0, 0) == ERROR)	    {	    if (pMyThread->flags & JOINABLE)		semDelete(pMyThread->exitJoinSemId);	    semDelete(pMyThread->mutexSemId);	    free(pMyThread);	    return (EAGAIN);	    }	}    pTcb->pPthread = pMyThread;    pMyThread->privateData	= NULL;    pMyThread->handlerBase	= NULL;    pMyThread->cancelstate	= PTHREAD_CANCEL_ENABLE;    pMyThread->canceltype	= PTHREAD_CANCEL_DEFERRED;    pMyThread->cancelrequest	= 0;    pMyThread->taskId		= (int)pTcb;    pMyThread->flags		|= VALID;    taskActivate((int)pTcb);    *pThread = (pthread_t)pMyThread;    return (_RETURN_PTHREAD_SUCCESS);    }/* * Section 18 - Thread Cancellation *//********************************************************************************* _pthreadSetCancelType - set cancellation type for calling thread** This is the kernel support routine for pthread_setcanceltype(). It is here* so that kernel libraries (such as the I/O system code) can make calls to it.** The public API, pthread_setcanceltype(), is simply a call to this routine.** RETURNS: On success zero; on failure a non-zero error code.** ERRNOS: EINVAL** SEE ALSO: pthread_setcanceltype(),*/int _pthreadSetCancelType    (    int type,                   /* new type             */    int *oldtype                /* old type (out)       */    )    {    internalPthread *   pThread = MY_PTHREAD;    sigset_t            set;    sigset_t *          pset    = &set;    if (!pthreadLibInited || !pThread)        return (0);#if 0    self_become_pthread();#endif    if (type != PTHREAD_CANCEL_ASYNCHRONOUS && type != PTHREAD_CANCEL_DEFERRED)        {        return (EINVAL);        }    sigemptyset(pset);    sigaddset(pset, SIGCANCEL);    sigprocmask(SIG_BLOCK, pset, NULL);    CANCEL_LOCK(pThread);     /* If the oldtype is required, save it now */     if (oldtype != NULL)        *oldtype = pThread->canceltype;     pThread->canceltype = type;     CANCEL_UNLOCK(pThread);    sigprocmask(SIG_UNBLOCK, pset, NULL);    return (0);    }/********************************************************************************* deleteHook -** Catch all for abnormally terminating pthreads, and those threads that* don't call pthread_exit to terminate.** RETURNS:** NOMANUAL*/LOCAL void deleteHook    (    WIND_TCB *pTcb    )    {    if ((pthreadDeleteTaskEntry == NULL) ||	/* not initialised */	(pTcb->pPthread == NULL))		/* task not a thread */	return;    pthreadDeleteTaskEntry (pTcb->pPthread);    }/********************************************************************************* _pthreadSemOwnerGet - return the owner of a WIND semaphore** Returns the owner task ID of a semaphore. This is only valid for mutex and* binary semaphores, but no attempt is made by the routine to check this. It is* the caller's responsibility to ensure that it is only called for correct* type of semaphore.** RETURNS: task ID of owner, NULL if not owned, or ERROR if the semaphore ID* is invalid.** SEE ALSO: _pthreadSemStateGet()** NOMANUAL*/ int _pthreadSemOwnerGet    (    SEM_ID      semId    )    {    int owner;    int level = intLock ();                     /* LOCK INTERRUPTS */     if (OBJ_VERIFY (semId, semClassId) != OK)        {        intUnlock (level);                      /* UNLOCK INTERRUPTS */        return (ERROR);        }     owner = (int) semId->semOwner;     intUnlock (level);    return owner;    } /********************************************************************************* _pthreadSemStateGet - return the state of a semaphore** Returns the state of a semaphore. This will be zero or non-zero for mutex and* binary semaphores, meaning empty/not owned and full/owned respectively. For* counting semaphores the current count will be returned.** RETURNS: current state of semaphore** SEE ALSO: _pthreadSemOwnerGet()** NOMANUAL*/ int _pthreadSemStateGet    (    SEM_ID      semId    )    {    int state;    int level = intLock ();                     /* LOCK INTERRUPTS */     if (OBJ_VERIFY (semId, semClassId) != OK)        {        intUnlock (level);                      /* UNLOCK INTERRUPTS */        return (ERROR);        }     if ((semId->semType == (UINT8) SEM_TYPE_BINARY) ||        (semId->semType == (UINT8) SEM_TYPE_MUTEX))        {        state = (semId->semOwner == NULL) ? 0 : 1;        }    else if (semId->semType == (UINT8) SEM_TYPE_COUNTING)        {        state = semId->state.count;        }    else        {        /* "Old" semaphore, or just invalid */         state = ERROR;        }     intUnlock (level);    return state;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
乱一区二区av| 国产精品美女久久久久aⅴ| 亚洲国产精品一区二区www在线| 99视频一区二区| 亚洲乱码日产精品bd| 欧美亚洲综合在线| 亚洲不卡在线观看| 日韩欧美国产午夜精品| 国内精品自线一区二区三区视频| 国产调教视频一区| proumb性欧美在线观看| 亚洲欧美日韩中文播放| 欧美日韩国产美| 韩国av一区二区三区| 国产精品白丝在线| 欧美日韩亚洲综合| 国内精品写真在线观看| 国产精品久久久久久久岛一牛影视 | 樱桃视频在线观看一区| 欧美疯狂性受xxxxx喷水图片| 麻豆国产一区二区| 亚洲国产精品99久久久久久久久| 色噜噜狠狠成人中文综合| 天堂成人国产精品一区| 久久久久久黄色| 欧美最新大片在线看| 激情小说欧美图片| 亚洲精品你懂的| 久久人人97超碰com| 91久久国产最好的精华液| 美美哒免费高清在线观看视频一区二区 | 日本麻豆一区二区三区视频| 久久精品视频网| 欧美三级乱人伦电影| 国产成+人+日韩+欧美+亚洲| 亚洲一区二区三区小说| 国产日韩av一区| 欧美日韩一区成人| 国产宾馆实践打屁股91| 日韩精品色哟哟| 亚洲精品免费在线播放| 久久久久99精品国产片| 欧美精品一卡两卡| 91小宝寻花一区二区三区| 精品在线免费视频| 亚洲制服丝袜av| 中文字幕乱码亚洲精品一区| 欧美一区二区大片| 欧美性欧美巨大黑白大战| 国产成人av影院| 另类综合日韩欧美亚洲| 亚洲一区av在线| 国产精品短视频| 国产偷v国产偷v亚洲高清| 日韩网站在线看片你懂的| 欧美亚洲高清一区| 99久久精品一区| 国产成人在线视频免费播放| 免费观看在线综合色| 天天影视涩香欲综合网| 一区二区日韩电影| 日韩毛片高清在线播放| 国产欧美日韩卡一| 久久久久久久久久久久久夜| 日韩欧美第一区| 日韩一区二区中文字幕| 欧美日韩二区三区| 国产欧美久久久精品影院| youjizz国产精品| 一区二区三区日本| 亚洲无人区一区| 亚洲自拍与偷拍| 欧美mv日韩mv| 国产精品青草久久| 欧美一区二区免费| 精品久久一二三区| 成人午夜电影小说| 国产乱国产乱300精品| 久久www免费人成看片高清| 亚洲一区二区三区不卡国产欧美| 亚洲精品乱码久久久久久久久| 国产欧美中文在线| 欧美精品一区二| 久久影院午夜论| 久久精品男人的天堂| 国产视频一区在线观看| 久久精品一区二区三区不卡| 国产丝袜欧美中文另类| 日本一区二区三区久久久久久久久不| 精品嫩草影院久久| 久久综合狠狠综合久久综合88 | 亚洲欧美日韩精品久久久久| 成人免费在线播放视频| 亚洲精品午夜久久久| 亚洲综合图片区| 亚洲福利视频导航| 青青草精品视频| 国内精品国产成人国产三级粉色| 国产一区在线观看麻豆| 国产成人亚洲综合色影视| 国产成人鲁色资源国产91色综| 成人免费三级在线| 一本大道久久a久久综合| 欧美三级电影网站| 91精品婷婷国产综合久久竹菊| 国内精品视频一区二区三区八戒| 色综合一个色综合亚洲| 国产精品99久久久久久久女警 | 久久精品72免费观看| 国产麻豆91精品| 99久久精品费精品国产一区二区| 91偷拍与自偷拍精品| 欧美高清精品3d| 久久久久国产精品人| 国产精品国产自产拍高清av王其 | 久久国产成人午夜av影院| 国产精品一区二区视频| 色婷婷久久综合| 日韩午夜av电影| 亚洲女女做受ⅹxx高潮| 日产精品久久久久久久性色| 成人免费看片app下载| 欧美群妇大交群中文字幕| 国产喂奶挤奶一区二区三区| 亚洲成人av一区二区三区| 国产精品系列在线播放| 欧美日韩在线播| 中文字幕av一区 二区| 日产欧产美韩系列久久99| 99re在线精品| 久久久综合网站| 香蕉久久夜色精品国产使用方法| 国产成人精品一区二| 欧美日韩成人一区| 中文字幕中文字幕一区| 美女尤物国产一区| 日本黄色一区二区| 国产亚洲视频系列| 首页国产欧美日韩丝袜| 91理论电影在线观看| 久久久精品免费观看| 美女被吸乳得到大胸91| 精品视频一区 二区 三区| 中文字幕高清不卡| 久久成人18免费观看| 欧美三级三级三级爽爽爽| 国产精品热久久久久夜色精品三区| 免费在线一区观看| 欧美三级韩国三级日本一级| 亚洲视频精选在线| 国产盗摄一区二区| 日韩精品一区二区三区中文不卡| 亚洲福利一二三区| 一本色道**综合亚洲精品蜜桃冫| 国产午夜亚洲精品不卡| 毛片av中文字幕一区二区| 欧美日产国产精品| 亚洲午夜羞羞片| 色综合天天综合网天天狠天天| 国产日本亚洲高清| 国产乱人伦偷精品视频免下载| 欧美一区二区三区四区五区| 天天综合网 天天综合色| 欧美亚一区二区| 一级特黄大欧美久久久| 一本久久综合亚洲鲁鲁五月天 | 99国产一区二区三精品乱码| 欧美韩日一区二区三区四区| 国产精品一区二区免费不卡| 精品国产免费视频| 紧缚奴在线一区二区三区| 欧美一区二区成人| 久久99精品国产麻豆不卡| 日韩一卡二卡三卡国产欧美| 奇米一区二区三区| 日韩精品自拍偷拍| 免费成人在线观看| 91精品免费在线| 青青草伊人久久| 亚洲精品一区二区三区香蕉| 国产一区二区在线视频| 欧美激情在线看| 一本大道av一区二区在线播放| 日韩一区在线播放| 欧美综合视频在线观看| 亚洲第一综合色| 日韩精品资源二区在线| 国产很黄免费观看久久| 国产精品久久久久永久免费观看| 97精品久久久久中文字幕| 一区二区三区久久久| 欧美精品v国产精品v日韩精品| 蜜臀av国产精品久久久久| 国产偷国产偷亚洲高清人白洁 | 欧美日韩精品一区二区三区| 六月丁香婷婷色狠狠久久| 国产视频亚洲色图| 欧美性做爰猛烈叫床潮| 久久99精品一区二区三区三区| 亚洲国产精品黑人久久久|