mtx_timedlock
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <threads.h>
|
||
int mtx_timedlock( mtx_t *restrict mutex, const struct timespec *restrict time_point ); |
(dal C11) | |
Blocca il thread corrente fino a quando il mutex puntato da
mutex è bloccato o fino al punto di base di tempo TIME_UTC puntato da time_point è stato raggiunto.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.
Il comportamento è indefinito se il thread corrente ha già bloccato il mutex e il mutex non è ricorsiva.
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.
Il comportamento è indefinito se il mutex non supporta timeout.
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.
Parametri
| mutex | - | puntatore al mutex da bloccare
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 | - | puntatore per il tempo di timeout di attendere
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. |
Valore di ritorno
thrd_success in caso di successo, thrd_timedout se il tempo di timeout è stato raggiunto prima che il mutex è bloccato, se un thrd_error occurrs errore.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.
Vedi anche
(C11) |
blocchi fino a bloccare un 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. (funzione) |
(C11) |
blocca un mutex o ritorni senza bloccare, se già bloccata 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. (funzione) |
(C11) |
sblocca un 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. (funzione) |