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

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

?? wdlib.c

?? vxworks 5.5 kernel code
?? 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一区二区三区免费野_久草精品视频
99精品欧美一区二区蜜桃免费 | 国产精品久久久久9999吃药| 日韩欧美在线综合网| 欧美日韩高清一区二区| 欧美日韩久久久| 欧美一级在线视频| 日韩久久久久久| 久久久影视传媒| 国产精品理论在线观看| 亚洲日本在线视频观看| 亚洲一区在线观看免费| 国产资源在线一区| 丰满亚洲少妇av| av在线播放一区二区三区| aaa亚洲精品一二三区| 99精品久久免费看蜜臀剧情介绍| 色婷婷综合久久久久中文一区二区 | 日韩av不卡一区二区| 开心九九激情九九欧美日韩精美视频电影 | 亚洲欧美日韩在线播放| 51久久夜色精品国产麻豆| 91伊人久久大香线蕉| 国产麻豆精品一区二区| 蜜桃视频一区二区三区在线观看| 亚洲精品视频在线观看网站| 亚洲素人一区二区| 亚洲精品国产一区二区精华液| 成人一道本在线| 日韩经典中文字幕一区| 国产尤物一区二区| 91免费视频网| 91精品国产美女浴室洗澡无遮挡| 精品国产免费人成在线观看| 国产日产精品一区| 亚洲五月六月丁香激情| 美女诱惑一区二区| 99综合影院在线| 欧美日韩大陆一区二区| 26uuu久久综合| 亚洲精品日韩专区silk| 奇米影视一区二区三区| 丰满少妇久久久久久久| 欧美日韩免费高清一区色橹橹 | 日本aⅴ免费视频一区二区三区| 午夜国产不卡在线观看视频| 奇米精品一区二区三区在线观看| 黑人巨大精品欧美黑白配亚洲| 在线一区二区视频| 亚洲精品欧美激情| 中文字幕一区二区三区在线播放| 精品婷婷伊人一区三区三| 国产精品久久一卡二卡| 亚洲欧洲日韩在线| 日韩精品福利网| 国产麻豆精品在线观看| 欧美日韩一区二区电影| 日韩成人午夜精品| 26uuuu精品一区二区| 亚洲福利电影网| 国产久卡久卡久卡久卡视频精品| 欧美午夜片在线观看| 久久精品视频在线免费观看| 一区二区三区四区在线| 亚洲午夜激情网页| 国产精品一二二区| 色婷婷激情综合| 欧美一区二区三区四区高清| 久久久91精品国产一区二区精品| 黄色日韩三级电影| 7777精品伊人久久久大香线蕉经典版下载 | 99精品1区2区| 日韩三区在线观看| 亚洲欧洲国产日韩| 国产成人一区二区精品非洲| 一本久久a久久精品亚洲| 日韩视频在线一区二区| 一区二区免费视频| 国产福利视频一区二区三区| 99久久er热在这里只有精品15 | 一区二区三区中文免费| 亚洲国产精品欧美一二99| 色婷婷综合久久久久中文| 国产精品女上位| 国产精品 日产精品 欧美精品| 欧美日韩成人综合在线一区二区| 亚洲一本大道在线| 欧美丰满一区二区免费视频| 亚洲一区二区av在线| 欧美日本在线视频| 久草精品在线观看| 日韩欧美资源站| 亚洲免费色视频| 久久成人免费日本黄色| 91精彩视频在线| 精品一区免费av| 国产精品国模大尺度视频| 91麻豆精品国产91久久久使用方法| 日韩和欧美一区二区三区| 91激情五月电影| 亚洲四区在线观看| 99精品偷自拍| 亚洲欧美一区二区三区国产精品| 国产激情91久久精品导航| 26uuu久久天堂性欧美| 久久电影网站中文字幕| 欧美一区二区三区在线观看视频| 日韩和欧美的一区| 日韩欧美精品在线视频| 麻豆91精品视频| 日韩免费性生活视频播放| 欧美aaa在线| 欧美sm美女调教| 国产精品一区二区在线观看网站| 26uuu亚洲| 成人午夜精品在线| 亚洲免费在线看| 欧美日韩视频第一区| 午夜欧美2019年伦理| 日韩三级伦理片妻子的秘密按摩| 麻豆久久久久久久| 国产午夜精品美女毛片视频| 成人伦理片在线| ...av二区三区久久精品| 色八戒一区二区三区| 亚洲国产精品久久人人爱| 日韩欧美一区在线| 精彩视频一区二区三区| 中文字幕乱码一区二区免费| 91麻豆文化传媒在线观看| 五月婷婷久久丁香| 国产偷v国产偷v亚洲高清| 91丨九色丨尤物| 天堂在线一区二区| 久久午夜电影网| 91麻豆文化传媒在线观看| 日韩成人一区二区| 欧美国产综合色视频| 欧美丝袜丝nylons| 久久国产剧场电影| 国产精品第四页| 3d成人h动漫网站入口| 高清av一区二区| 亚洲v日本v欧美v久久精品| 精品福利一区二区三区| 色婷婷国产精品久久包臀| 蜜臀av性久久久久蜜臀aⅴ四虎 | 麻豆免费精品视频| 国产精品国产三级国产aⅴ无密码| 在线精品视频免费播放| 狠狠色丁香婷婷综合| 亚洲你懂的在线视频| 欧美一区二区久久久| kk眼镜猥琐国模调教系列一区二区| 亚洲午夜精品一区二区三区他趣| 久久久综合激的五月天| 欧美日韩专区在线| 成人开心网精品视频| 日韩黄色免费电影| 亚洲三级电影网站| 久久综合久久99| 精品视频色一区| www.亚洲免费av| 九一九一国产精品| 亚洲一区二区视频在线观看| 久久久精品tv| 欧美一区二区久久久| 91美女精品福利| 粉嫩aⅴ一区二区三区四区五区| 亚洲成人手机在线| 亚洲人成影院在线观看| 精品国产乱码久久久久久夜甘婷婷| 色欧美88888久久久久久影院| 国产在线国偷精品产拍免费yy | 91蜜桃在线免费视频| 国产乱国产乱300精品| 午夜精品aaa| 亚洲另类在线视频| 国产欧美日韩另类一区| 日韩免费在线观看| 欧美精品乱人伦久久久久久| 91老师片黄在线观看| 国产福利91精品| 国模无码大尺度一区二区三区| 亚洲成av人片在线| 一区二区三区四区精品在线视频| 欧美国产日本视频| 久久精品亚洲精品国产欧美| 日韩精品最新网址| 欧美一区二区三区色| 欧美日韩高清一区二区三区| 欧美在线观看视频在线| 99精品偷自拍| 99久久99久久精品国产片果冻| 国产99精品国产| 国产suv精品一区二区三区| 国内精品第一页| 韩国成人福利片在线播放| 精品亚洲国产成人av制服丝袜| 免费高清成人在线| 久久精品99久久久|