wdLibP.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* wdLibP.h - private watchdog timer library header */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01c,16jan94,c_s  added extern declaration for wdInstClassId.
  7. 01b,22sep92,rrr  added support for c++
  8. 01a,04jul92,jcf  created from v01h wdLib.h.
  9. */
  10. #ifndef __INCwdLibPh
  11. #define __INCwdLibPh
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include "vxWorks.h"
  16. #include "wdLib.h"
  17. #include "classLib.h"
  18. #include "qLib.h"
  19. #include "private/objLibP.h"
  20. /* watchdog status values */
  21. #define WDOG_OUT_OF_Q 0x0 /* valid watchdog not in tick queue */
  22. #define WDOG_IN_Q 0x1 /* valid watchdog in tick queue */
  23. #define WDOG_DEAD 0x2 /* terminated watchdog */
  24. typedef struct wdog /* WDOG */
  25.     {
  26.     OBJ_CORE objCore; /* object management */
  27.     Q_NODE tickNode; /* multi-way queue node for tick queue */
  28.     USHORT status; /* status of watchdog */
  29.     USHORT deferStartCnt; /* number of wdStarts still in work queue */
  30.     FUNCPTR wdRoutine; /* routine to call upon expiration */
  31.     int wdParameter; /* arbitrary parameter to routine */
  32.     } WDOG;
  33. /* variable definitions */
  34. extern CLASS_ID wdClassId; /* watchdog class id */
  35. extern CLASS_ID wdInstClassId; /* watchdog instrumented class id */
  36. /* function declarations */
  37. #if defined(__STDC__) || defined(__cplusplus)
  38. extern STATUS wdInit (WDOG *pWdog);
  39. extern STATUS wdTerminate (WDOG_ID wdId);
  40. extern STATUS wdDestroy (WDOG_ID wdId, BOOL dealloc);
  41. extern void wdTick (void);
  42. #else /* __STDC__ */
  43. extern STATUS wdInit ();
  44. extern STATUS wdTerminate ();
  45. extern STATUS wdDestroy ();
  46. extern void wdTick ();
  47. #endif /* __STDC__ */
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif /* __INCwdLibPh */