Espacios de nombres
Variantes
Acciones

cnd_wait

De cppreference.com
< c‎ | thread

 
 
Tema Biblioteca de ayuda
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.
Exclusión mutua
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.
Llame a la vez
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.
Las variables de condición
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.
Almacenamiento local de subprocesos
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 );
(desde C11)
Atómicamente bloquea el mutex apuntado por mutex y los bloques de la variable condición a la que apunta cond hasta que el flujo se indica mediante cnd_signal o cnd_broadcast. La exclusión mutua se bloquea de nuevo antes de que la función regrese .
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.
El comportamiento no está definido si la exclusión mutua no está bloqueado por el subproceso de llamada .
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.

[editar] Parámetros

cond -
puntero a la variable de estado para bloquear sucesivamente
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 -
puntero a la exclusión mutua para desbloquear durante la duración del bloque
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.

[editar] Valor de retorno

thrd_success de tener éxito, de lo contrario 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.

[editar] Ver también

bloques en una condición variable, con un tiempo de espera
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.

(función) [edit]