Namensräume
Varianten
Aktionen

mtx_lock

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_lock( mtx_t* mutex );
(Seit C11)
Blockiert den aktuellen Thread, bis der Mutex, auf die mutex gesperrt ist .
Original:
Blocks the current thread until the mutex pointed to by mutex is locked.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Verhalten ist undefiniert, wenn der aktuelle Thread hat bereits den Mutex gesperrt und der Mutex ist nicht rekursiv .
Original:
The behavior is undefined if the current thread has already locked the mutex and the mutex is not recursive.
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 sperren
Original:
pointer to the mutex to lock
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.

[Bearbeiten] Siehe auch

Blöcke bis sperrt ein Mutex oder mal aus
Original:
blocks until locks a mutex or times out
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
sperrt ein Mutex oder kehrt, ohne zu blockieren, wenn bereits gesperrt
Original:
locks a mutex or returns without blocking if already locked
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
entsperrt eine Mutex
Original:
unlocks a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]