Namensräume
Varianten
Aktionen

call_once

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.
call_once
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>
void call_once( once_flag* flag, void (*func)(void) );
(Seit C11)
Anrufe funktionieren func genau einmal, auch wenn von mehreren Threads aufgerufen .
Original:
Calls function func exactly once, even if invoked from several threads.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Der Abschluss der Funktion func synchronisiert mit allen vorherigen oder nachfolgenden Aufrufen call_once mit der gleichen flag variable .
Original:
The completion of the function func synchronizes with all previous or subsequent calls to call_once with the same flag variable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Parameter

flag -
Zeiger auf ein Objekt, das zum func sicherzustellen wird nur einmal aufgerufen
Original:
pointer to an object that is used to ensure func is called only once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
die Funktion auszuführen
Original:
the function to execute
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

(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.