亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久老女人爱爱| 欧美r级在线观看| caoporn国产精品| 乱一区二区av| 日韩经典中文字幕一区| 一级女性全黄久久生活片免费| 国产精品天干天干在观线| 国产嫩草影院久久久久| 欧美精品久久一区| 色综合久久综合网97色综合| 国产电影精品久久禁18| 国产一区二区三区在线观看免费 | 亚州成人在线电影| 欧美一区二区在线观看| 国产精品1区2区3区| 免费久久99精品国产| 中文字幕一区不卡| 欧美嫩在线观看| 成人性视频网站| 蜜臀av国产精品久久久久| 成人av在线资源网站| 国产精品麻豆视频| 国产欧美日韩综合精品一区二区| 久久综合九色综合欧美亚洲| 26uuu精品一区二区在线观看| 精品欧美乱码久久久久久| 日韩免费看的电影| 欧美一区二区在线视频| 久久婷婷国产综合精品青草| 久久久三级国产网站| 久久先锋影音av| 国产精品美女久久久久久| 日韩毛片一二三区| 亚洲伊人色欲综合网| 香蕉加勒比综合久久| 麻豆国产精品官网| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美性三三影院| 日韩精品一区二区三区三区免费| 欧美激情中文字幕| 香蕉成人伊视频在线观看| 狠狠网亚洲精品| 色噜噜狠狠成人网p站| 91精品午夜视频| 中文字幕中文乱码欧美一区二区| 亚洲国产一区在线观看| 国产精品一二二区| 欧美日韩亚州综合| 日本一区二区三区免费乱视频| 亚洲图片自拍偷拍| 国产露脸91国语对白| 欧美日韩一区二区电影| 久久精品人人做人人综合| 亚洲成a人片综合在线| 高清av一区二区| 91精品国产91热久久久做人人| www.亚洲在线| 欧美色图一区二区三区| 亚洲欧美激情一区二区| 国产精品自拍av| 91精品国产综合久久小美女| 亚洲欧美日韩电影| 国产1区2区3区精品美女| 欧美欧美欧美欧美| 亚洲综合久久久| 韩国在线一区二区| 91精品国产综合久久福利| 91国在线观看| 91在线码无精品| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲午夜精品一区二区三区他趣| 国产成人自拍在线| 精品日韩一区二区| 视频一区二区中文字幕| 色噜噜夜夜夜综合网| 国产欧美精品区一区二区三区| 蜜臀av国产精品久久久久| 欧美日韩亚洲丝袜制服| 又紧又大又爽精品一区二区| 国产成人免费视频一区| 精品日韩一区二区| 六月丁香婷婷久久| 91精品欧美一区二区三区综合在 | 国产欧美精品国产国产专区| 麻豆精品国产传媒mv男同| 欧美日韩国产大片| 亚洲一区二区三区四区在线免费观看 | 中文无字幕一区二区三区| 精品夜夜嗨av一区二区三区| 91麻豆精品国产| 午夜欧美一区二区三区在线播放| 色菇凉天天综合网| 亚洲黄色av一区| 91无套直看片红桃| 亚洲欧美中日韩| 99精品在线观看视频| 国产精品国产自产拍在线| 粉嫩aⅴ一区二区三区四区| 久久久国产综合精品女国产盗摄| 黑人巨大精品欧美黑白配亚洲| 欧美一级搡bbbb搡bbbb| 美女诱惑一区二区| 精品国产乱子伦一区| 精品中文av资源站在线观看| 欧美成人bangbros| 久久99久久99精品免视看婷婷| 精品国产sm最大网站| 国产剧情在线观看一区二区| 26uuu欧美| 国产成人精品www牛牛影视| 国产欧美精品一区二区三区四区 | 国产精品中文字幕欧美| 久久久国际精品| 寂寞少妇一区二区三区| 精品一区二区影视| 久久久久久久电影| 成人午夜在线播放| 亚洲色图在线看| 欧美性大战xxxxx久久久| 午夜电影网一区| 欧美大片一区二区| 国产麻豆一精品一av一免费| 亚洲国产精品国自产拍av| 成人av在线观| 亚洲动漫第一页| 欧美一级国产精品| 国产成人在线视频网址| 亚洲欧美日韩在线不卡| 欧美日韩电影在线| 精品一区二区三区免费视频| 国产精品久久国产精麻豆99网站| 91免费在线视频观看| 亚洲va欧美va天堂v国产综合| 精品欧美乱码久久久久久| 本田岬高潮一区二区三区| 五月激情综合色| 国产亚洲综合色| 欧美性大战xxxxx久久久| 狠狠色丁香久久婷婷综| 综合色天天鬼久久鬼色| 91精品国产麻豆国产自产在线| 国内精品久久久久影院色| 亚洲日本一区二区| 欧美一区二区三区精品| 国产91露脸合集magnet | 91美女福利视频| 日本欧美一区二区三区乱码| 国产精品色在线| 欧美一区二区视频观看视频| 国产成人一区在线| 亚洲444eee在线观看| 欧美激情中文字幕| 91精品国产乱码| 成人免费视频国产在线观看| 图片区小说区国产精品视频| 国产午夜亚洲精品不卡| 欧美人伦禁忌dvd放荡欲情| 国产成人精品网址| 日韩电影免费一区| 亚洲三级小视频| 国产亚洲精品bt天堂精选| 欧美日韩国产bt| 99久久国产综合精品麻豆| 美腿丝袜在线亚洲一区| 一区二区三区波多野结衣在线观看| 日韩欧美亚洲国产精品字幕久久久| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩欧美不卡一区| 久久久久久一级片| 91麻豆国产在线观看| 欧美国产乱子伦| 久久精品噜噜噜成人av农村| 国产乱色国产精品免费视频| 精品视频123区在线观看| 国产精品免费网站在线观看| 午夜精品免费在线观看| 成人一区二区三区中文字幕| 4438成人网| 亚洲成av人片在线| 在线观看视频一区二区欧美日韩| 久久这里只有精品6| 日本中文字幕一区二区有限公司| 中文字幕在线不卡一区| 久久久综合精品| 制服.丝袜.亚洲.中文.综合| 欧美在线免费观看视频| 色婷婷亚洲婷婷| 99re6这里只有精品视频在线观看| 国产成人av一区二区三区在线观看| 毛片av中文字幕一区二区| 日韩二区在线观看| 亚洲成人激情综合网| 一区二区三区波多野结衣在线观看| 国产精品拍天天在线| 国产日韩av一区二区| 久久久久久一二三区| 久久久久9999亚洲精品| 久久嫩草精品久久久精品一| 精品欧美一区二区久久| 亚洲精品一区二区三区99|