OSDN Git Service

(split) LDP v3.30, v3.31 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / mq_send.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_SEND 3 2010-09-20 "Linux" "Linux Programmer's Manual"
31 .SH Ì¾Á°
32 mq_send, mq_timedsend \- ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë
33 .SH ½ñ¼°
34 .nf
35 .B #include <mqueue.h>
36 .sp
37 .BI "int mq_send(mqd_t " mqdes ", const 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 "int mq_timedsend(mqd_t " mqdes ", const 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_timedsend ():
58 .RS 4
59 _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
60 .RE
61 .ad
62 .SH ÀâÌÀ
63 .BR mq_send ()
64 ¤Ï¡¢µ­½Ò»Ò
65 .I mqdes
66 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Ë
67 .I msg_ptr
68 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤òÄɲ乤롣
69 .I msg_len
70 °ú¤­¿ô¤Ï¡¢
71 .I msg_ptr
72 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤ÎŤµ¤ò¼¨¤¹¡£¤³¤ÎŤµ¤Ï¥­¥å¡¼¤Î
73 .I mq_msgsize
74 °À­°Ê²¼¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
75 Ťµ¤¬ 0 ¤Î¥á¥Ã¥»¡¼¥¸¤âǧ¤á¤é¤ì¤Æ¤¤¤ë¡£
76
77 .I msg_prio
78 °ú¤­¿ô¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤹ¤ëÉé¤Ç¤Ê¤¤À°¿ô¤Ç¤¢¤ë¡£
79 ¥á¥Ã¥»¡¼¥¸¤ÏÍ¥ÀèÅ٤ι߽ç¤Ç¥­¥å¡¼¤Ë³ÊǼ¤µ¤ì¡¢Æ±¤¸Í¥ÀèÅ٤ο·¤·¤¤¥á¥Ã¥»¡¼¥¸¤Ï
80 Ʊ¤¸Í¥ÀèÅ٤θŤ¤¥á¥Ã¥»¡¼¥¸¤Î¸å¤í¤Ë³ÊǼ¤µ¤ì¤ë¡£
81
82 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬¤¹¤Ç¤Ë°ìÇդξì¹ç
83 (¤¹¤Ê¤ï¤Á¡¢¥­¥å¡¼¤ËÆþ¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¿ô¤¬¥­¥å¡¼¤Î
84 .I mq_maxmsg
85 °À­¤ÈÅù¤·¤¤¾ì¹ç)¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
86 .B mq_send ()
87 ¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ò¥­¥å¡¼¥¤¥ó¥°¤¹¤ë¤Î¤Ë½½Ê¬¤Ê¶õ´Ö¤¬¤Ç¤­¤ë¤«¡¢
88 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤ë¤Þ¤Ç¡¢Ää»ß (block) ¤¹¤ë¡£
89 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò (message queue description) ¤Ç
90 .B O_NONBLOCK
91 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
92 .BR mq_send ()
93 ¤Ï¥¨¥é¡¼
94 .B EAGAIN
95 ¤Ç¤¹¤°¤Ë¼ºÇÔ¤¹¤ë¡£
96
97 .BR mq_timedsend ()
98 ¤Ï
99 .BR mq_send ()
100 ¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¤¬¡¢
101 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬°ìÇդǡ¢¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
102 .B O_NONBLOCK
103 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¡¢¤³¤Î¸Æ¤Ó½Ð¤·¤¬Ää»ß¤¹¤ë»þ´Ö¤Î¾å¸Â¤ò
104 .I abs_timeout
105 ¤¬»Ø¤¹¹½Â¤ÂΤǻØÄꤹ¤ëÅÀ¤¬°Û¤Ê¤ë¡£¤³¤Î¾å¸Â¤Ï¡¢¥¿¥¤¥à¥¢¥¦¥È¤Î»þ¹ï¤ò
106 »þ¹ïµª¸µ (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤Î·Ð²á»þ´Ö
107 (ÉäȥʥÎÉäÎÁÈ) ¤Ç»ØÄꤹ¤ë¡£¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤Ï°Ê²¼¤Î¹½Â¤ÂΤǻØÄꤹ¤ë:
108 .sp
109 .in +4n
110 .nf
111 struct timespec {
112     time_t tv_sec;        /* Éà*/
113     long   tv_nsec;       /* ¥Ê¥ÎÉà*/
114 };
115
116 .fi
117 .in
118 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬°ìÇդǡ¢´Ø¿ô¸Æ¤Ó½Ð¤·»þ¤Ë¤¹¤Ç¤Ë¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤¬
119 ²á¤®¤Æ¤¤¤ë¾ì¹ç¡¢
120 .BR mq_timedsend ()
121 ¤Ï¤¹¤°¤ËÊ֤롣
122 .SH ÊÖ¤êÃÍ
123 À®¸ù¤¹¤ë¤È¡¢
124 .BR mq_send ()
125 ¤È
126 .BR mq_timedsend ()
127 ¤Ï 0 ¤òÊÖ¤¹¡£
128 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
129 .I errno
130 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
131 .SH ¥¨¥é¡¼
132 .TP
133 .B EAGAIN
134 ¥­¥å¡¼¤¬°ìÇդǡ¢¤«¤Ä
135 .I mqdes
136 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
137 .B O_NONBLOCK
138 ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤¿¡£
139 .TP
140 .B EBADF
141 .I mqdes
142 ¤Ç»ØÄꤵ¤ì¤¿µ­½Ò»Ò¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
143 .TP
144 .B EINTR
145 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤¿¡£
146 .BR signal (7)
147 »²¾È¡£
148 .TP
149 .B EINVAL
150 ´Ø¿ô¸Æ¤Ó½Ð¤·¤ÏÄä»ß¤¹¤ë¤Ï¤º¤Ç¤¢¤Ã¤¿¤¬¡¢
151 .I abs_timeout
152 ¤¬ÉÔÀµ¤Ç¤¢¤Ã¤¿¡£
153 .I abs_timeout
154 ¤¬ÉÔÀµ¤È¤Ï¡¢
155 .I tv_sec
156 ¤¬ 0 Ì¤Ëþ¡¢¤â¤·¤¯¤Ï
157 .I tv_nsec
158 ¤¬ 0 Ì¤Ëþ¤« 1,000,000,000 ¤è¤êÂ礭¤¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
159 .TP
160 .B EMSGSIZE
161 .I msg_len
162 ¤¬¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î
163 .I mq_msgsize
164 °À­¤è¤ê¤âÂ礭¤«¤Ã¤¿¡£
165 .TP
166 .B ETIMEDOUT
167 ¥á¥Ã¥»¡¼¥¸¤¬Å¾Á÷¤µ¤ì¤ëÁ°¤Ë´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥¿¥¤¥à¥¢¥¦¥È¤·¤¿¡£
168 .SH ½àµò
169 POSIX.1-2001.
170 .SH Ãí°Õ
171 Linux ¤Ç¤Ï¡¢
172 .BR mq_timedsend ()
173 ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë¡£
174 .BR mq_send ()
175 ¤Ï¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¡¢
176 .BR mq_timedsend ()
177 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
178 .SH ´ØÏ¢¹àÌÜ
179 .BR mq_close (3),
180 .BR mq_getattr (3),
181 .BR mq_notify (3),
182 .BR mq_open (3),
183 .BR mq_receive (3),
184 .BR mq_unlink (3),
185 .BR mq_overview (7),
186 .BR time (7)