2 .\" Hey Emacs! This file is -*- nroff -*- source.
4 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
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.
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.
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
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
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
30 .TH MQ_SEND 3 2010-09-20 "Linux" "Linux Programmer's Manual"
32 mq_send, mq_timedsend \- ¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë
35 .B #include <mqueue.h>
37 .BI "int mq_send(mqd_t " mqdes ", const char *" msg_ptr ,
38 .BI " size_t " msg_len ", unsigned " msg_prio );
41 .B #include <mqueue.h>
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 );
48 \fI\-lrt\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
52 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
53 .RB ( feature_test_macros (7)
59 _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
66 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤Ë
68 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤òÄɲ乤롣
72 ¤¬»Ø¤¹¥á¥Ã¥»¡¼¥¸¤ÎŤµ¤ò¼¨¤¹¡£¤³¤ÎŤµ¤Ï¥¥å¡¼¤Î
74 °À°Ê²¼¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
75 Ťµ¤¬ 0 ¤Î¥á¥Ã¥»¡¼¥¸¤âǧ¤á¤é¤ì¤Æ¤¤¤ë¡£
78 °ú¤¿ô¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤹ¤ëÉé¤Ç¤Ê¤¤À°¿ô¤Ç¤¢¤ë¡£
79 ¥á¥Ã¥»¡¼¥¸¤ÏÍ¥ÀèÅ٤ι߽ç¤Ç¥¥å¡¼¤Ë³ÊǼ¤µ¤ì¡¢Æ±¤¸Í¥ÀèÅ٤ο·¤·¤¤¥á¥Ã¥»¡¼¥¸¤Ï
80 Ʊ¤¸Í¥ÀèÅ٤θŤ¤¥á¥Ã¥»¡¼¥¸¤Î¸å¤í¤Ë³ÊǼ¤µ¤ì¤ë¡£
82 ¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤¬¤¹¤Ç¤Ë°ìÇդξì¹ç
83 (¤¹¤Ê¤ï¤Á¡¢¥¥å¡¼¤ËÆþ¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¿ô¤¬¥¥å¡¼¤Î
85 °À¤ÈÅù¤·¤¤¾ì¹ç)¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
87 ¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤ò¥¥å¡¼¥¤¥ó¥°¤¹¤ë¤Î¤Ë½½Ê¬¤Ê¶õ´Ö¤¬¤Ç¤¤ë¤«¡¢
88 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤ë¤Þ¤Ç¡¢Ää»ß (block) ¤¹¤ë¡£
89 ¥á¥Ã¥»¡¼¥¸¥¥å¡¼µ½Ò (message queue description) ¤Ç
91 ¥Õ¥é¥°¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
100 ¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¤¬¡¢
101 ¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤¬°ìÇդǡ¢¥á¥Ã¥»¡¼¥¸¥¥å¡¼µ½Ò¤Ç
103 ¥Õ¥é¥°¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¡¢¤³¤Î¸Æ¤Ó½Ð¤·¤¬Ää»ß¤¹¤ë»þ´Ö¤Î¾å¸Â¤ò
105 ¤¬»Ø¤¹¹½Â¤ÂΤǻØÄꤹ¤ëÅÀ¤¬°Û¤Ê¤ë¡£¤³¤Î¾å¸Â¤Ï¡¢¥¿¥¤¥à¥¢¥¦¥È¤Î»þ¹ï¤ò
106 »þ¹ïµª¸µ (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤Î·Ð²á»þ´Ö
107 (ÉäȥʥÎÉäÎÁÈ) ¤Ç»ØÄꤹ¤ë¡£¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤Ï°Ê²¼¤Î¹½Â¤ÂΤǻØÄꤹ¤ë:
112 time_t tv_sec; /* ÉÃ */
113 long tv_nsec; /* ¥Ê¥ÎÉà */
118 ¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤¬°ìÇդǡ¢´Ø¿ô¸Æ¤Ó½Ð¤·»þ¤Ë¤¹¤Ç¤Ë¥¿¥¤¥à¥¢¥¦¥È»þ¹ï¤¬
128 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
130 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
136 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥¥å¡¼µ½Ò¤Ç
138 ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤¿¡£
142 ¤Ç»ØÄꤵ¤ì¤¿µ½Ò»Ò¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
145 ´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤êÃæÃǤµ¤ì¤¿¡£
150 ´Ø¿ô¸Æ¤Ó½Ð¤·¤ÏÄä»ß¤¹¤ë¤Ï¤º¤Ç¤¢¤Ã¤¿¤¬¡¢
158 ¤¬ 0 ̤Ëþ¤« 1,000,000,000 ¤è¤êÂ礤¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
164 °À¤è¤ê¤âÂ礤«¤Ã¤¿¡£
167 ¥á¥Ã¥»¡¼¥¸¤¬Å¾Á÷¤µ¤ì¤ëÁ°¤Ë´Ø¿ô¸Æ¤Ó½Ð¤·¤¬¥¿¥¤¥à¥¢¥¦¥È¤·¤¿¡£
173 ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë¡£
177 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£