名前空間
変種
操作

mtx_timedlock

提供: 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.
mtx_init
mtx_lock
mtx_timedlock
mtx_trylock
一度呼び出します
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_timedlock( mtx_t *restrict mutex,
                   const struct timespec *restrict time_point );
(C11およびそれ以降)
現在のスレッドのブロックミューテックスがmutexがロックされているか、またはTIME_UTCベースの時点はtime_pointによって指されるまで達している..指すまで
Original:
Blocks the current thread until the mutex pointed to by mutex is locked or until the TIME_UTC based time point pointed to by time_point has been reached.
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.
ミューテックスがタイムアウトをサポートしていない場合の動作は未定義です.
Original:
The behavior is undefined if the mutex does not support timeout.
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.
time_point -
まで待機するタイムアウト時間を指すポインタです
Original:
pointer to the timeout time to wait until
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_timedoutタイムアウト時間をthrd_errorエラーoccurrs場合には、達していないか.
Original:
thrd_success if successful, thrd_timedout if the timeout time has been reached before the mutex is 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:
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]