Espacios de nombres
Variantes
Acciones

mtx_init

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 mtx_init( mtx_t* mutex, int type );
(desde C11)
Crea un nuevo objeto mutex con type. El objeto al que apunta mutex se establece en un identificador de la exclusión mutua de nueva creación .
Original:
Creates a new mutex object with type. The object pointed to by mutex is set to an identifier of the newly created mutex.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
type debe tener uno de los siguientes valores:
Original:
type must have one of the following values:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • mtx_plain - un simple, no recursiva exclusión mutua se crea .
    Original:
    mtx_plain - a simple, non-recursive mutex is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_timed - un mutex no recursiva, que soporta de tiempo de espera, se crea .
    Original:
    mtx_timed - a non-recursive mutex, that supports timeout, is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_plain | mtx_recursive - un mutex recursivo se crea .
    Original:
    mtx_plain | mtx_recursive - a recursive mutex is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_timed | mtx_recursive - un mutex recursivo, que admite tiempo de espera, se crea .
    Original:
    mtx_timed | mtx_recursive - a recursive mutex, that supports timeout, is created.
    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

mutex -
puntero a la exclusión mutua para inicializar
Original:
pointer to the mutex to initialize
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
type -
el tipo de la exclusión mutua
Original:
the type of the mutex
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.