tail head cat sleep
QR code linking to this page

manページ  — PTHREAD_MUTEX_UNLOCK

名称

pthread_mutex_unlock – mutex のロックを解除

内容

ライブラリ

Reentrant C\~Library (libc_r, -lc_r)

書式

#include <pthread.h>

int
pthread_mutex_unlock(pthread_mutex_t *mutex);

解説

現在のスレッドが mutex のロックを保持している場合には、 pthread_mutex_unlock() 関数は、 mutex のロックを解除します。

戻り値

問題がない場合は、 pthread_mutex_unlock() は 0 を返します。 問題がある場合は、そのエラーを示すためにエラー番号が返されます。

エラー

pthread_mutex_trylock() は以下の場合に失敗します。
[EINVAL]
  mutex によって指定された値が無効です。
[EPERM]
  現在のスレッドが mutex のロックを保持していません。

関連項目

pthread_mutex_destroy(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_trylock(3)

規格

pthread_mutex_unlock()IEEE Std 1003.1-96 ("POSIX.1") に適合しています。

PTHREAD_MUTEX_UNLOCK (3) July 30, 1998

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options!
— The Unix Haters' handbook