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

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

?? wdlib.c

?? vxwork源代碼
?? 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一区二区三区免费野_久草精品视频
免费成人av在线| 中文字幕日韩欧美一区二区三区| 午夜亚洲福利老司机| 欧美三区免费完整视频在线观看| 一二三区精品视频| 337p亚洲精品色噜噜| 毛片av一区二区三区| 2022国产精品视频| av在线不卡免费看| 午夜精品久久久久影视| 欧美一级日韩不卡播放免费| 国产麻豆欧美日韩一区| 最新国产成人在线观看| 欧美无人高清视频在线观看| 日韩电影在线一区| 国产欧美精品区一区二区三区 | 亚洲另类一区二区| 欧美日韩精品欧美日韩精品一| 美女免费视频一区二区| 国产欧美精品一区| 在线免费观看视频一区| 老司机免费视频一区二区| 亚洲国产成人私人影院tom| 在线免费观看日韩欧美| 麻豆精品久久久| 国产精品久久久久久一区二区三区| 99国产精品久久| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美国产激情二区三区| 欧美日韩中文另类| 丁香亚洲综合激情啪啪综合| 亚洲妇熟xx妇色黄| 中文字幕乱码久久午夜不卡| 在线播放91灌醉迷j高跟美女| 国产麻豆精品在线| 香蕉成人伊视频在线观看| 国产欧美精品国产国产专区| 欧美性xxxxxxxx| 国产传媒久久文化传媒| 亚洲影院理伦片| 中文字幕欧美区| 日韩一区二区在线免费观看| 日本韩国欧美在线| 国产成人av影院| 日韩高清在线观看| 亚洲欧美日韩在线| 久久久亚洲高清| 欧美一区二区三区在线电影| a4yy欧美一区二区三区| 国产精品资源网| 美腿丝袜一区二区三区| 一区二区三区鲁丝不卡| 国产精品色呦呦| 久久综合九色综合欧美98| 欧美伦理视频网站| 日本高清不卡在线观看| 成人av在线资源网站| 国产真实乱对白精彩久久| 午夜精品在线视频一区| 亚洲激情校园春色| 国产精品美女久久久久久| 久久人人97超碰com| 欧美刺激午夜性久久久久久久| 欧美色精品在线视频| 色乱码一区二区三区88| av在线这里只有精品| av男人天堂一区| 成人精品一区二区三区四区| 国产·精品毛片| 国产成人av在线影院| 国产精品一级黄| 丁香婷婷综合色啪| 国产成人亚洲综合色影视| 国内成+人亚洲+欧美+综合在线| 男男gaygay亚洲| 蜜桃在线一区二区三区| 免费观看91视频大全| 奇米888四色在线精品| 日韩高清不卡一区二区| 日本不卡一区二区三区| 蜜桃av噜噜一区| 久久99蜜桃精品| 国产精品中文有码| 成人精品国产一区二区4080| 99精品视频一区二区三区| 色综合久久久久综合体| 97超碰欧美中文字幕| 91丝袜美女网| 欧美日韩中文字幕一区| 欧美一区二区三区在| 日韩精品一区二区三区三区免费 | 亚洲成av人片一区二区梦乃| 亚洲gay无套男同| 日本中文一区二区三区| 日韩国产高清影视| 美女mm1313爽爽久久久蜜臀| 久久精品国产精品亚洲综合| 国产寡妇亲子伦一区二区| 国产.欧美.日韩| 一本色道久久综合精品竹菊| 欧美色国产精品| 欧美电影免费观看高清完整版在线 | 天天影视色香欲综合网老头| 日本成人在线网站| 国产米奇在线777精品观看| av网站免费线看精品| 欧美片在线播放| 久久影视一区二区| 最新热久久免费视频| 爽好多水快深点欧美视频| 精品一区二区久久久| 成人高清av在线| 欧美日韩国产中文| 久久精品亚洲精品国产欧美kt∨ | 欧美在线观看一二区| 日韩欧美亚洲国产另类| 国产精品成人免费精品自在线观看| 夜色激情一区二区| 国产精品 日产精品 欧美精品| 99re这里只有精品视频首页| 日韩欧美一二三区| 亚洲一级在线观看| 国产一区二三区| 欧美专区亚洲专区| 久久久久久久久97黄色工厂| 亚洲精品国产无天堂网2021| 另类小说图片综合网| 91丨九色丨黑人外教| 欧美一二三四区在线| 亚洲人吸女人奶水| 激情久久久久久久久久久久久久久久| 97久久精品人人澡人人爽| 精品三级在线观看| 一区二区三区四区亚洲| 国产精品亚洲第一区在线暖暖韩国| 在线观看av不卡| 国产精品天干天干在线综合| 喷水一区二区三区| 在线精品国精品国产尤物884a| 精品乱码亚洲一区二区不卡| 亚洲最大的成人av| 成人午夜激情片| 精品国产伦一区二区三区观看方式| 亚洲综合在线五月| 成人99免费视频| 日韩欧美中文字幕精品| 一区二区三区成人在线视频| 国产成人av电影在线| 日韩欧美国产综合一区| 亚洲午夜免费视频| av一区二区三区黑人| 国产欧美精品一区| 国产精品综合二区| 久久久久青草大香线综合精品| 日韩精品成人一区二区三区| 欧美网站一区二区| 一区二区久久久久久| 99久久99精品久久久久久| 国产欧美精品国产国产专区| 国产一区不卡视频| 久久嫩草精品久久久精品| 麻豆视频观看网址久久| 日韩三级在线免费观看| 午夜视频在线观看一区二区| 欧美丝袜自拍制服另类| 亚洲国产成人av| 欧美老女人在线| 婷婷激情综合网| 欧美剧情电影在线观看完整版免费励志电影| 亚洲欧美色综合| 91蝌蚪porny九色| 亚洲精品videosex极品| 91在线小视频| 亚洲综合色成人| 欧美视频第二页| 日本成人在线一区| 日韩精品一区二区三区swag| 久久不见久久见中文字幕免费| 精品理论电影在线观看 | 成人精品高清在线| 亚洲欧洲99久久| 日本大香伊一区二区三区| 亚洲宅男天堂在线观看无病毒| 欧美日韩国产综合一区二区| 日本成人在线看| 国产亚洲欧美中文| 91在线一区二区| 婷婷亚洲久悠悠色悠在线播放| 日韩欧美国产综合| 成人午夜伦理影院| 一区二区三区欧美激情| 在线播放国产精品二区一二区四区 | 一区二区三区中文字幕精品精品| 欧美综合在线视频| 美国十次综合导航| 国产精品精品国产色婷婷| 91美女视频网站| 免费美女久久99| 亚洲国产激情av| 欧美高清你懂得|