msq.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Copyright (C) 1995-2021 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. /* Define options for message queue functions. */
  23. #define MSG_NOERROR 010000 /* no error if message is too big */
  24. #ifdef __USE_GNU
  25. # define MSG_EXCEPT 020000 /* recv any msg except of specified type */
  26. # define MSG_COPY 040000 /* copy (not remove) all queue messages */
  27. #endif
  28. #ifdef __USE_MISC
  29. # define msg_cbytes __msg_cbytes
  30. /* ipcs ctl commands */
  31. # define MSG_STAT 11
  32. # define MSG_INFO 12
  33. # define MSG_STAT_ANY 13
  34. /* buffer for msgctl calls IPC_INFO, MSG_INFO */
  35. struct msginfo
  36. {
  37. int msgpool;
  38. int msgmap;
  39. int msgmax;
  40. int msgmnb;
  41. int msgmni;
  42. int msgssz;
  43. int msgtql;
  44. unsigned short int msgseg;
  45. };
  46. #endif /* __USE_MISC */