1
0

msq.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 1995-2026 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <https://www.gnu.org/licenses/>. */
  14. #ifndef _SYS_MSG_H
  15. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  16. #endif
  17. #include <bits/types.h>
  18. /* Types used in the MSQID_DS structure definition. */
  19. typedef __syscall_ulong_t msgqnum_t;
  20. typedef __syscall_ulong_t msglen_t;
  21. #include <bits/types/struct_msqid_ds.h>
  22. #include <bits/types/struct_msqid64_ds.h>
  23. /* Define options for message queue functions. */
  24. #define MSG_NOERROR 010000 /* no error if message is too big */
  25. #ifdef __USE_GNU
  26. # define MSG_EXCEPT 020000 /* recv any msg except of specified type */
  27. # define MSG_COPY 040000 /* copy (not remove) all queue messages */
  28. #endif
  29. #ifdef __USE_MISC
  30. # define msg_cbytes __msg_cbytes
  31. /* ipcs ctl commands */
  32. # define MSG_STAT 11
  33. # define MSG_INFO 12
  34. # define MSG_STAT_ANY 13
  35. /* buffer for msgctl calls IPC_INFO, MSG_INFO */
  36. struct msginfo
  37. {
  38. int msgpool;
  39. int msgmap;
  40. int msgmax;
  41. int msgmnb;
  42. int msgmni;
  43. int msgssz;
  44. int msgtql;
  45. unsigned short int msgseg;
  46. };
  47. #endif /* __USE_MISC */