msg.h 867 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef _SYS_MSG_H
  2. #define _SYS_MSG_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <sys/ipc.h>
  7. #define __NEED_pid_t
  8. #define __NEED_key_t
  9. #define __NEED_time_t
  10. #define __NEED_size_t
  11. #define __NEED_ssize_t
  12. #include <bits/alltypes.h>
  13. typedef unsigned long msgqnum_t;
  14. typedef unsigned long msglen_t;
  15. #include <bits/msg.h>
  16. #define __msg_cbytes msg_cbytes
  17. #define MSG_NOERROR 010000
  18. #define MSG_EXCEPT 020000
  19. #define MSG_STAT 11
  20. #define MSG_INFO 12
  21. struct msginfo {
  22. int msgpool, msgmap, msgmax, msgmnb, msgmni, msgssz, msgtql;
  23. unsigned short msgseg;
  24. };
  25. int msgctl (int, int, struct msqid_ds *);
  26. int msgget (key_t, int);
  27. ssize_t msgrcv (int, void *, size_t, long, int);
  28. int msgsnd (int, const void *, size_t, int);
  29. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  30. struct msgbuf {
  31. long mtype;
  32. char mtext[1];
  33. };
  34. #endif
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif