📄 mqueue.h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title><mqueue.h></title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="<mqueue.h>"></a> <a name="tag_13_28"></a><!-- <mqueue.h> --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_13_28_01"></a>NAME</h4><blockquote>mqueue.h - message queues (<b>REALTIME</b>)</blockquote><h4><a name="tag_13_28_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><tt><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> #include <mqueue.h> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></div></blockquote><h4><a name="tag_13_28_03"></a>DESCRIPTION</h4><blockquote><p>The <i><mqueue.h></i> header shall define the <b>mqd_t</b> type, which is used for message queue descriptors. This is notan array type.</p><p>The <i><mqueue.h></i> header shall define the <b>sigevent</b> structure (as described in <a href="signal.h.html"><i><signal.h></i></a> ) and the <b>mq_attr</b> structure, which is used in getting and setting the attributesof a message queue. Attributes are initially set when the message queue is created. An <b>mq_attr</b> structure shall have at leastthe following fields:</p><pre><tt>long mq_flags </tt> Message queue flags. <tt>long mq_maxmsg </tt> Maximum number of messages. <tt>long mq_msgsize </tt> Maximum message size. <tt>long mq_curmsgs </tt> Number of messages currently queued. <tt></tt></pre><p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p><pre><tt>int mq_close(mqd_t);int mq_getattr(mqd_t, struct mq_attr *);int mq_notify(mqd_t, const struct sigevent *);mqd_t mq_open(const char *, int, ...);ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);int mq_send(mqd_t, const char *, size_t, unsigned );int mq_setattr(mqd_t, const struct mq_attr *restrict, struct mq_attr *restrict);<sup>[<a href="javascript:open_code('TMO')">TMO</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">ssize_t mq_timedreceive(mqd_t, char *restrict, size_t, unsigned *restrict, const struct timespec *restrict);int mq_timedsend(mqd_t, const char *, size_t, unsigned , const struct timespec *);<img src="../images/opt-end.gif" alt="[Option End]" border="0">int mq_unlink(const char *);</tt></pre><p>Inclusion of the <i><mqueue.h></i> header may make visible symbols defined in the headers <a href="../basedefs/fcntl.h.html"><i><fcntl.h></i></a>, <a href="../basedefs/signal.h.html"><i><signal.h></i></a>, <a href="../basedefs/sys/types.h.html"><i><sys/types.h></i></a>, and <a href="../basedefs/time.h.html"><i><time.h></i></a>.</p></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_13_28_04"></a>APPLICATION USAGE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_13_28_05"></a>RATIONALE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_13_28_06"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_13_28_07"></a>SEE ALSO</h4><blockquote><p><a href="fcntl.h.html"><i><fcntl.h></i></a> , <a href="signal.h.html"><i><signal.h></i></a> , <a href="sys/types.h.html"><i><sys/types.h></i></a> , <a href="time.h.html"><i><time.h></i></a> , the System Interfaces volumeof IEEE Std 1003.1-2001, <a href="../functions/mq_close.html"><i>mq_close</i>()</a>, <a href="../functions/mq_getattr.html"><i>mq_getattr</i>()</a>, <a href="../functions/mq_notify.html"><i>mq_notify</i>()</a>, <a href="../functions/mq_open.html"><i>mq_open</i>()</a>, <a href="../functions/mq_receive.html"><i>mq_receive</i>()</a>, <a href="../functions/mq_send.html"><i>mq_send</i>()</a>, <a href="../functions/mq_setattr.html"><i>mq_setattr</i>()</a>, <a href="../functions/mq_timedreceive.html"><i>mq_timedreceive</i>()</a>, <a href="../functions/mq_timedsend.html"><i>mq_timedsend</i>()</a>, <a href="../functions/mq_unlink.html"><i>mq_unlink</i>()</a></p></blockquote><h4><a name="tag_13_28_08"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 5. Included for alignment with the POSIX Realtime Extension.</p></blockquote><h4><a name="tag_13_28_09"></a>Issue 6</h4><blockquote><p>The <i><mqueue.h></i> header is marked as part of the Message Passing option.</p><p>The <a href="../functions/mq_timedreceive.html"><i>mq_timedreceive</i>()</a> and <a href="../functions/mq_timedsend.html"><i>mq_timedsend</i>()</a> functions are added for alignment withIEEE Std 1003.1d-1999.</p><p>The <b>restrict</b> keyword is added to the prototypes for <a href="../functions/mq_setattr.html"><i>mq_setattr</i>()</a> and <ahref="../functions/mq_timedreceive.html"><i>mq_timedreceive</i>()</a>.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX ® is a registered Trademark of The Open Group.<br>POSIX ® is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -