mtx_timedlock
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <threads.h>
|
||
int mtx_timedlock( mtx_t *restrict mutex, const struct timespec *restrict time_point ); |
(desde C11) | |
Bloqueia o segmento atual até que o mutex apontado por
mutex está bloqueado ou até o ponto de tempo TIME_UTC baseado apontado por time_point foi atingido.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.
You can help to correct and verify the translation. Click here for instructions.
O comportamento é indefinido se o segmento atual já tenha travado o mutex eo mutex não é recursiva.
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.
You can help to correct and verify the translation. Click here for instructions.
O comportamento é indefinido se o mutex não suporta tempo limite.
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.
You can help to correct and verify the translation. Click here for instructions.
Parâmetros
| mutex | - | ponteiro para o mutex para bloquear
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 | - | ponteiro para o tempo limite de espera até
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. |
Valor de retorno
thrd_success se bem sucedido, thrd_timedout se o tempo limite foi alcançado antes do mutex está bloqueado, thrd_error se um erro ocorreu.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.
You can help to correct and verify the translation. Click here for instructions.
Veja também
(C11) |
bloqueia até que trava um mutex 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. (função) |
(C11) |
trava um mutex ou retorna sem bloquear, se já está bloqueada 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. (função) |
(C11) |
desbloqueia um mutex 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. (função) |