thread_create
Aus cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert 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.
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.
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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten]Siehe auch
(C11) | 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) |
(C11) | 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) |