cnd_wait
De cppreference.com
| Definido en el archivo de encabezado <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.
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.
You can help to correct and verify the translation. Click here for instructions.
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. |
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.
You can help to correct and verify the translation. Click here for instructions.
