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

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

?? siglib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
.pG "Basic OS"*/#include "vxWorks.h"#include "private/sigLibP.h"#include "private/windLibP.h"#include "private/taskLibP.h"#include "private/kernelLibP.h"#include "private/funcBindP.h"#include "taskHookLib.h"#include "errnoLib.h"#include "intLib.h"#include "qFifoGLib.h"#include "stddef.h"#include "stdlib.h"#include "string.h"#include "excLib.h"#include "smObjLib.h"#include "taskArchLib.h"#include "timers.h"#include "private/eventP.h"#include "sysLib.h"#define __PTHREAD_SRC#include "pthread.h"/* * Given a structure type, a member, and a pointer to that member, find the * pointer to the structure. */#define structbase(s,m,p)         ((s *)((char *)(p) - offsetof(s,m)))#define issig(m)	(1 <= (m) && (m) <= _NSIGS)struct sigwait    {    sigset_t sigw_set;    struct siginfo sigw_info;    Q_HEAD sigw_wait;    };#if CPU_FAMILY != I960extern int ffsMsb (unsigned long);      /* not in any header */#endif/* global variables */#ifdef WV_INSTRUMENTATIONVOIDFUNCPTR     sigEvtRtn;		/* windview - level 1 event logging */#endif/* static variables */struct sigpend *_pSigQueueFreeHead;/* forward static functions */static void		sigWindPendKill (WIND_TCB *, struct sigpend *);static struct sigtcb	*sigTcbGet (void);static void		sigWindKill (WIND_TCB *pTcb, int signo);static int		sigWindRestart (WIND_TCB *pTcb);static int		sigTimeoutRecalc(int i);static void		sigDeleteHook (WIND_TCB *pNewTcb);static void		sigWrapper (struct sigcontext *pContext);static int		sigPendRun (struct sigtcb *pSigTcb);static int		sigPendGet (struct sigtcb *pSigTcb,				    const sigset_t *sigset,				    struct siginfo *info);static void		sigExcKill (int faultType, int faultSubtype,				    REG_SET *pRegSet);/********************************************************************************* sigInit - initialize the signal facilities** This routine initializes the signal facilities.  It is usually called from* the system start-up routine usrInit() in usrConfig, before interrupts are* enabled.** RETURNS: OK, or ERROR if the delete hooks cannot be installed.** ERRNO: S_taskLib_TASK_HOOK_TABLE_FULL*/int sigInit (void)    {    static BOOL sigInstalled = FALSE;    if (!sigInstalled)        {        _func_sigTimeoutRecalc	= sigTimeoutRecalc;	_func_sigExcKill	= sigExcKill;	_func_sigprocmask	= sigprocmask;        if (taskDeleteHookAdd ((FUNCPTR) sigDeleteHook) == ERROR)            return (ERROR);/* FIXME-PR I do not think sigEvtRtn should be initialized here  * It is also initialize in wvLib.c and that should be enough  */#if 0 #ifdef WV_INSTRUMENTATION        /* windview instrumentation - level 1 */        if (WV_EVTCLASS_IS_SET(WV_CLASS_3))                  /* connect event logging routine */            sigEvtRtn = _func_evtLogOIntLock;        else            sigEvtRtn = NULL;           /* disconnect event logging */#endif#endif        sigInstalled = TRUE;        }     return (OK);    }/********************************************************************************* sigqueueInit - initialize the queued signal facilities** This routine initializes the queued signal facilities. It must* be called before any call to sigqueue().  It is usually* called from the system start-up routine usrInit() in usrConfig,* after sysInit() is called.** It allocates <nQueues> buffers to be used by sigqueue(). A buffer is* used by each call to sigqueue() and freed when the signal is delivered* (thus if a signal is block, the buffer is unavailable until the signal* is unblocked.)** RETURNS: OK, or ERROR if memory could not be allocated.*/int sigqueueInit    (    int nQueues    )    {    static BOOL sigqueueInstalled = FALSE;    struct sigpend *p;    if (!sigqueueInstalled)        {	if (nQueues < 1)	    return (ERROR);	if ((p = (struct sigpend *)malloc(nQueues * sizeof(struct sigpend)))	    == NULL)	    return (ERROR);	while (nQueues-- > 0)	    {	    *(struct sigpend **)p= _pSigQueueFreeHead;	    _pSigQueueFreeHead = p;	    p++;	    }        sigqueueInstalled = TRUE;        }     return (OK);    }/********************************************************************************* sigDeleteHook - task delete hook for signal facility** Cleanup any signals a task has hanging on it before the task gets* deleted.** RETURNS: Nothing.*/static void sigDeleteHook    (    WIND_TCB *pTcb		/* pointer to old task's TCB */    )    {    struct sigtcb	*pSigTcb = pTcb->pSignalInfo;    struct sigpend	*pSigPend;    struct sigq		*pSigQ;    int			ix;    /*     * If I never got any signals, nothing to clean up     */    if (pSigTcb == NULL)	return;    kernelState = TRUE;				/* KERNEL ENTER */    for (ix = 0; ix <= _NSIGS; ix++)	{	pSigQ = pSigTcb->sigt_qhead[ix].sigq_next;	while (pSigQ != &pSigTcb->sigt_qhead[ix])	    {	    pSigPend = structbase(struct sigpend, sigp_q, pSigQ);	    pSigQ = pSigQ->sigq_next;	    pSigPend->sigp_q.sigq_next = pSigPend->sigp_q.sigq_prev = NULL;	    /*	     * free queued signal buffer	     */	    if (pSigPend->sigp_info.si_code == SI_QUEUE)		{		*(struct sigpend **)pSigPend = _pSigQueueFreeHead;		_pSigQueueFreeHead = pSigPend;		}	    }	}    windExit ();				/* KERNEL EXIT */    }/********************************************************************************* sigTimeoutRecalc - Compute the new timeout when a function restarts** Compute the new timeout when a function restarts.  For example, a* task pends on a semTake() with a timeout, receives a signal, runs the signal* handler, and then goes back to waiting on the semTake().  What timeout* should it use when it blocks?  In this example, it uses the original* timeout passed to semTake().** RETURNS: The new timeout value.*/static int sigTimeoutRecalc    (    int timeout			/* original timeout value */    )    {    return (timeout);    }/********************************************************************************* sigemptyset - initialize a signal set with no signals included (POSIX)** This routine initializes the signal set specified by <pSet>, * such that all signals are excluded.** RETURNS: OK (0), or ERROR (-1) if the signal set cannot be initialized.** ERRNO: No errors are detectable.*/int sigemptyset    (    sigset_t	*pSet		/* signal set to initialize */    )    {    *pSet = 0;    return (OK);    }/********************************************************************************* sigfillset - initialize a signal set with all signals included (POSIX)** This routine initializes the signal set specified by <pSet>, such that* all signals are included.** RETURNS: OK (0), or ERROR (-1) if the signal set cannot be initialized.** ERRNO: No errors are detectable.*/int sigfillset    (    sigset_t	*pSet		/* signal set to initialize */    )    {    *pSet = 0xffffffff;    return (OK);    }/********************************************************************************* sigaddset - add a signal to a signal set (POSIX)** This routine adds the signal specified by <signo> to the signal set * specified by <pSet>.** RETURNS: OK (0), or ERROR (-1) if the signal number is invalid.** ERRNO: EINVAL*/int sigaddset    (    sigset_t	*pSet,		/* signal set to add signal to */    int		signo		/* signal to add */    )    {    if (issig (signo))	{	*pSet |= sigmask (signo);	return (OK);	}    errnoSet (EINVAL);    return (ERROR);    }/********************************************************************************* sigdelset - delete a signal from a signal set (POSIX)** This routine deletes the signal specified by <signo> from the signal set* specified by <pSet>.** RETURNS: OK (0), or ERROR (-1) if the signal number is invalid.** ERRNO: EINVAL*/int sigdelset    (    sigset_t	*pSet,		/* signal set to delete signal from */    int		signo		/* signal to delete */    )    {    if (issig (signo))	{	*pSet &= ~sigmask (signo);	return (OK);	}    errnoSet (EINVAL);    return (ERROR);    }/********************************************************************************* sigismember - test to see if a signal is in a signal set (POSIX)** This routine tests whether the signal specified by <signo> is* a member of the set specified by <pSet>.** RETURNS: 1 if the specified signal is a member of the specified set, OK* (0) if it is not, or ERROR (-1) if the test fails.* * ERRNO: EINVAL*/int sigismember    (    const sigset_t      *pSet,  /* signal set to test */    int                 signo   /* signal to test for */    )    {    if (issig (signo))        return ((*pSet & sigmask (signo)) != 0);    errnoSet (EINVAL);    return (ERROR);    }/********************************************************************************* signal - specify the handler associated with a signal** This routine chooses one of three ways in which receipt of the signal* number <signo> is to be subsequently handled.  If the value of <pHandler> is* SIG_DFL, default handling for that signal will occur.  If the value of* <pHandler> is SIG_IGN, the signal will be ignored.  Otherwise, <pHandler>* must point to a function to be called when that signal occurs.** RETURNS: The value of the previous signal handler, or SIG_ERR.*/void (*signal    (    int		signo,    void	(*pHandler) ()    )) ()    {    struct sigaction in, out;    in.sa_handler = pHandler;    in.sa_flags = 0;    (void) sigemptyset (&in.sa_mask);    return ((sigaction (signo, &in, &out) == ERROR) ? SIG_ERR : out.sa_handler);    }/********************************************************************************* sigaction - examine and/or specify the action associated with a signal (POSIX)** This routine allows the calling process to examine and/or specify* the action to be associated with a specific signal.** RETURNS: OK (0), or ERROR (-1) if the signal number is invalid.** ERRNO: EINVAL*/int sigaction    (    int				signo,	/* signal of handler of interest */    const struct sigaction	*pAct,	/* location of new handler */    struct sigaction		*pOact	/* location to store old handler */    )    {    struct sigtcb *pSigTcb;    struct sigaction *pSigAction;    struct sigpend	*pSigPend;    struct sigq		*pSigQ;    if (!issig (signo))	{	errnoSet (EINVAL);	return (ERROR);	}    if ((pSigTcb = sigTcbGet ()) == NULL)	return (ERROR);				/* errno was set */#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging */    EVT_OBJ_SIG (EVENT_SIGNAL, 2, signo, ((int) pAct->sa_handler));#endif    pSigAction = &pSigTcb->sigt_vec[signo];    if (pOact != NULL)	*pOact = *pSigAction;    if (pAct != NULL)	{	kernelState = TRUE;			/* KERNEL ENTER */	*pSigAction = *pAct;	/*	 * if the new action is to ignore, then any pending	 * signals must be removed.	 */	if (pSigAction->sa_handler == SIG_IGN)	    {	    sigdelset (&pSigTcb->sigt_pending, signo);	    sigdelset (&pSigTcb->sigt_kilsigs, signo);		/* XXX need to destroy queued signals */	    pSigQ = pSigTcb->sigt_qhead[signo].sigq_next;	    while (pSigQ != &pSigTcb->sigt_qhead[signo])		{		pSigPend = structbase(struct sigpend, sigp_q, pSigQ);		pSigQ = pSigQ->sigq_next;		pSigPend->sigp_q.sigq_next = pSigPend->sigp_q.sigq_prev = NULL;		/*		 * free queued signal buffer		 */		if (pSigPend->sigp_info.si_code == SI_QUEUE)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精选在线视频| 国产精一区二区三区| 激情综合色丁香一区二区| av在线播放成人| 日韩精品专区在线影院观看 | 亚洲一二三四在线| 国产一区欧美二区| 欧美精品久久一区二区三区| 亚洲你懂的在线视频| 国产精品69久久久久水密桃| 91精品蜜臀在线一区尤物| 亚洲精品乱码久久久久久| 国产在线精品一区二区夜色 | 欧美午夜理伦三级在线观看| 国产三级三级三级精品8ⅰ区| 日日摸夜夜添夜夜添亚洲女人| 波多野结衣在线aⅴ中文字幕不卡| 精品国产91久久久久久久妲己| 亚洲一区二区3| 91一区一区三区| 欧美国产欧美综合| 国内精品免费**视频| 欧美一级日韩免费不卡| 亚洲成av人影院| 欧美日韩久久久一区| 一区二区三区在线视频播放 | 国产成人午夜高潮毛片| 日韩精品中文字幕在线一区| 亚洲国产视频直播| 91福利小视频| 亚洲成av人在线观看| 欧美日韩mp4| 日韩专区在线视频| 88在线观看91蜜桃国自产| 亚洲国产综合在线| 欧美三级在线看| 日本午夜一本久久久综合| 欧美日韩国产大片| 免费高清在线视频一区·| 欧美一区二区三区电影| 美女视频黄免费的久久| 精品国产乱码久久久久久闺蜜| 毛片av一区二区| 久久无码av三级| 国产不卡在线一区| 国产精品视频九色porn| 94色蜜桃网一区二区三区| 一区二区三区四区在线免费观看| 色狠狠综合天天综合综合| 亚洲成人黄色小说| 欧美mv日韩mv国产网站| 丁香婷婷综合网| 一级做a爱片久久| 欧美老人xxxx18| 精品亚洲porn| 自拍偷拍亚洲综合| 欧美日韩一区不卡| 激情五月婷婷综合| 国产精品亲子乱子伦xxxx裸| 在线亚洲一区二区| 奇米四色…亚洲| 国产精品美女一区二区三区| 在线精品视频一区二区| 精品一区二区影视| 日韩伦理免费电影| 91精品国产麻豆国产自产在线| 国产精品一品二品| 亚洲一区二区三区视频在线播放 | 亚洲裸体xxx| 91精品国产全国免费观看| 国产美女视频一区| 亚洲欧美偷拍三级| 欧美成人猛片aaaaaaa| 99国产精品国产精品久久| 免费成人性网站| 亚洲色图.com| 久久精品一级爱片| 欧美日韩一区中文字幕| 国产福利视频一区二区三区| 一区二区三区欧美| 国产日韩欧美精品在线| 欧美在线观看视频在线| 国产成a人无v码亚洲福利| 婷婷中文字幕一区三区| 中文字幕日韩av资源站| 欧美猛男超大videosgay| 成a人片亚洲日本久久| 免费视频一区二区| 一区二区三区四区国产精品| 久久久久久久久岛国免费| 欧美日韩国产系列| 日本高清不卡aⅴ免费网站| 国产精品一区在线观看乱码| 日韩影院精彩在线| 亚洲一区二区视频| 亚洲三级小视频| 中文字幕乱码日本亚洲一区二区 | 美女在线观看视频一区二区| 亚洲乱码日产精品bd| 国产精品三级视频| 久久香蕉国产线看观看99| 精品精品国产高清a毛片牛牛| 欧美午夜精品一区二区三区| 日本高清成人免费播放| 91污在线观看| 99re成人精品视频| 不卡视频免费播放| 国产成人亚洲精品狼色在线 | 日韩精品每日更新| 亚洲一区二区三区中文字幕 | 国产午夜精品一区二区三区视频 | 亚洲色图清纯唯美| 亚洲人成网站色在线观看| 国产日韩欧美在线一区| 中文字幕乱码久久午夜不卡| 中文字幕av一区二区三区高 | 精品捆绑美女sm三区| 91精品国产福利| 91精品欧美久久久久久动漫| 欧美又粗又大又爽| 欧美少妇xxx| 777欧美精品| 日韩欧美123| 精品国产一区二区国模嫣然| 欧美精品一区二区久久婷婷| 久久亚洲精品国产精品紫薇| 久久久国产综合精品女国产盗摄| 亚洲精品一区二区三区影院| 久久九九99视频| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 精品盗摄一区二区三区| 精品福利一二区| 日本一二三不卡| 综合色天天鬼久久鬼色| 亚洲大片免费看| 另类小说综合欧美亚洲| 国产69精品久久99不卡| 99久久精品国产网站| 欧美三级电影在线观看| 久久午夜老司机| 中文字幕中文字幕在线一区| 夜夜嗨av一区二区三区中文字幕| 亚洲国产成人精品视频| 国产在线乱码一区二区三区| 成人久久18免费网站麻豆 | 亚洲国产精品自拍| 日本欧美久久久久免费播放网| 国产精品综合二区| 91久久精品国产91性色tv| 日韩欧美中文一区二区| 国产精品久久看| 日韩激情一区二区| 豆国产96在线|亚洲| 在线观看免费亚洲| 久久久电影一区二区三区| 亚洲精品老司机| 另类专区欧美蜜桃臀第一页| 99久久99精品久久久久久| 91精品国产一区二区三区蜜臀| 国产精品美日韩| 久久99久久99| 在线欧美日韩精品| 久久一夜天堂av一区二区三区| 日本亚洲一区二区| 国产精品电影一区二区| xvideos.蜜桃一区二区| 国产成人精品免费视频网站| 在线免费不卡视频| 国产偷国产偷精品高清尤物| 国产精品久久久久一区| 日本成人中文字幕| 色就色 综合激情| 国产日韩视频一区二区三区| 麻豆一区二区在线| 欧美午夜电影网| 国产精品久久久久久亚洲毛片| 久久国产精品99精品国产| 欧美日韩精品欧美日韩精品| 国产精品伦理在线| 黑人精品欧美一区二区蜜桃| 欧美三级三级三级爽爽爽| 亚洲三级在线看| 9色porny自拍视频一区二区| 久久综合久久综合九色| 日本vs亚洲vs韩国一区三区| 欧美日韩aaa| 亚洲成人免费视频| 在线看不卡av| 亚洲最大成人网4388xx| 一本色道久久综合狠狠躁的推荐| 国产日韩综合av| 国产aⅴ综合色| 欧美国产综合色视频| 国产成人99久久亚洲综合精品| 欧美变态tickle挠乳网站| 麻豆精品久久精品色综合| 日韩一区二区三区三四区视频在线观看| 亚洲综合丁香婷婷六月香| 色综合久久综合网欧美综合网 | 欧美日韩中文字幕精品|