Namensräume
Varianten
Aktionen

mtx_init

Aus cppreference.com
< c‎ | thread

 
 
Thema Support-Bibliothek
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.
Gegenseitigen Ausschluss
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.
Rufen Sie einmal
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.
Zustand Variablen
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-lokalen Speicher
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 );
(Seit C11)
Erstellt ein neues Mutex Objekt mit type. Das Objekt, auf das mutex ist mit einer Kennung des neu geschaffenen Mutex gesetzt .
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 muss einer der folgenden Werte:
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 - eine einfache, nicht-rekursive Mutex wird erstellt .
    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 - eine nicht-rekursive Mutex, das Timeout unterstützt wird erstellt .
    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 - eine rekursive Mutex wird erstellt .
    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 - eine rekursive Mutex, das Timeout unterstützt wird erstellt .
    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.

[Bearbeiten] Parameter

mutex -
Zeiger auf den Mutex zu initialisieren
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 -
der Typ des Mutex
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.

[Bearbeiten] Rückgabewert

thrd_success wenn erfolgreich, thrd_error sonst .
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.