Namensräume
Varianten
Aktionen

thread_create

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 thrd_create( thrd_t *thr, thrd_start_t func, void *arg );
(Seit C11)
Erstellt einen neuen Thread Ausführen der Funktion func. Die Funktion wird als func(arg) aufgerufen .
Original:
Creates a new thread executing the function func. The function is invoked as func(arg).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn dies gelingt, wies das Objekt durch thr wird die Kennung des neuen Thread gesetzt .
Original:
If successful, the object pointed to by thr is set to the identifier of the new thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Der Abschluss dieser Funktion synchronisiert mit dem Beginn des Gewindes .
Original:
The completion of this function synchronizes with the beginning of the thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

thr -
Zeiger auf einen Speicherbereich, um die Kennung des neuen Threads setzen
Original:
pointer to memory location to put the identifier of the new thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
auszuführenden Funktion
Original:
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.
arg -
Argument an die Funktion übergeben
Original:
argument to pass to the function
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 die Schaffung des neuen Thread erfolgreich war. Ansonsten kehrt thrd_nomem wenn es unzureichende Menge an Speicher oder thrd_error wenn ein anderer Fehler aufgetreten .
Original:
thrd_success if the creation of the new thread was successful. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another error occurred.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Notes

Der Faden kennzeichnet kann für neue Themen wiederverwendet werden, wenn der Thread beendet und verbunden oder getrennt .
Original:
The thread identifies may be reused for new threads once the thread has finished and joined or detached.
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

löst einen Faden
Original:
detaches a thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
blockiert, bis ein Thread beendet wird
Original:
blocks until a thread terminates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]