jpman project specific RCS keyword (jpman %Id) is obsolete, after manual entries are stored in freefall CVS repository. This old Id is useless and more worse it confuses users and bug reporters. So, this old Id is removed. Submitted by:jpman project <man-jp@jp.FreeBSD.org>
93 lines
3 KiB
Groff
93 lines
3 KiB
Groff
.\" Copyright (c) 1998 Alex Nash
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" %Id: pthread_rwlock_init.3,v 1.1 1998/09/07 19:01:43 alex Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd August 4, 1998
|
|
.Dt PTHREAD_RWLOCK_INIT 3
|
|
.Os
|
|
.Sh 名称
|
|
.Nm pthread_rwlock_init
|
|
.Nd 読み書きロックの初期化
|
|
.Sh 書式
|
|
.Fd #include <pthread.h>
|
|
.Ft int
|
|
.Fn pthread_rwlock_init "pthread_rwlock_t *lock" "const pthread_rwlockattr_t *attr"
|
|
.Sh 解説
|
|
.Fn pthread_rwlock_init
|
|
関数は、
|
|
.Fa attr
|
|
で指定された属性で読み書きロックを初期化します。
|
|
.Fa attr
|
|
が NULL である場合は、デフォルトの読み書きロック属性が使用されます。
|
|
.Pp
|
|
すでに初期化されているロックで
|
|
.Fn pthread_rwlock_init
|
|
を呼び出すと、結果は不定になります。
|
|
.Sh 戻り値
|
|
問題がない場合、
|
|
.Fn pthread_rwlock_init
|
|
関数はゼロを戻します。問題がある場合は、そのエラーを示すエラー番号を戻します。
|
|
.Sh 関連項目
|
|
.Xr pthread_rwlock_destroy 3 ,
|
|
.Xr pthread_rwlockattr_init 3 ,
|
|
.Xr pthread_rwlockattr_setpshared 3
|
|
.Sh 規格
|
|
.Fn pthread_rwlock_init
|
|
関数は、
|
|
.St -susv2
|
|
に準拠する見込みです。
|
|
.Pp
|
|
.Sh エラー
|
|
.Fn pthread_rwlock_init
|
|
関数は、以下のような場合にエラーとなります。
|
|
.Bl -tag -width Er
|
|
.It Bq Er EAGAIN
|
|
ロックの初期化に必要なリソース ( メモリ以外 ) がシステムで不足している場合。
|
|
.It Bq Er ENOMEM
|
|
メモリが不足しているためにロックを初期化できない場合。
|
|
.It Bq Er EPERM
|
|
オペレーションを実行するための十分な権利が呼び出し側にない場合。
|
|
.El
|
|
.Pp
|
|
.Fn pthread_rwlock_init
|
|
関数は、以下のような場合にエラーになる場合があります。
|
|
.Bl -tag -width Er
|
|
.It Bq Er EBUSY
|
|
以前に初期化されたが破壊されていない読み書きロック
|
|
.Fa lock
|
|
で参照されるオブジェクトをさらに初期化しようとする動きが、システムによって
|
|
検出された場合。
|
|
.It Bq Er EINVAL
|
|
.Fa attr
|
|
で指定された値が正しくない場合。
|
|
.El
|
|
.Sh 歴史
|
|
.Fn pthread_rwlock_init
|
|
関数は、
|
|
.Fx 3.0
|
|
に追加されました。
|
|
.Sh バグ
|
|
PTHREAD_PROCESS_SHARED 属性はサポートされていません。
|