OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[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-02-25 "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 "mqd_t mq_send(mqd_t " mqdes ", const char *" msg_ptr ,
38 .BI "              size_t " msg_len ", unsigned " msg_prio );
39 .sp
40 .B #define _XOPEN_SOURCE 600
41 .B #include <time.h>
42 .B #include <mqueue.h>
43 .sp
44 .BI "mqd_t mq_timedsend(mqd_t " mqdes ", const char *" msg_ptr ,
45 .BI "              size_t " msg_len ", unsigned " msg_prio ,
46 .BI "              const struct timespec *" abs_timeout );
47 .fi
48 .sp
49 \fI\-lrt\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
50 .SH ÀâÌÀ
51 .BR mq_send ()
52 ¤Ï¡¢µ­½Ò»Ò
53 .I mqdes
54 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Ë
55 .I msg_ptr
56 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤òÄɲ乤롣
57 .I msg_len
58 °ú¤­¿ô¤Ï¡¢
59 .I msg_ptr
60 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤ÎŤµ¤ò¼¨¤¹¡£¤³¤ÎŤµ¤Ï¥­¥å¡¼¤Î
61 .I mq_msgsize
62 °À­°Ê²¼¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
63 Ťµ¤¬ 0 ¤Î¥á¥Ã¥»¡¼¥¸¤âǧ¤á¤é¤ì¤Æ¤¤¤ë¡£
64
65 .I msg_prio
66 °ú¤­¿ô¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤹ¤ëÉé¤Ç¤Ê¤¤À°¿ô¤Ç¤¢¤ë¡£
67 ¥á¥Ã¥»¡¼¥¸¤ÏÍ¥ÀèÅ٤ι߽ç¤Ç¥­¥å¡¼¤Ë³ÊǼ¤µ¤ì¡¢Æ±¤¸Í¥ÀèÅ٤ο·¤·¤¤¥á¥Ã¥»¡¼¥¸¤Ï
68 Ʊ¤¸Í¥ÀèÅ٤θŤ¤¥á¥Ã¥»¡¼¥¸¤Î¸å¤í¤Ë³ÊǼ¤µ¤ì¤ë¡£
69
70 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬¤¹¤Ç¤Ë°ìÇդξì¹ç
71 (¤¹¤Ê¤ï¤Á¡¢¥­¥å¡¼¤ËÆþ¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¿ô¤¬¥­¥å¡¼¤Î
72 .I mq_maxmsg
73 °À­¤ÈÅù¤·¤¤¾ì¹ç)¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
74 .B mq_send ()
75 ¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ò¥­¥å¡¼¥¤¥ó¥°¤¹¤ë¤Î¤Ë½½Ê¬¤Ê¶õ´Ö¤¬¤Ç¤­¤ë¤«¡¢
76 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤ë¤Þ¤Ç¡¢Ää»ß (block) ¤¹¤ë¡£
77 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò (message queue description) ¤Ç
78 .B O_NONBLOCK
79 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
80 .BR mq_send ()
81 ¤Ï¥¨¥é¡¼
82 .B EAGAIN
83 ¤Ç¤¹¤°¤Ë¼ºÇÔ¤¹¤ë¡£
84
85 .BR mq_timedsend ()
86 ¤Ï
87 .BR mq_send ()
88 ¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¤¬¡¢
89 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬°ìÇդǡ¢¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
90 .B O_NONBLOCK
91 ¥Õ¥é¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¡¢¤³¤Î¸Æ¤Ó½Ð¤·¤¬Ää»ß¤¹¤ë»þ´Ö¤Î¾å¸Â¤ò
92 .I abs_timeout
93 ¤¬»Ø¤¹¹½Â¤ÂΤǻØÄꤹ¤ëÅÀ¤¬°Û¤Ê¤ë¡£¤³¤Î¾å¸Â¤Ï¡¢¥¿¥¤¥à¥¢¥¦¥È¤Î»þ¹ï¤ò
94 »þ¹ïµª¸µ (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤Î·Ð²á»þ´Ö
95 (ÉäȥʥÎÉäÎÁÈ) ¤Ç»ØÄꤹ¤ë¡£¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤Ï°Ê²¼¤Î¹½Â¤ÂΤǻØÄꤹ¤ë:
96 .sp
97 .in +4n
98 .nf
99 struct timespec {
100     time_t tv_sec;        /* Éà*/
101     long   tv_nsec;       /* ¥Ê¥ÎÉà*/
102 };
103
104 .fi
105 .in
106 ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬°ìÇդǡ¢´Ø¿ô¸Æ¤Ó½Ð¤·»þ¤Ë¤¹¤Ç¤Ë¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤¬
107 ²á¤®¤Æ¤¤¤ë¾ì¹ç¡¢
108 .BR mq_timedsend ()
109 ¤Ï¤¹¤°¤ËÊ֤롣
110 .SH ÊÖ¤êÃÍ
111 À®¸ù¤¹¤ë¤È¡¢
112 .BR mq_send ()
113 ¤È
114 .BR mq_timedsend ()
115 ¤Ï 0 ¤òÊÖ¤¹¡£
116 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
117 .I errno
118 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
119 .SH ¥¨¥é¡¼
120 .TP
121 .B EAGAIN
122 ¥­¥å¡¼¤¬°ìÇդǡ¢¤«¤Ä
123 .I mqdes
124 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò¤Ç
125 .B O_NONBLOCK
126 ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤¿¡£
127 .TP
128 .B EBADF
129 .I mqdes
130 ¤Ç»ØÄꤵ¤ì¤¿µ­½Ò»Ò¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
131 .TP
132 .B EINTR
133 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤¿¡£
134 .BR signal (7)
135 »²¾È¡£
136 .TP
137 .B EINVAL
138 ´Ø¿ô¸Æ¤Ó½Ð¤·¤ÏÄä»ß¤¹¤ë¤Ï¤º¤Ç¤¢¤Ã¤¿¤¬¡¢
139 .I abs_timeout
140 ¤¬ÉÔÀµ¤Ç¤¢¤Ã¤¿¡£
141 .I abs_timeout
142 ¤¬ÉÔÀµ¤È¤Ï¡¢
143 .I tv_sec
144 ¤¬ 0 Ì¤Ëþ¡¢¤â¤·¤¯¤Ï
145 .I tv_nsec
146 ¤¬ 0 Ì¤Ëþ¤« 1,000,000,000 ¤è¤êÂ礭¤¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
147 .TP
148 .B EMSGSIZE
149 .I msg_len
150 ¤¬¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î
151 .I mq_msgsize
152 °À­¤è¤ê¤âÂ礭¤«¤Ã¤¿¡£
153 .TP
154 .B ETIMEDOUT
155 ¥á¥Ã¥»¡¼¥¸¤¬Å¾Á÷¤µ¤ì¤ëÁ°¤Ë´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥¿¥¤¥à¥¢¥¦¥È¤·¤¿¡£
156 .SH ½àµò
157 POSIX.1-2001.
158 .SH Ãí°Õ
159 Linux ¤Ç¤Ï¡¢
160 .BR mq_timedsend ()
161 ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë¡£
162 .BR mq_send ()
163 ¤Ï¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¡¢
164 .BR mq_timedsend ()
165 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
166 .SH ´ØÏ¢¹àÌÜ
167 .BR mq_close (3),
168 .BR mq_getattr (3),
169 .BR mq_notify (3),
170 .BR mq_open (3),
171 .BR mq_receive (3),
172 .BR mq_unlink (3),
173 .BR feature_test_macros (7),
174 .BR mq_overview (7),
175 .BR time (7)