mqueue.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _MQUEUE_H
  2. #define _MQUEUE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_size_t
  8. #define __NEED_ssize_t
  9. #define __NEED_pthread_attr_t
  10. #define __NEED_time_t
  11. #define __NEED_struct_timespec
  12. #include <bits/alltypes.h>
  13. typedef int mqd_t;
  14. struct mq_attr {
  15. long mq_flags, mq_maxmsg, mq_msgsize, mq_curmsgs, __unused[4];
  16. };
  17. struct sigevent;
  18. int mq_close(mqd_t);
  19. int mq_getattr(mqd_t, struct mq_attr *);
  20. int mq_notify(mqd_t, const struct sigevent *);
  21. mqd_t mq_open(const char *, int, ...);
  22. ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
  23. int mq_send(mqd_t, const char *, size_t, unsigned);
  24. int mq_setattr(mqd_t, const struct mq_attr *__restrict, struct mq_attr *__restrict);
  25. ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, const struct timespec *__restrict);
  26. int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
  27. int mq_unlink(const char *);
  28. #if _REDIR_TIME64
  29. __REDIR(mq_timedreceive, __mq_timedreceive_time64);
  30. __REDIR(mq_timedsend, __mq_timedsend_time64);
  31. #endif
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif