OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / mq_send.3
index be812b5..dc9b6ab 100644 (file)
@@ -1,8 +1,7 @@
-'\" t
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
+.\" t
 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
 .\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
 .\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
 .\"
-.TH MQ_SEND 3 2010-09-20 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.TH MQ_SEND 3 2010\-09\-20 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O mq_send, mq_timedsend \- send a message to a message queue
 mq_send, mq_timedsend \- メッセージキューにメッセージを送信する
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.B #include <mqueue.h>
+\fB#include <mqueue.h>\fP
 .sp
-.BI "int mq_send(mqd_t " mqdes ", const char *" msg_ptr ,
-.BI "              size_t " msg_len ", unsigned " msg_prio );
+\fBint mq_send(mqd_t \fP\fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,\fP
+\fB              size_t \fP\fImsg_len\fP\fB, unsigned \fP\fImsg_prio\fP\fB);\fP
 .sp
-.B #include <time.h>
-.B #include <mqueue.h>
+\fB#include <time.h>\fP
+\fB#include <mqueue.h>\fP
 .sp
-.BI "int mq_timedsend(mqd_t " mqdes ", const char *" msg_ptr ,
-.BI "              size_t " msg_len ", unsigned " msg_prio ,
-.BI "              const struct timespec *" abs_timeout );
+\fBint mq_timedsend(mqd_t \fP\fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,\fP
+\fB              size_t \fP\fImsg_len\fP\fB, unsigned \fP\fImsg_prio\fP\fB,\fP
+\fB              const struct timespec *\fP\fIabs_timeout\fP\fB);\fP
 .fi
 .sp
-.\"O Link with \fI\-lrt\fP.
 \fI\-lrt\fP でリンクする。
 .sp
 .ad l
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR mq_timedsend ():
+\fBmq_timedsend\fP():
 .RS 4
 _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
 .RE
 .ad
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O .BR mq_send ()
-.\"O adds the message pointed to by
-.\"O .I msg_ptr
-.\"O to the message queue referred to by the descriptor
-.\"O .IR mqdes .
-.\"O The
-.\"O .I msg_len
-.\"O argument specifies the length of the message pointed to by
-.\"O .IR msg_ptr ;
-.\"O this length must be less than or equal to the queue's
-.\"O .I mq_msgsize
-.\"O attribute.
-.\"O Zero-length messages are allowed.
-.BR mq_send ()
-は、記述子
-.I mqdes
-で参照されるメッセージキューに
-.I msg_ptr
-が指すメッセージを追加する。
-.I msg_len
-引き数は、
-.I msg_ptr
-が指すメッセージの長さを示す。この長さはキューの
-.I mq_msgsize
-属性以下でなければならない。
-長さが 0 のメッセージも認められている。
+\fBmq_send\fP()  は、記述子 \fImqdes\fP で参照されるメッセージキューに \fImsg_ptr\fP が指すメッセージを追加する。
+\fImsg_len\fP 引き数は、 \fImsg_ptr\fP が指すメッセージの長さを示す。この長さはキューの \fImq_msgsize\fP
+属性以下でなければならない。 長さが 0 のメッセージも認められている。
 
-.\"O The
-.\"O .I msg_prio
-.\"O argument is a nonnegative integer that specifies the priority
-.\"O of this message.
-.\"O Messages are placed on the queue in decreasing order of priority,
-.\"O with newer messages of the same priority being placed after
-.\"O older messages with the same priority.
-.I msg_prio
-引き数は、メッセージの優先度を指定する負でない整数である。
-メッセージは優先度の降順でキューに格納され、同じ優先度の新しいメッセージは
-同じ優先度の古いメッセージの後ろに格納される。
+\fImsg_prio\fP 引き数は、メッセージの優先度を指定する負でない整数である。
+メッセージは優先度の降順でキューに格納され、同じ優先度の新しいメッセージは 同じ優先度の古いメッセージの後ろに格納される。
 
-.\"O If the message queue is already full
-.\"O (i.e., the number of messages on the queue equals the queue's
-.\"O .I mq_maxmsg
-.\"O attribute), then, by default,
-.\"O .BR mq_send ()
-.\"O blocks until sufficient space becomes available to allow the message
-.\"O to be queued, or until the call is interrupted by a signal handler.
-.\"O If the
-.\"O .B O_NONBLOCK
-.\"O flag is enabled for the message queue description,
-.\"O then the call instead fails immediately with the error
-.\"O .BR EAGAIN .
-メッセージキューがすでに一杯の場合
-(すなわち、キューに入っているメッセージ数がキューの
-.I mq_maxmsg
-属性と等しい場合)、デフォルトでは、
-.B mq_send ()
-は、メッセージをキューイングするのに十分な空間ができるか、
-関数呼び出しがシグナルハンドラにより中断されるまで、停止 (block) する。
-メッセージキュー記述 (message queue description) で
-.B O_NONBLOCK
-フラグが有効になっている場合は、
-.BR mq_send ()
-はエラー
-.B EAGAIN
-ですぐに失敗する。
+メッセージキューがすでに一杯の場合 (すなわち、キューに入っているメッセージ数がキューの \fImq_maxmsg\fP 属性と等しい場合)、デフォルトでは、
+\fBmq_send ()\fP は、メッセージをキューイングするのに十分な空間ができるか、 関数呼び出しがシグナルハンドラにより中断されるまで、停止
+(block) する。 メッセージキュー記述 (message queue description) で \fBO_NONBLOCK\fP
+フラグが有効になっている場合は、 \fBmq_send\fP()  はエラー \fBEAGAIN\fP ですぐに失敗する。
 
-.\"O .BR mq_timedsend ()
-.\"O behaves just like
-.\"O .BR mq_send (),
-.\"O except that if the queue is full and the
-.\"O .B O_NONBLOCK
-.\"O flag is not enabled for the message queue description, then
-.\"O .I abs_timeout
-.\"O points to a structure which specifies a ceiling on the time for which
-.\"O the call will block.
-.\"O This ceiling is an absolute timeout in seconds and nanoseconds
-.\"O since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), and it is
-.\"O specified in the following structure:
-.BR mq_timedsend ()
-は
-.BR mq_send ()
-と全く同じ動作をするが、
-メッセージキューが一杯で、メッセージキュー記述で
-.B O_NONBLOCK
-フラグが有効になっていない場合に、この呼び出しが停止する時間の上限を
-.I abs_timeout
-が指す構造体で指定する点が異なる。この上限は、タイムアウトの時刻を
-時刻紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの経過時間
-(秒とナノ秒の組) で指定する。タイムアウト時刻は以下の構造体で指定する:
+\fBmq_timedsend\fP()  は \fBmq_send\fP()  と全く同じ動作をするが、 メッセージキューが一杯で、メッセージキュー記述で
+\fBO_NONBLOCK\fP フラグが有効になっていない場合に、この呼び出しが停止する時間の上限を \fIabs_timeout\fP
+が指す構造体で指定する点が異なる。この上限は、タイムアウトの時刻を 時刻紀元 (Epoch; 1970\-01\-01 00:00:00 +0000
+(UTC)) からの経過時間 (秒とナノ秒の組) で指定する。タイムアウト時刻は以下の構造体で指定する:
 .sp
 .in +4n
 .nf
 struct timespec {
-.\"O     time_t tv_sec;        /* seconds */
-.\"O     long   tv_nsec;       /* nanoseconds */
     time_t tv_sec;        /* 秒 */
     long   tv_nsec;       /* ナノ秒 */
 };
 
 .fi
 .in
-.\"O If the message queue is full,
-.\"O and the timeout has already expired by the time of the call,
-.\"O .BR mq_timedsend ()
-.\"O returns immediately.
-メッセージキューが一杯で、関数呼び出し時にすでにタイムアウト時刻が
-過ぎている場合、
-.BR mq_timedsend ()
-はすぐに返る。
-.\"O .SH RETURN VALUE
+メッセージキューが一杯で、関数呼び出し時にすでにタイムアウト時刻が 過ぎている場合、 \fBmq_timedsend\fP()  はすぐに返る。
 .SH 返り値
-.\"O On success,
-.\"O .BR mq_send ()
-.\"O and
-.\"O .BR mq_timedsend ()
-.\"O return zero; on error, \-1 is returned, with
-.\"O .I errno
-.\"O set to indicate the error.
-成功すると、
-.BR mq_send ()
-と
-.BR mq_timedsend ()
-は 0 を返す。
-エラーの場合、\-1 を返し、
-.I errno
+成功すると、 \fBmq_send\fP()  と \fBmq_timedsend\fP()  は 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP
 にエラーを示す値を設定する。
-.\"O .SH ERRORS
 .SH エラー
-.TP
-.B EAGAIN
-.\"O The queue was full, and the
-.\"O .B O_NONBLOCK
-.\"O flag was set for the message queue description referred to by
-.\"O .IR mqdes .
-キューが一杯で、かつ
-.I mqdes
-で参照されるメッセージキュー記述で
-.B O_NONBLOCK
-フラグがセットされていた。
-.TP
-.B EBADF
-.\"O The descriptor specified in
-.\"O .I mqdes
-.\"O was invalid.
-.I mqdes
-で指定された記述子が不正である。
-.TP
-.B EINTR
-.\"O The call was interrupted by a signal handler; see
-.\"O .BR signal (7).
-関数呼び出しがシグナルハンドラにより中断された。
-.BR signal (7)
-参照。
-.TP
-.B EINVAL
-.\"O The call would have blocked, and
-.\"O .I abs_timeout
-.\"O was invalid, either because
-.\"O .I tv_sec
-.\"O was less than zero, or because
-.\"O .I tv_nsec
-.\"O was less than zero or greater than 1000 million.
-関数呼び出しは停止するはずであったが、
-.I abs_timeout
-が不正であった。
-.I abs_timeout
-が不正とは、
-.I tv_sec
-が 0 未満、もしくは
-.I tv_nsec
-が 0 未満か 1,000,000,000 より大きい、ということである。
-.TP
-.B EMSGSIZE
-.\"O .I msg_len
-.\"O was greater than the
-.\"O .I mq_msgsize
-.\"O attribute of the message queue.
-.I msg_len
-がメッセージキューの
-.I mq_msgsize
-属性よりも大きかった。
-.TP
-.B ETIMEDOUT
-.\"O The call timed out before a message could be transferred.
+.TP 
+\fBEAGAIN\fP
+キューが一杯で、かつ \fImqdes\fP で参照されるメッセージキュー記述で \fBO_NONBLOCK\fP フラグがセットされていた。
+.TP 
+\fBEBADF\fP
+\fImqdes\fP で指定された記述子が不正である。
+.TP 
+\fBEINTR\fP
+関数呼び出しがシグナルハンドラにより中断された。 \fBsignal\fP(7)  参照。
+.TP 
+\fBEINVAL\fP
+関数呼び出しは停止するはずであったが、 \fIabs_timeout\fP が不正であった。 \fIabs_timeout\fP が不正とは、 \fItv_sec\fP
+が 0 未満、もしくは \fItv_nsec\fP が 0 未満か 1,000,000,000 より大きい、ということである。
+.TP 
+\fBEMSGSIZE\fP
+\fImsg_len\fP がメッセージキューの \fImq_msgsize\fP 属性よりも大きかった。
+.TP 
+\fBETIMEDOUT\fP
 メッセージが転送される前に関数呼び出しがタイムアウトした。
-.\"O .SH CONFORMING TO
 .SH 準拠
-POSIX.1-2001.
-.\"O .SH NOTES
+POSIX.1\-2001.
 .SH 注意
-.\"O On Linux,
-.\"O .BR mq_timedsend ()
-.\"O is a system call, and
-.\"O .BR mq_send ()
-.\"O is a library function layered on top of that system call.
-Linux では、
-.BR mq_timedsend ()
-はシステムコールである。
-.BR mq_send ()
-はライブラリ関数で、
-.BR mq_timedsend ()
-システムコールを用いて実装されている。
-.\"O .SH "SEE ALSO"
+Linux では、 \fBmq_timedsend\fP()  はシステムコールである。 \fBmq_send\fP()  はライブラリ関数で、
+\fBmq_timedsend\fP()  システムコールを用いて実装されている。
 .SH 関連項目
-.BR mq_close (3),
-.BR mq_getattr (3),
-.BR mq_notify (3),
-.BR mq_open (3),
-.BR mq_receive (3),
-.BR mq_unlink (3),
-.BR mq_overview (7),
-.BR time (7)
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3),
+\fBmq_receive\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。