<!DOCTYPE html PUBLIC "‐//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">     <html
xmlns="http://www.w3.org/1999/xhtml"> <head>
    <link            rel="stylesheet"             type="text/css"
href="../../../style.css" title="style" />
    <link  rel="stylesheet"  type="text/css"  href="../style.css"
title="style" />
    <meta             http‐equiv="content‐type"              con‐
tent="text/html;charset=utf‐8" />

    <title>mqueue.h.0p ‐ Linux manual page</title> </head>

<body>

<div        class="page‐top"><a       id="top_of_page"></a></div>
<!‐‐%%%TOP_BAR%%%‐‐> <!‐‐%%%PAGE_START%%%‐‐>

<table class="sec‐table"> <tr>
    <td>
        <p class="section‐dir"> <a href="#PROLOG">PROLOG</a> | <a
href="#NAME">NAME</a>  |  <a  href="#SYNOPSIS">SYNOPSIS</a>  | <a
href="#DESCRIPTION">DESCRIPTION</a> |  <a  href="#APPLICATION_US‐
AGE">APPLICATION&nbsp;USAGE</a>   |  <a  href="#RATIONALE">RATIO‐
NALE</a>   |   <a    href="#FUTURE_DIRECTIONS">FUTURE&nbsp;DIREC‐
TIONS</a>    |   <a   href="#SEE_ALSO">SEE&nbsp;ALSO</a>   |   <a
href="#COPYRIGHT">COPYRIGHT</a>
        </p>
    </td>
    <td class="search‐box">
        <div class="man‐search‐box">

            <form                method="get"                 ac‐
tion="http://www.google.com/search">
                <fieldset class="man‐search">
                    <input    type="text"    name="q"   size="10"
maxlength="255" value="" />
                    <input type="hidden"  name="sitesearch"  val‐
ue="man7.org/linux/man‐pages" />
                    <input  type="submit" name="sa" value="Search
online pages" />
                </fieldset>
            </form>

        </div>
    </td>
    <td> </td> </tr> </table>

<pre> <span class="headline">mqueue.h(0P)              POSIX Pro‐
grammer’s  Manual              mqueue.h(0P)</span>  </pre> <h2><a
id="PROLOG" href="#PROLOG"></a>PROLOG  &nbsp; &nbsp; &nbsp;  &nb‐
sp;        <a        href="#top_of_page"><span        class="top‐
link">top</span></a></h2><pre>
       This manual page is part of the POSIX Programmer’s Manual.
The Linux
       implementation of this interface may differ (consult the
       corresponding  Linux  manual page for details of Linux be‐
havior), or
       the interface may not be  implemented  on  Linux.   </pre>
<h2><a id="NAME" href="#NAME"></a>NAME  &nbsp; &nbsp; &nbsp; &nb‐
sp;        <a        href="#top_of_page"><span        class="top‐
link">top</span></a></h2><pre>
       mqueue.h  — message queues (<b>REALTIME</b>) </pre> <h2><a
id="SYNOPSIS" href="#SYNOPSIS"></a>SYNOPSIS  &nbsp; &nbsp; &nbsp;
&nbsp;       <a       href="#top_of_page"><span       class="top‐
link">top</span></a></h2><pre>
       #include &lt;mqueue.h&gt; </pre>  <h2><a  id="DESCRIPTION"
href="#DESCRIPTION"></a>DESCRIPTION   &nbsp; &nbsp; &nbsp; &nbsp;
<a             href="#top_of_page"><span              class="top‐
link">top</span></a></h2><pre>
       The   <i>&lt;mqueue.h&gt;</i>   header  shall  define  the
<b>mqd_t </b>type, which is used for
       message queue descriptors. This is not an array type.

       The  <i>&lt;mqueue.h&gt;</i>  header  shall   define   the
<b>pthread_attr_t</b>, <b>size_t</b>, and
       <b>ssize_t       </b>types       as      described      in
<i>&lt;sys/types.h&gt;</i>.

       The  <i>&lt;mqueue.h&gt;</i>  header  shall   define   the
<b>struct timespec </b>structure as
       described in <i>&lt;time.h&gt;</i>.

       The tag <b>sigevent </b>shall be declared as naming an in‐
complete structure
       type,  the  contents  of  which  are  described   in   the
<i>&lt;signal.h&gt;</i> header.

       The   <i>&lt;mqueue.h&gt;</i>   header  shall  define  the
<b>mq_attr </b>structure, which is
       used in getting and setting the attributes  of  a  message
queue.
       Attributes  are  initially  set  when the message queue is
created. An
       <b>mq_attr </b>structure shall have at least the following
fields:

           <b>long    mq_flags    </b>Message queue flags.
           <b>long    mq_maxmsg   </b>Maximum number of messages.
           <b>long    mq_msgsize  </b>Maximum message size.
           <b>long    mq_curmsgs  </b>Number of messages current‐
ly queued.

       The following shall be declared as functions and may  also
be defined
       as macros. Function prototypes shall be provided.

           <b>int      mq_close(mqd_t);</b>
           <b>int      mq_getattr(mqd_t, struct mq_attr *);</b>
           <b>int       mq_notify(mqd_t,  const  struct  sigevent
*);</b>
           <b>mqd_t    mq_open(const char *, int, ...);</b>
           <b>ssize_t  mq_receive(mqd_t, char *, size_t, unsigned
*);</b>
           <b>int       mq_send(mqd_t,  const char *, size_t, un‐
signed);</b>
           <b>int       mq_setattr(mqd_t,  const  struct  mq_attr
*restrict,</b>
                        <b>struct mq_attr *restrict);</b>
           <b>ssize_t    mq_timedreceive(mqd_t,  char  *restrict,
size_t,</b>
                        <b>unsigned *restrict, const struct time‐
spec *restrict);</b>
           <b>int       mq_timedsend(mqd_t, const char *, size_t,
unsigned,</b>
                        <b>const struct timespec *);</b>
           <b>int      mq_unlink(const char *);</b>

       Inclusion of the <i>&lt;mqueue.h&gt;</i> header  may  make
visible symbols defined
       in   the   headers   <i>&lt;fcntl.h&gt;</i>,   <i>&lt;sig‐
nal.h&gt;</i>, and <i>&lt;time.h&gt;</i>.

       <i>The  following  sections  are  informative.</i>  </pre>
<h2><a  id="APPLICATION_USAGE"  href="#APPLICATION_USAGE"></a>AP‐
PLICATION    USAGE     &nbsp;    &nbsp;    &nbsp;    &nbsp;    <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       None.    </pre>   <h2><a   id="RATIONALE"    href="#RATIO‐
NALE"></a>RATIONALE     &nbsp;    &nbsp;    &nbsp;    &nbsp;   <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       None.   </pre>  <h2><a  id="FUTURE_DIRECTIONS"  href="#FU‐
TURE_DIRECTIONS"></a>FUTURE DIRECTIONS  &nbsp; &nbsp; &nbsp; &nb‐
sp;        <a        href="#top_of_page"><span        class="top‐
link">top</span></a></h2><pre>
       None.    </pre>   <h2><a   id="SEE_ALSO"    href="#SEE_AL‐
SO"></a>SEE    ALSO     &nbsp;    &nbsp;    &nbsp;    &nbsp;   <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       <a    href="../man0/fcntl.h.0p.html">fcntl.h(0p)</a>,   <a
href="../man0/signal.h.0p.html">signal.h(0p)</a>,              <a
href="../man0/sys_types.h.0p.html">sys_types.h(0p)</a>,        <a
href="../man0/time.h.0p.html">time.h(0p)</a>

       The  System  Interfaces   volume   of   POSIX.1‐2008,   <a
href="../man3/mq_close.3p.html">mq_close(3p)</a>,
       <a   href="../man3/mq_getattr.3p.html">mq_getattr(3p)</a>,
<a     href="../man3/mq_notify.3p.html">mq_notify(3p)</a>,     <a
href="../man3/mq_open.3p.html">mq_open(3p)</a>,                <a
href="../man3/mq_receive.3p.html">mq_receive(3p)</a>,
       <a   href="../man3/mq_send.3p.html">mq_send(3p)</a>,    <a
href="../man3/mq_setattr.3p.html">mq_setattr(3p)</a>,          <a
href="../man3/mq_unlink.3p.html">mq_unlink(3p)</a> </pre>  <h2><a
id="COPYRIGHT"   href="#COPYRIGHT"></a>COPYRIGHT   &nbsp;  &nbsp;
&nbsp;   &nbsp;    <a    href="#top_of_page"><span    class="top‐
link">top</span></a></h2><pre>
       Portions  of  this  text  are  reprinted and reproduced in
electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for  Informa‐
tion
       Technology ‐‐ Portable Operating System Interface (POSIX),
The Open
       Group Base Specifications Issue 7, Copyright (C)  2013  by
the
       Institute of Electrical and Electronics Engineers, Inc and
The Open
       Group.  (This is POSIX.1‐2008 with the 2013 Technical Cor‐
rigendum 1
       applied.)  In  the  event  of any discrepancy between this
version and
       the original IEEE and The Open Group Standard, the  origi‐
nal IEEE and
       The Open Group Standard is the referee document. The orig‐
inal
       Standard    can    be    obtained     online     at     <a
href="http://www.unix.org/online.html">http://www.unix.org/on‐
line.html</a> .

       Any typographical or formatting errors that appear in this
page are
       most  likely to have been introduced during the conversion
of the
       source files to man page format. To  report  such  errors,
see
       <a      href="https://www.kernel.org/doc/man‐pages/report‐
ing_bugs.html">https://www.kernel.org/doc/man‐pages/report‐
ing_bugs.html</a> .

<span  class="footline">IEEE/The  Open Group                 2013
mqueue.h(0P)</span> </pre>

<hr class="end‐man‐text" />

<hr class="start‐footer" />

<div class="footer">

<table class="colophon‐table">
    <tr>
    <td class="pub‐info">
        <p>
            HTML rendering created 2019‐08‐02
            by  <a  href="http://man7.org/mtk/index.html">Michael
Kerrisk</a>,
            author of
            <a  href="http://man7.org/tlpi/"><em>The  Linux  Pro‐
gramming Interface</em></a>,
            maintainer of the
            <a href="https://www.kernel.org/doc/man‐pages/">Linux
<em>man‐pages</em> project</a>.
        </p>
        <p>
            For details of in‐depth
            <strong>Linux/UNIX  system programming training cour‐
ses</strong>
            that I teach,  look  <a  href="http://man7.org/train‐
ing/">here</a>.
        </p>
        <p>
            Hosting    by    <a   href="http://www.jambit.com/in‐
dex_en.html">jambit GmbH</a>.
        </p>
        <p>
            <a href="http://validator.w3.org/check?uri=referer">
            <img src="http://www.w3.org/Icons/valid‐xhtml11"
                alt="Valid XHTML 1.1" height="31" width="88" />
            </a>
        </p>
    </td>
    <td class="colophon‐divider">
    </td>
    <td class="tlpi‐cover">
        <a                      href="http://man7.org/tlpi/"><img
src="http://man7.org/tlpi/cover/TLPI‐front‐cover‐vsmall.png"
alt="Cover of TLPI" /></a>
    </td>
    </tr> </table>

</div>

<hr class="end‐footer" />

</body> </html>