OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / mq_getattr.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_GETATTR 3 2010-08-29 "Linux" "Linux Programmer's Manual"
31 .SH Ì¾Á°
32 mq_getattr, mq_setattr \- ¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î°À­¤òÀßÄê/¼èÆÀ¤¹¤ë
33 .SH ½ñ¼°
34 .nf
35 .B #include <mqueue.h>
36 .sp
37 .BI "int mq_getattr(mqd_t " mqdes ", struct mq_attr *" attr );
38
39 .BI "int mq_setattr(mqd_t " mqdes ", struct mq_attr *" newattr ","
40 .BI "                 struct mq_attr *" oldattr );
41 .fi
42 .sp
43 \fI\-lrt\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
44 .SH ÀâÌÀ
45 .BR mq_getattr ()
46 ¤È
47 .BR mq_setattr ()
48 ¤Ï¡¢µ­½Ò»Ò
49 .I mqdes
50 ¤Ç»²¾È¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î°À­¤Î¼èÆÀ¤ÈÊѹ¹¤ò¤½¤ì¤¾¤ì¹Ô¤¦¡£
51
52 .BR mq_getattr ()
53 ¤Ï¡¢
54 .I attr
55 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë
56 .I mq_attr
57 ¹½Â¤ÂΤò³ÊǼ¤·¤ÆÊÖ¤¹¡£¤³¤Î¹½Â¤ÂΤϰʲ¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
58 .in +4n
59 .nf
60
61 struct mq_attr {
62     long mq_flags;       /* ¥Õ¥é¥°: 0 ¤« O_NONBLOCK */
63     long mq_maxmsg;      /* ¥­¥å¡¼¤ÎºÇÂç¥á¥Ã¥»¡¼¥¸¿ô */
64     long mq_msgsize;     /* ºÇÂç¥á¥Ã¥»¡¼¥¸¥µ¥¤¥º (¥Ð¥¤¥Èñ°Ì) */
65     long mq_curmsgs;     /* ¥­¥å¡¼¤Ë¸½ºßÆþ¤Ã¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¿ô */
66 };
67 .fi
68 .in
69 .PP
70 .I mq_flags
71 ¥Õ¥£¡¼¥ë¥É¤Ë¤Ï¡¢¥ª¡¼¥×¥ó¥á¥Ã¥»¡¼¥¸¥­¥å¡¼µ­½Ò (open message queue
72 description) ¤Ë´ØÏ¢ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¥Õ¥é¥°¤¬³ÊǼ¤µ¤ì¤ë¡£
73 ¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï
74 .BR mq_open (3)
75 ¤Ç¥­¥å¡¼¤¬ºîÀ®¤µ¤ì¤ëºÝ¤Ë½é´ü²½¤µ¤ì¤ë¡£
76 ¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ë¸½¤ì¤ë¥Õ¥é¥°¤Ï
77 .B O_NONBLOCK
78 ¤À¤±¤Ç¤¢¤ë¡£
79
80 .I mq_maxmsg
81 ¤È
82 .I mq_msgsize
83 ¥Õ¥£¡¼¥ë¥É¤Ï
84 .BR mq_open (3)
85 ¤Ç¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤¬ºîÀ®¤µ¤ì¤ëºÝ¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£
86 .I mq_maxmsg
87 ¥Õ¥£¡¼¥ë¥É¤Ï¡¢
88 .BR mq_send (3)
89 ¤ò»È¤Ã¤Æ¥­¥å¡¼¤ËÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤ë¥á¥Ã¥»¡¼¥¸¿ô¤Î¾å¸Â¤Ç¤¢¤ë¡£
90 .I mq_msgsize
91 ¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥­¥å¡¼¤ËÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤ë¥á¥Ã¥»¡¼¥¸¤Î
92 ¾å¸Â¥µ¥¤¥º¤Ç¤¢¤ë¡£
93 ¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Ï¤É¤Á¤é¤â 0 ¤è¤êÂ礭¤ÊÃͤǤʤ±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
94 ¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤ËÀßÄê¤Ç¤­¤ëÃͤξå¸Â¤Ï
95 .I /proc
96 ¥Õ¥¡¥¤¥ë¤Ë¤è¤ê·è¤Þ¤ë¡£
97 .I /proc
98 ¥Õ¥¡¥¤¥ë¤Î¾ÜºÙ¤Ï
99 .BR mq_open (3)
100 ¤ËÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¡£
101
102 .I mq_curmsgs
103 ¥Õ¥£¡¼¥ë¥É¤Ï¥­¥å¡¼¤Ë¸½ºß³ÊǼ¤µ¤ì¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¿ô¤òÊÖ¤¹¡£
104
105 .BR mq_setattr ()
106 ¤Ï¡¢
107 .I newattr
108 ¤¬»Ø¤¹
109 .I mq_attr
110 ¹½Â¤ÂΤÇÍ¿¤¨¤é¤ì¤¿¾ðÊó¤ò»È¤Ã¤Æ¡¢¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Î°À­¤òÀßÄꤹ¤ë¡£
111 Êѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë°À­¤Ï¡¢
112 .I mq_flags
113 ¤Î
114 .B O_NONBLOCK
115 ¥Õ¥é¥°¤ÎÀßÄê¤À¤±¤Ç¤¢¤ë¡£
116 .I newattr
117 ¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤Ï̵»ë¤µ¤ì¤ë¡£
118 .I oldattr
119 ¥Õ¥£¡¼¥ë¥É¤¬ NULL °Ê³°¤Î¾ì¹ç¡¢
120 .BR mq_getattr ()
121 ¤¬ÊÖ¤¹¤Î¤ÈƱ¤¸¾ðÊó¤ò³ÊǼ¤·¤¿
122 .I mq_attr
123 ¹½Â¤ÂΤò
124 .I oldattr
125 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤ËÆþ¤ì¤ÆÊÖ¤¹¡£
126 .SH ÊÖ¤êÃÍ
127 À®¸ù¤¹¤ë¤È¡¢
128 .I mq_getattr ()
129 ¤È
130 .I mq_setattr ()
131 ¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
132 .I errno
133 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
134 .SH ¥¨¥é¡¼
135 .TP
136 .B EBADF
137 .I mqdes
138 ¤Ç»ØÄꤵ¤ì¤¿µ­½Ò»Ò¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
139 .TP
140 .B EINVAL
141 .I newattr\->mq_flags
142 ¤Ë
143 .B O_NONBLOCK
144 °Ê³°¤Î¥Ó¥Ã¥È¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤¿¡£
145 .SH ½àµò
146 POSIX.1-2001.
147 .SH Ãí°Õ
148 Linux ¤Ç¤Ï¡¢
149 .BR mq_getattr ()
150 ¤È
151 .BR mq_setattr ()
152 ¤Ï¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¤¢¤ê¡¢
153 .BR mq_getsetattr (2)
154 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
155 .SH ´ØÏ¢¹àÌÜ
156 .BR mq_close (3),
157 .BR mq_notify (3),
158 .BR mq_open (3),
159 .BR mq_receive (3),
160 .BR mq_send (3),
161 .BR mq_unlink (3),
162 .BR mq_overview (7)