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

VxWorks

开发平台:

C/C++

  1. /* qFifoLib.h - fifo queue header file */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 02c,22sep92,rrr  added support for c++
  7. 02b,19jul92,pme  made qFifoRemove return STATUS.
  8. 02a,04jul92,jcf  cleaned up.
  9. 01e,26may92,rrr  the tree shuffle
  10. 01d,04oct91,rrr  passed through the ansification filter
  11.   -changed VOID to void
  12.   -changed copyright notice
  13. 01c,05oct90,shl  added ANSI function prototypes.
  14.                  made #endif ANSI style.
  15.  added copyright notice.
  16. 01b,26jun90,jcf  fixed FIFO_KEY definitions so priority 0 doesn't add at head.
  17.  removed definition of Q_CLASS.
  18. 01a,22oct89,jcf  written.
  19. */
  20. #ifndef __INCqFifoLibh
  21. #define __INCqFifoLibh
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #include "vxWorks.h"
  26. #include "qClass.h"
  27. #include "dllLib.h"
  28. /* fifo key defines */
  29. #define FIFO_KEY_HEAD -1 /* put at head of queue */
  30. #define FIFO_KEY_TAIL 0 /* put at tail of q (any != -1) */
  31. /* HIDDEN */
  32. typedef DL_LIST Q_FIFO_HEAD; /* Q_FIFO_HEAD */
  33. typedef DL_NODE Q_FIFO_NODE; /* Q_FIFO_NODE */
  34. /* END HIDDEN */
  35. /* function declarations */
  36. #if defined(__STDC__) || defined(__cplusplus)
  37. extern Q_FIFO_HEAD * qFifoCreate (void);
  38. extern Q_FIFO_NODE * qFifoGet (Q_FIFO_HEAD *pQFifoHead);
  39. extern STATUS  qFifoDelete (Q_FIFO_HEAD *pQFifoHead);
  40. extern STATUS  qFifoInit (Q_FIFO_HEAD *pQFifoHead);
  41. extern int  qFifoInfo (Q_FIFO_HEAD *pQFifoHead, int nodeArray [],
  42.        int maxNodes);
  43. extern void  qFifoPut (Q_FIFO_HEAD *pQFifoHead,
  44.   Q_FIFO_NODE *pQFifoNode, ULONG key);
  45. extern STATUS  qFifoRemove (Q_FIFO_HEAD *pQFifoHead,
  46.      Q_FIFO_NODE *pQFifoNode);
  47. extern Q_FIFO_NODE * qFifoEach (Q_FIFO_HEAD *pQHead, FUNCPTR routine, int
  48.    routineArg);
  49. #else /* __STDC__ */
  50. extern Q_FIFO_HEAD * qFifoCreate ();
  51. extern Q_FIFO_NODE * qFifoEach ();
  52. extern Q_FIFO_NODE * qFifoGet ();
  53. extern STATUS    qFifoDelete ();
  54. extern STATUS  qFifoInit ();
  55. extern int  qFifoInfo ();
  56. extern void  qFifoPut ();
  57. extern STATUS  qFifoRemove ();
  58. #endif /* __STDC__ */
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif /* __INCqFifoLibh */