logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

mq_getattr.3p (3162B)


  1. '\" et
  2. .TH MQ_GETATTR "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. mq_getattr
  12. \(em get message queue attributes
  13. (\fBREALTIME\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <mqueue.h>
  18. .P
  19. int mq_getattr(mqd_t \fImqdes\fP, struct mq_attr *\fImqstat\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fImq_getattr\fR()
  24. function shall obtain status information and attributes of the message
  25. queue and the open message queue description associated with the
  26. message queue descriptor.
  27. .P
  28. The
  29. .IR mqdes
  30. argument specifies a message queue descriptor.
  31. .P
  32. The results shall be returned in the
  33. .BR mq_attr
  34. structure referenced by the
  35. .IR mqstat
  36. argument.
  37. .P
  38. Upon return, the following members shall have the values associated
  39. with the open message queue description as set when the message queue
  40. was opened and as modified by subsequent
  41. \fImq_setattr\fR()
  42. calls:
  43. .IR mq_flags .
  44. .P
  45. The following attributes of the message queue shall be returned as set
  46. at message queue creation:
  47. .IR mq_maxmsg ,
  48. .IR mq_msgsize .
  49. .P
  50. Upon return, the following members within the
  51. .BR mq_attr
  52. structure referenced by the
  53. .IR mqstat
  54. argument shall be set to the current state of the message queue:
  55. .IP "\fImq_curmsgs\fP" 10
  56. The number of messages currently on the queue.
  57. .SH "RETURN VALUE"
  58. Upon successful completion, the
  59. \fImq_getattr\fR()
  60. function shall return zero. Otherwise, the function shall return
  61. \-1 and set
  62. .IR errno
  63. to indicate the error.
  64. .SH ERRORS
  65. The
  66. \fImq_getattr\fR()
  67. function may fail if:
  68. .TP
  69. .BR EBADF
  70. The
  71. .IR mqdes
  72. argument is not a valid message queue descriptor.
  73. .LP
  74. .IR "The following sections are informative."
  75. .SH EXAMPLES
  76. See
  77. .IR "\fImq_notify\fR\^(\|)".
  78. .SH "APPLICATION USAGE"
  79. None.
  80. .SH RATIONALE
  81. None.
  82. .SH "FUTURE DIRECTIONS"
  83. None.
  84. .SH "SEE ALSO"
  85. .IR "\fImq_notify\fR\^(\|)",
  86. .IR "\fImq_open\fR\^(\|)",
  87. .IR "\fImq_send\fR\^(\|)",
  88. .IR "\fImq_setattr\fR\^(\|)",
  89. .IR "\fImsgctl\fR\^(\|)",
  90. .IR "\fImsgget\fR\^(\|)",
  91. .IR "\fImsgrcv\fR\^(\|)",
  92. .IR "\fImsgsnd\fR\^(\|)"
  93. .P
  94. The Base Definitions volume of POSIX.1\(hy2017,
  95. .IR "\fB<mqueue.h>\fP"
  96. .\"
  97. .SH COPYRIGHT
  98. Portions of this text are reprinted and reproduced in electronic form
  99. from IEEE Std 1003.1-2017, Standard for Information Technology
  100. -- Portable Operating System Interface (POSIX), The Open Group Base
  101. Specifications Issue 7, 2018 Edition,
  102. Copyright (C) 2018 by the Institute of
  103. Electrical and Electronics Engineers, Inc and The Open Group.
  104. In the event of any discrepancy between this version and the original IEEE and
  105. The Open Group Standard, the original IEEE and The Open Group Standard
  106. is the referee document. The original Standard can be obtained online at
  107. http://www.opengroup.org/unix/online.html .
  108. .PP
  109. Any typographical or formatting errors that appear
  110. in this page are most likely
  111. to have been introduced during the conversion of the source files to
  112. man page format. To report such errors, see
  113. https://www.kernel.org/doc/man-pages/reporting_bugs.html .