OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / mq_receive.3
1 '\" t
2 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\"
4 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
27 .\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
29 .\"
30 .TH MQ_RECEIVE 3 2010-09-20 "Linux" "Linux Programmer's Manual"
31 .SH Ì¾Á°
32 mq_receive, mq_timedreceive \- ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤«¤é¥á¥Ã¥»¡¼¥¸¤ò¼õ¿®¤¹¤ë
33 .SH ½ñ¼°
34 .nf
35 .B #include <mqueue.h>
36 .sp
37 .BI "ssize_t mq_receive(mqd_t " mqdes ", char *" msg_ptr ,
38 .BI "                   size_t " msg_len ", unsigned *" msg_prio );
39 .sp
40 .B #include <time.h>
41 .B #include <mqueue.h>
42 .sp
43 .BI "ssize_t mq_timedreceive(mqd_t " mqdes ", char *" msg_ptr ,
44 .BI "                   size_t " msg_len ", unsigned *" msg_prio ,
45 .BI "                   const struct timespec *" abs_timeout );
46 .fi
47 .sp
48 \fI\-lrt\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
49 .sp
50 .ad l
51 .in -4n
52 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
53 .RB ( feature_test_macros (7)
54 »²¾È):
55 .in
56 .sp
57 .BR mq_timedreceive ():
58 .RS 4
59 _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
60 .RE
61 .ad
62 .SH ÀâÌÀ
63 .BR mq_receive ()
64 ¤Ï¡¢µ­½Ò»Ò
65 .I mqdes
66 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤«¤éºÇ¤â¹â¤¤Í¥ÀèÅÙ¤ò»ý¤Ä
67 ºÇ¤â¸Å¤¤¥á¥Ã¥»¡¼¥¸¤òºï½ü¤·¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸¤ò
68 .I msg_ptr
69 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤¹¤ë¡£
70 .I msg_len
71 °ú¤­¿ô¤Ï¡¢
72 .I msg_ptr
73 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤ÎÂ礭¤µ¤ò¼¨¤¹¡£¤³¤ÎÃͤϥ­¥å¡¼¤Î
74 .I mq_msgsize
75 °À­¤è¤ê¤âÂ礭¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤
76 .RB ( mq_getattr (3)
77 »²¾È)¡£
78 .I prio
79 ¤¬ NULL °Ê³°¤Î¾ì¹ç¡¢
80 .I prio
81 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë¼õ¿®¤·¤¿¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤¬³ÊǼ¤µ¤ì¤ë¡£
82
83 ¥­¥å¡¼¤¬¶õ¤Î¾ì¹ç¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
84 .BR mq_receive ()
85 ¤Ï¡¢¿·¤·¤¤¥á¥Ã¥»¡¼¥¸¤¬ÆϤ¯¤«¡¢´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤ê
86 ÃæÃǤµ¤ì¤ë¤Þ¤Ç¡¢Ää»ß (block) ¤¹¤ë¡£
87 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò (message queue description) ¤Ç
88 .B O_NONBLOCK
89 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
90 .BR mq_receive ()
91 ¤Ï¥¨¥é¡¼
92 .B EAGAIN
93 ¤Ç¤¹¤°¤Ë¼ºÇÔ¤¹¤ë¡£
94
95 .BR mq_timedreceive ()
96 ¤Ï
97 .BR mq_receive ()
98 ¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¤¬¡¢
99 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬¶õ¤Ç¡¢¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
100 .B O_NONBLOCK
101 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¡¢¤³¤Î¸Æ¤Ó½Ð¤·¤¬Ää»ß¤¹¤ë»þ´Ö¤Î¾å¸Â¤ò
102 .I abs_timeout
103 ¤¬»Ø¤¹¹½Â¤ÂΤǻØÄꤹ¤ëÅÀ¤¬°Û¤Ê¤ë¡£¤³¤Î¾å¸Â¤Ï¡¢¥¿¥¤¥à¥¢¥¦¥È¤Î»þ¹ï¤ò¡¢
104 »þ¹ïµª¸µ (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤Î·Ð²á»þ´Ö
105 (ÉäȥʥÎÉäÎÁÈ) ¤Ç»ØÄꤹ¤ë¡£¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤Ï°Ê²¼¤Î¹½Â¤ÂΤǻØÄꤹ¤ë:
106 .sp
107 .in +4n
108 .nf
109 struct timespec {
110     time_t tv_sec;        /* Éà*/
111     long   tv_nsec;       /* ¥Ê¥ÎÉà*/
112 };
113
114 .fi
115 .in
116 ¥á¥Ã¥»¡¼¥¸¤¬¥­¥å¡¼¤Ë¤Ê¤¯¡¢´Ø¿ô¸Æ¤Ó½Ð¤·»þ¤Ë¤¹¤Ç¤Ë¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤¬
117 ²á¤®¤Æ¤¤¤ë¾ì¹ç¡¢
118 .BR mq_timedreceive ()
119 ¤Ï¤¹¤°¤ËÊ֤롣
120 .SH ÊÖ¤êÃÍ
121 À®¸ù¤¹¤ë¤È¡¢
122 .BR mq_receive ()
123 ¤È
124 .BR mq_timedreceive ()
125 ¤Ï¼õ¿®¤·¤¿¥á¥Ã¥»¡¼¥¸¤Î¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£
126 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
127 .I errno
128 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
129 .SH ¥¨¥é¡¼
130 .TP
131 .B EAGAIN
132 ¥­¥å¡¼¤¬¶õ¤Ç¡¢¤«¤Ä
133 .I mqdes
134 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
135 .B O_NONBLOCK
136 ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤¿¡£
137 .TP
138 .B EBADF
139 .I mqdes
140 ¤Ç»ØÄꤵ¤ì¤¿µ­½Ò»Ò¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
141 .TP
142 .B EINTR
143 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤¿¡£
144 .BR signal (7)
145 »²¾È¡£
146 .TP
147 .B EINVAL
148 ´Ø¿ô¸Æ¤Ó½Ð¤·¤ÏÄä»ß¤¹¤ë¤Ï¤º¤Ç¤¢¤Ã¤¿¤¬¡¢
149 .I abs_timeout
150 ¤¬ÉÔÀµ¤Ç¤¢¤Ã¤¿¡£
151 .I abs_timeout
152 ¤¬ÉÔÀµ¤È¤Ï¡¢
153 .I tv_sec
154 ¤¬ 0 Ì¤Ëþ¡¢¤â¤·¤¯¤Ï
155 .I tv_nsec
156 ¤¬ 0 Ì¤Ëþ¤« 1,000,000,000 ¤è¤êÂ礭¤¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
157 .TP
158 .B EMSGSIZE
159 .I msg_len
160 ¤¬¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î
161 .I mq_msgsize
162 °À­¤è¤ê¤â¾®¤µ¤«¤Ã¤¿¡£
163 .TP
164 .B ETIMEDOUT
165 ¥á¥Ã¥»¡¼¥¸¤¬Å¾Á÷¤µ¤ì¤ëÁ°¤Ë´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥¿¥¤¥à¥¢¥¦¥È¤·¤¿¡£
166 .SH ½àµò
167 POSIX.1-2001.
168 .SH Ãí°Õ
169 Linux ¤Ç¤Ï¡¢
170 .BR mq_timedreceive ()
171 ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë¡£
172 .BR mq_receive ()
173 ¤Ï¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¡¢
174 .BR mq_timedreceive ()
175 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
176 .SH ´ØÏ¢¹àÌÜ
177 .BR mq_close (3),
178 .BR mq_getattr (3),
179 .BR mq_notify (3),
180 .BR mq_open (3),
181 .BR mq_send (3),
182 .BR mq_unlink (3),
183 .BR feature_test_macros (7),
184 .BR mq_overview (7),
185 .BR time (7)