1
0

mqueue.h 911 B

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