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

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

?? wdlib.c

?? vxworks的完整的源代碼
?? C
字號:
/* wdLib.c - watchdog timer library *//* Copyright 1984-1995 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01t,24jun96,sbs  made windview instrumentation conditionally compiled02s,13oct95,jdi  doc: removed SEE ALSO to .pG Cross-Dev.02r,18jan95,rhp  doc: say explicitly no need to cancel expired timers,                 and improve wdLib and wdSTart() man pages from bss comments.02u,14apr94,smb  fixed class dereferencing for instrumentation macros02t,15mar94,smb  modified instrumentation macros02s,24jan94,smb  added instrumentation macros02r,10dec93,smb  added instrumentation02q,24feb93,jdi  doc tweaks from review by kdl.02p,20jan93,jdi  documentation cleanup for 5.1.02o,13nov92,jcf  package init called with with watchdog creation.02n,29jul92,jcf  package init called with with object initialization.02m,04jul92,jcf  private headers.02l,26may92,rrr  the tree shuffle02k,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice02j,30mar91,jdi  documentation cleanup; doc review by jcf.02i,05oct90,dnw  made wdInit() and wdTerminate() be NOMANUAL.02h,01oct90,jcf  fixed wdDestroy() to invalidate with ISR mutual exclusion.02g,29aug90,jcf  documentation.02f,10aug90,dnw  changed wdCancel() from void to STATUS.02e,02aug90,jcf  documentation.02d,17jul90,dnw  changed to new objAlloc() call.02c,03jul90,jcf  documentation.		 removed erroneous log message.02b,26jun90,jcf  updated class structure, change over to objAlloc ()02a,17apr90,jcf  integrated into wind 2.0.01j,01sep88,gae  documentation.01i,04nov87,ecs  documentation.01h,25mar87,jlf  documentation01g,21dec86,dnw  changed to not get include files from default directories.01f,05sep86,jlf  minor documentation.01e,14apr86,rdc  changed memAllocates to mallocs.01d,07sep84,jlf  added copyright notice and comments.01c,02aug84,dnw  changed calls to vxInt... to int...01b,11jul84,ecs  changed calls to vxIntLock/vxIntUnlock to restore old level.01a,22may84,dnw  written*//*DESCRIPTIONThis library provides a general watchdog timer facility.  Any task maycreate a watchdog timer and use it to run a specified routine inthe context of the system-clock ISR, after a specified delay.Once a timer has been created with wdCreate(), it can be started withwdStart().  The wdStart() routine specifies what routine to run, aparameter for that routine, and the amount of time (in ticks) beforethe routine is to be called.  (The timeout value is in ticks asdetermined by the system clock; see sysClkRateSet() for moreinformation.)  After the specified delay ticks have elapsed (unlesswdCancel() is called first to cancel the timer) the timeout routine isinvoked with the parameter specified in the wdStart() call.  Thetimeout routine is invoked whether the task which started the watchdogis running, suspended, or deleted.The timeout routine executes only once per wdStart() invocation; thereis no need to cancel a timer with wdCancel() after it has expired, orin the expiration callback itself.Note that the timeout routine is invoked at interrupt level, rather thanin the context of the task.  Thus, there are restrictions on what theroutine may do.  Watchdog routines are constrained to the same rulesas interrupt service routines.  For example, they may not take semaphores,issue other calls that may block, or use I/O system routines like printf().EXAMPLEIn the fragment below, if maybeSlowRoutine() takes more than 60 ticks,logMsg() will be called with the string as a parameter, causing the message tobe printed on the console.  Normally, of course, more significant correctiveaction would be taken..CS    WDOG_ID wid = wdCreate ();    wdStart (wid, 60, logMsg, "Help, I've timed out!");    maybeSlowRoutine ();	/@ user-supplied routine @/    wdCancel (wid);.CEINTERNAL:	WINDVIEW INSTRUMENTATIONLevel 1:	wdCreate() causes EVENT_WDCREATE	wdDestroy() causes EVENT_WDDELETE	wdStart() causes EVENT_WDSTART	wdCancel() causes EVENT_WDCANCELLevel 2:	N/ALevel 3: N/AINCLUDE FILES: wdLib.hSEE ALSO: logLib,.pG "Basic OS"*/#include "vxWorks.h"#include "taskLib.h"#include "errno.h"#include "intLib.h"#include "private/classLibP.h"#include "private/objLibP.h"#include "private/wdLibP.h"#include "private/windLibP.h"#include "private/workQLibP.h"#include "private/eventP.h"/* locals */LOCAL BOOL wdLibInstalled;LOCAL OBJ_CLASS wdClass;		/* non-instrumented class *//* globals */CLASS_ID wdClassId = &wdClass;/* windview definitions */#ifdef WV_INSTRUMENTATIONLOCAL OBJ_CLASS wdInstClass;CLASS_ID wdInstClassId = &wdInstClass;#endif/********************************************************************************* wdLibInit - initialize watchdog library** This routine initializes the watchdog object class.  No watchdog operation* will work until this is called.  This routine is called during system* configuration within kernelInit().  This routine should only be called once.** NOMANUAL*/STATUS wdLibInit (void)    {    if ((!wdLibInstalled) &&	(classInit (wdClassId, sizeof (WDOG), OFFSET (WDOG, objCore),	 (FUNCPTR) wdCreate, (FUNCPTR) wdInit, (FUNCPTR) wdDestroy) == OK))	{#ifdef WV_INSTRUMENTATION	/* initialise the instrumented class for level 1 event logging */	wdClassId -> initRtn = wdInstClassId;        classInstrument (wdClassId, wdInstClassId);        wdInstClassId->instRtn = (FUNCPTR) _func_evtLogO;#endif	wdLibInstalled = TRUE;	}    return ((wdLibInstalled) ? OK : ERROR);    }/********************************************************************************* wdCreate - create a watchdog timer** This routine creates a watchdog timer by allocating a WDOG structure in* memory.** RETURNS: The ID for the watchdog created, or NULL if memory is insufficient.** SEE ALSO: wdDelete()*/WDOG_ID wdCreate (void)    {    WDOG_ID wdId;#ifdef WV_INSTRUMENTATION    int level;#endif    if ((!wdLibInstalled) && (wdLibInit () != OK))	return (NULL);				/* package init problem */    wdId = (WDOG_ID) objAlloc (wdClassId);    /* initialize allocated watchdog */    if ((wdId != NULL) && (wdInit (wdId) != OK))	{	objFree (wdClassId, (char *) wdId);	return (NULL);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging */    level = intLock ();			    EVT_OBJ_1 (OBJ, wdId, wdClassId, EVENT_WDCREATE, wdId);    intUnlock (level);				#endif    return (wdId);    }/********************************************************************************* wdInit - initialize a watchdog timer** This routine initializes a static watchdog or a watchdog embedded in a* larger object.** RETURNS: OK, or ERROR if the watchdog could not be initialized.** NOMANUAL*/STATUS wdInit    (    WDOG *pWdog         /* pointer to watchdog to initialize */    )    {    if ((!wdLibInstalled) && (wdLibInit () != OK))	return (ERROR);				/* package init problem */    pWdog->status        = WDOG_OUT_OF_Q;	/* initially out of q */    pWdog->deferStartCnt = 0;			/* no pending starts */#ifdef WV_INSTRUMENTATION    /* windview - connect instrumented class for level 1 event logging */    if (wvObjIsEnabled)	objCoreInit (&pWdog->objCore, wdInstClassId);     else#endif        objCoreInit (&pWdog->objCore, wdClassId);	/* initialize core */    return (OK);    }/********************************************************************************* wdDelete - delete a watchdog timer** This routine de-allocates a watchdog timer.  The watchdog will be removed* from the timer queue if it has been started.  This routine complements* wdCreate().** RETURNS: OK, or ERROR if the watchdog timer cannot be de-allocated.** SEE ALSO: wdCreate()*/STATUS wdDelete    (    WDOG_ID wdId                /* ID of watchdog to delete */    )    {    return (wdDestroy (wdId, TRUE));		/* delete watchdog */    }/********************************************************************************* wdTerminate - terminate a watchdog timer** This routine terminates a watchdog timer.  The watchdog will be removed* from the timer queue if it has been started.  This routine differs from* wdDelete() in that associated memory is not de-allocated.  This routine* complements wdInit().** RETURNS: OK, or ERROR if the watchdog cannot be terminated.** NOMANUAL*/STATUS wdTerminate    (    WDOG_ID wdId                /* ID of watchdog to terminate */    )    {    return (wdDestroy (wdId, FALSE));		/* terminate watchdog */    }/********************************************************************************* wdDestroy - terminate a watchdog timer** This routine terminates a watchdog timer and optionally de-allocates* associated memory.  If the watchdog has been started, it will be removed* from the timer queue.  This routine underlies wdDelete(), and* wdTerminate().** RETURNS: OK, or ERROR if the watchdog cannot be destroyed.** NOMANUAL*/STATUS wdDestroy    (    WDOG_ID wdId,               /* ID of watchdog to terminate */    BOOL    dealloc             /* dealloc associated memory */    )    {    int level;    if (INT_RESTRICT () != OK)			/* restrict isr use */	return (ERROR);    level = intLock ();				/* LOCK INTERRUPTS */    if (OBJ_VERIFY (wdId, wdClassId) != OK)	/* validate watchdog ID */	{	intUnlock (level);			/* UNLOCK INTERRUPTS */	return (ERROR);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging */    EVT_OBJ_1 (OBJ, wdId, wdClassId, EVENT_WDDELETE, wdId);#endif    objCoreTerminate (&wdId->objCore);		/* invalidate watchdog */    kernelState = TRUE;				/* KERNEL ENTER */    intUnlock (level);				/* UNLOCK INTERRUPTS */    windWdCancel (wdId);			/* cancel watchdog */    wdId->status = WDOG_DEAD;			/* dead dog */    TASK_SAFE ();				/* TASK SAFE */    windExit ();				/* EXIT KERNEL */    if (dealloc)	objFree (wdClassId, (char *) wdId);	/* deallocate watchdog */    TASK_UNSAFE ();				/* TASK UNSAFE */    return (OK);    }/********************************************************************************* wdStart - start a watchdog timer* * This routine adds a watchdog timer to the system tick queue.  The* specified watchdog routine will be called from interrupt level after* the specified number of ticks has elapsed.  Watchdog timers may be* started from interrupt level.  * * To replace either the timeout <delay> or the routine to be executed,* call wdStart() again with the same <wdId>; only the most recent* wdStart() on a given watchdog ID has any effect.  (If your* application requires multiple watchdog routines, use wdCreate() to* generate separate a watchdog ID for each.)  To cancel a watchdog* timer before the specified tick count is reached, call wdCancel().* * Watchdog timers execute only once, but some applications require* periodically executing timers.  To achieve this effect, the timer* routine itself must call wdStart() to restart the timer on each* invocation.* * WARNING: The watchdog routine runs in the context of the* system-clock ISR; thus, it is subject to all ISR restrictions.* * RETURNS: OK, or ERROR if the watchdog timer cannot be started.** SEE ALSO: wdCancel()*/STATUS wdStart    (    WDOG_ID wdId,               /* watchdog ID */    int delay,                  /* delay count, in ticks */    FUNCPTR pRoutine,           /* routine to call on time-out */    int parameter               /* parameter with which to call routine */    )    {    int level = intLock ();			/* LOCK INTERRUPTS */    if (OBJ_VERIFY (wdId, wdClassId) != OK)	{	intUnlock (level);			/* UNLOCK INTERRUPTS */	return (ERROR);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging */    EVT_OBJ_2 (OBJ, wdId, wdClassId, EVENT_WDSTART, wdId, delay);#endif    if (kernelState)				/* already in kernel? */	{	wdId->deferStartCnt ++;			/* bump the start count */	wdId->wdParameter = parameter;		/* update w/ new parameter */	wdId->wdRoutine   = pRoutine;		/* update w/ new routine */	intUnlock (level);			/* UNLOCK INTERRUPTS */	workQAdd2 (windWdStart, (int)wdId, delay);	/* defer the wdStart */	}    else	{	wdId->deferStartCnt  = 1;		/* initialize start count */	wdId->wdParameter    = parameter;	/* update w/ new parameter */	wdId->wdRoutine      = pRoutine;	/* update w/ new routine */	kernelState	     = TRUE;		/* KERNEL ENTER */	intUnlock (level);			/* UNLOCK INTERRUPTS */	if (windWdStart (wdId, delay) != OK)	/* start the watchdog */	    {	    windExit ();			/* KERNEL EXIT */	    return (ERROR);	    }	windExit ();				/* KERNEL EXIT */	}    return (OK);    }/********************************************************************************* wdCancel - cancel a currently counting watchdog** This routine cancels a currently running watchdog timer by* zeroing its delay count.  Watchdog timers may be canceled from interrupt* level.** RETURNS: OK, or ERROR if the watchdog timer cannot be canceled.** SEE ALSO: wdStart()*/STATUS wdCancel    (    WDOG_ID wdId        /* ID of watchdog to cancel */    )    {    int level = intLock ();			/* LOCK INTERRUPTS */    if (OBJ_VERIFY (wdId, wdClassId) != OK)	{	intUnlock (level);			/* UNLOCK INTERRUPTS */	return (ERROR);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging */    EVT_OBJ_1 (OBJ, wdId, wdClassId, EVENT_WDCANCEL, wdId);#endif    if (kernelState)	{	intUnlock (level);			/* UNLOCK INTERRUPTS */	workQAdd1 ((FUNCPTR)windWdCancel, (int)wdId);	}    else	{	kernelState = TRUE;			/* KERNEL_ENT */	intUnlock (level);			/* UNLOCK INTERRUPTS */	windWdCancel (wdId);			/* cancel watchdog */	windExit ();				/* KERNEL EXIT */	}    return (OK);    }/********************************************************************************* wdTick - obsolete routine** This routine is provided for backward compatibility and is simply a NOP* if called.** NOMANUAL*/void wdTick (void)    {    /* obsolete */    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩高清一区二区不卡| 国产精品一线二线三线| 欧美日韩中文字幕一区二区| 亚洲激情在线播放| 欧美日韩不卡视频| 日韩中文字幕亚洲一区二区va在线| 91精品国产综合久久精品图片| 亚洲国产成人高清精品| 日韩一区二区电影| 国产sm精品调教视频网站| 亚洲天堂福利av| 欧美在线观看视频一区二区 | 成人福利视频网站| 中文字幕一区二区日韩精品绯色| 成人激情午夜影院| 亚洲一区二区黄色| 欧美xxxxxxxx| 成人av高清在线| 亚洲午夜三级在线| 欧美mv日韩mv国产| 91麻豆视频网站| 五月开心婷婷久久| 久久精品夜夜夜夜久久| 波多野结衣欧美| 视频在线在亚洲| 久久久久久久久久久久电影| 91丨porny丨中文| 美女在线视频一区| 亚洲视频一二三| 欧美v日韩v国产v| 在线观看亚洲精品视频| 国产一区视频在线看| 一二三四区精品视频| 欧美sm美女调教| 色狠狠桃花综合| 国产老女人精品毛片久久| 亚洲伊人色欲综合网| 久久久久久久综合色一本| 欧美午夜电影网| 国产美女在线精品| 性感美女久久精品| 中文字幕中文字幕中文字幕亚洲无线| 欧美精品电影在线播放| 粉嫩av亚洲一区二区图片| 亚洲午夜激情av| 国产精品国产三级国产aⅴ无密码| 欧美美女一区二区| 色婷婷亚洲一区二区三区| 国产一区二区调教| 午夜不卡av免费| 亚洲精品免费视频| 中文幕一区二区三区久久蜜桃| 国产精品美女久久久久久久久久久| 欧美三级乱人伦电影| 亚洲成av人在线观看| 国产亚洲精品中文字幕| 欧美日本精品一区二区三区| av电影在线观看一区| 国产精品资源站在线| 欧美一区二区三区喷汁尤物| 免费成人性网站| 日本高清成人免费播放| 亚洲国产日韩一级| 欧美一区二区精美| 国产91精品在线观看| 亚洲国产精品久久人人爱蜜臀 | 久久精品久久久精品美女| 国产亚洲人成网站| 欧美日韩黄色一区二区| 国产乱人伦偷精品视频免下载 | 日韩免费电影一区| 国产一区二区在线免费观看| 自拍偷拍欧美精品| 91精品国产高清一区二区三区蜜臀| 国产精品自拍av| 亚洲最新视频在线播放| 久久日韩精品一区二区五区| 色8久久精品久久久久久蜜| 国产在线精品一区二区| 亚洲一区欧美一区| 欧美国产欧美综合| 91麻豆精品久久久久蜜臀| 99热精品一区二区| 国产麻豆欧美日韩一区| 亚洲r级在线视频| 国产精品剧情在线亚洲| 亚洲精品在线网站| 欧美老年两性高潮| 色哟哟在线观看一区二区三区| 激情伊人五月天久久综合| 亚洲成a人片综合在线| 1000精品久久久久久久久| 日韩欧美国产成人一区二区| 欧美人妖巨大在线| 欧美色精品在线视频| 99在线精品免费| 国产91丝袜在线播放九色| 久久爱www久久做| 青青草97国产精品免费观看 | 中文字幕色av一区二区三区| 久久蜜桃一区二区| 欧美xxxx老人做受| 欧美大片免费久久精品三p| 欧美三级韩国三级日本三斤| 欧美性生活大片视频| 99国产精品国产精品久久| 粉嫩嫩av羞羞动漫久久久| 国产成人av一区二区三区在线 | 久久综合狠狠综合久久综合88| 欧美日韩精品系列| 欧美日韩综合不卡| 欧美日本一道本| 欧美精品视频www在线观看| 欧美三级视频在线| 欧美日韩精品系列| 欧美一级电影网站| 日韩欧美一级精品久久| 欧美大片一区二区| 久久色.com| 欧美极品少妇xxxxⅹ高跟鞋| 国产精品乱码久久久久久| 国产精品高清亚洲| 亚洲自拍偷拍网站| 亚洲成人tv网| 蜜臀精品一区二区三区在线观看| 青草av.久久免费一区| 国产尤物一区二区| 成人av综合一区| 91啪在线观看| 制服丝袜中文字幕一区| 欧美大胆一级视频| 国产亚洲精品福利| 综合激情网...| 日韩和欧美一区二区| 久久超碰97人人做人人爱| 成人综合在线观看| 色婷婷亚洲一区二区三区| 91精品国产一区二区三区| 欧美精品一区二区三区在线| 国产精品国产三级国产a| 亚洲午夜私人影院| 狠狠狠色丁香婷婷综合久久五月| 国产成人自拍网| 91福利精品视频| 精品国产91九色蝌蚪| 国产精品麻豆99久久久久久| 亚洲va国产天堂va久久en| 狠狠色丁香九九婷婷综合五月| 91偷拍与自偷拍精品| 91精品欧美一区二区三区综合在| 久久久久国产精品麻豆ai换脸| 亚洲精品自拍动漫在线| 另类小说欧美激情| 99精品热视频| 精品国产伦一区二区三区观看方式| 中文字幕一区二区三区蜜月| 日本人妖一区二区| 91丨九色丨蝌蚪丨老版| 日韩一区二区在线免费观看| 亚洲欧美偷拍另类a∨色屁股| 麻豆精品国产传媒mv男同| thepron国产精品| 日韩欧美一级在线播放| 亚洲精品欧美综合四区| 国产一区二区三区综合| 欧美三级蜜桃2在线观看| 日本一区二区三区视频视频| 丝袜诱惑制服诱惑色一区在线观看| 成人爱爱电影网址| www国产亚洲精品久久麻豆| 亚洲国产欧美日韩另类综合| 国产麻豆精品一区二区| 69精品人人人人| 亚洲一区二区三区中文字幕 | 久久精品99久久久| 在线精品观看国产| 国产精品久久一级| 国产精品一区二区男女羞羞无遮挡| 欧美精品欧美精品系列| 亚洲影视在线播放| 成人高清在线视频| 久久精品免费在线观看| 美女一区二区三区在线观看| 欧美人牲a欧美精品| 亚洲影视资源网| 92精品国产成人观看免费| 国产三级精品在线| 狠狠色丁香久久婷婷综| 日韩欧美区一区二| 蜜乳av一区二区| 日韩一级片在线观看| 天堂成人国产精品一区| 欧美性感一类影片在线播放| 玉足女爽爽91| 91论坛在线播放| 亚洲精品v日韩精品| 欧美优质美女网站| 亚洲自拍另类综合| 欧洲精品在线观看| 亚洲一区二区在线观看视频|