名前空間
変種
操作

mtx_lock

提供: cppreference.com
< c‎ | thread

 
 
スレッドのサポートライブラリ
スレッド
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
相互排除
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
一度呼び出します
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件変数
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
スレッドローカルストレージ
Original:
Thread-local storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Defined in header <threads.h>
int mtx_lock( mtx_t* mutex );
(C11以来)
現在のスレッドのブロックミューテックスがmutexによって指されるまではロックされています.
Original:
Blocks the current thread until the mutex pointed to by mutex is locked.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
現在のスレッドが既にミューテックスをロックしているミューテックスとは、再帰的でない場合、動作は未定義です.
Original:
The behavior is undefined if the current thread has already locked the mutex and the mutex is not recursive.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

mutex -
ロックするmutexへのポインタ
Original:
pointer to the mutex to lock
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

thrd_success成功した場合、thrd_errorその他のとき.
Original:
thrd_success if successful, thrd_error otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] も参照してください

ロックアウトミューテックスまたはタイムアウトするまでブロックします
Original:
blocks until locks a mutex or times out
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
既にロックされている場合はブロックせずに、ミューテックスをロックするか、または返します
Original:
locks a mutex or returns without blocking if already locked
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
ミューテックスのロックを解除します
Original:
unlocks a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]