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_GETATTR 3 2010-08-29 "Linux" "Linux Programmer's Manual"
32 mq_getattr, mq_setattr \- メッセージキューの属性を設定/取得する
35 .B #include <mqueue.h>
37 .BI "int mq_getattr(mqd_t " mqdes ", struct mq_attr *" attr );
39 .BI "int mq_setattr(mqd_t " mqdes ", struct mq_attr *" newattr ","
40 .BI " struct mq_attr *" oldattr );
50 で参照されるメッセージキューの属性の取得と変更をそれぞれ行う。
57 構造体を格納して返す。この構造体は以下のように定義されている:
62 long mq_flags; /* フラグ: 0 か O_NONBLOCK */
63 long mq_maxmsg; /* キューの最大メッセージ数 */
64 long mq_msgsize; /* 最大メッセージサイズ (バイト単位) */
65 long mq_curmsgs; /* キューに現在入っているメッセージ数 */
71 フィールドには、オープンメッセージキュー記述 (open message queue
72 description) に関連付けられているフラグが格納される。
85 でメッセージキューが作成される際にセットされる。
89 を使ってキューに入れることができるメッセージ数の上限である。
91 フィールドは、キューに入れることができるメッセージの
93 これらのフィールドはどちらも 0 より大きな値でなければならない。
103 フィールドはキューに現在格納されているメッセージ数を返す。
110 構造体で与えられた情報を使って、メッセージキューの属性を設定する。
131 は 0 を返す。エラーの場合、\-1 を返し、
141 .I newattr\->mq_flags
153 .BR mq_getsetattr (2)