名前空間
変種
操作

mtx_trylock

提供: 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_trylock( mtx_t *mutex );
(C11およびそれ以降)
ブロックせずにmutexが指すmutexをロックしようとし.
Original:
Tries to lock the mutex pointed to by mutex without blocking.
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成功した場合は、mutexがすでにロックされているthrd_busy場合、thrd_errorエラーoccurrs IF.
Original:
thrd_success if successful, thrd_busy if the mutex has already been locked, thrd_error if an error occurrs.
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
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
ロックアウトミューテックスまたはタイムアウトするまでブロックします
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:
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]