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

VxWorks

开发平台:

C/C++

  1. /* mqueue.h - POSIX message queue library header */
  2. /* Copyright 1984-1999 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01e,22mar99,elg  Erroneous Fix for SPR 20532 (SPR 25989).
  7. 01d,12mar99,elg  include private header to get mqPxLibInit() (SPR 20532).
  8. 01c,19aug96,dbt  added define of MQ_PRIORITY_MAX (SPR #7039).
  9.  updated copyright.
  10. 01b,05jan94,kdl  added modhist, added include of sigevent.h, general cleanup.
  11. 01a,01dec93,rrr  written.
  12. */
  13. #ifndef __INCmqueueh
  14. #define __INCmqueueh
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /* includes */
  19. #include "sigevent.h"
  20. /* defines */
  21. #define MQ_PRIORITY_MAX 31 /* max priority */
  22. /* type defs */
  23. struct mq_attr
  24.     {
  25.     size_t mq_maxmsg;
  26.     size_t mq_msgsize;
  27.     unsigned mq_flags;
  28.     size_t mq_curmsgs;
  29.     };
  30. struct mq_des;
  31. typedef struct mq_des *mqd_t;
  32. /* function declarations */
  33. #if defined(__STDC__) || defined(__cplusplus)
  34. extern mqd_t mq_open (const char *, int, ...);
  35. extern int mq_close (mqd_t);
  36. extern int mq_unlink (const char *);
  37. extern int mq_send (mqd_t, const void *, size_t, int);
  38. extern int mq_receive (mqd_t, void *, size_t, int *);
  39. extern int mq_notify (mqd_t, const struct sigevent *);
  40. extern int mq_setattr (mqd_t, const struct mq_attr *, struct mq_attr *);
  41. extern int mq_getattr (mqd_t, struct mq_attr *);
  42. extern int mqPxLibInit (int);
  43. #else /* __STDC__ */
  44. extern mqd_t mq_open ();
  45. extern int mq_close ();
  46. extern int mq_unlink ();
  47. extern int mq_send ();
  48. extern int mq_receive ();
  49. extern int mq_notify ();
  50. extern int mq_setattr ();
  51. extern int mq_getattr ();
  52. extern int mqPxLibInit ();
  53. #endif /* __STDC__ */
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* INCmqueue.h */