Namespace
Varianti

cnd_wait

Da cppreference.com.
< c‎ | thread

 
 
Discussione libreria di supporto
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mutua esclusione
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.
Chiama una volta
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.
Condizioni variabili
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.
Thread-local storage
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 cnd_wait( cnd_t* cond, mtx_t* mutex );
(dal C11)
Atomico blocca il mutex puntato da mutex e blocca sulla variabile condizione a cui punta cond fino a quando il filo è segnalato da cnd_signal o cnd_broadcast. Il mutex è bloccato di nuovo prima la funzione restituisce.
Original:
Atomically locks the mutex pointed to by mutex and blocks on the condition variable pointed to by cond until the thread is signalled by cnd_signal or cnd_broadcast. The mutex is locked again before the function returns.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Il comportamento è indefinito se il mutex non è già bloccato dal thread chiamante.
Original:
The behavior is undefined if the mutex is not already locked by the calling thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Parametri

cond -
puntatore alla condizione variabile di bloccare
Original:
pointer to the condition variable to block on
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mutex -
puntatore al mutex per sbloccare la durata del blocco
Original:
pointer to the mutex to unlock for the duration of the block
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Valore di ritorno

thrd_success caso di successo, altrimenti 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.

[modifica] Vedi anche

blocchi su una variabile di condizione, con un timeout
Original:
blocks on a condition variable, with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [edit]