Namensräume
Varianten
Aktionen

thread_sleep

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_sleep( const struct timespec* time_point,
                struct timespec* remaining );
(Seit C11)
Blockiert die Ausführung des aktuellen Threads für mindestens bis die TIME_UTC basierte Zeitpunkt, auf den time_point erreicht wurde .
Original:
Blocks the execution of the current thread for at least until the TIME_UTC based time point pointed to by time_point has been reached.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Der Schlaf kann früher wieder aufzunehmen, wenn ein Signal, das nicht ignoriert wird, erhalten. In einem solchen Fall, wenn remaining nicht NULL wird die verbleibende Zeitdauer in den Gegenstand, auf den durch remaining gespeichert .
Original:
The sleep may resume earlier if a signal that is not ignored is received. In such case, if remaining is not NULL, the remaining time duration is stored into the object pointed to by remaining.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Parameter

time_point -
Zeiger auf den Zeitpunkt, bis zu schlafen
Original:
pointer to the time point to sleep until
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remaining -
Zeiger auf das Objekt, um die verbleibende Zeit auf Unterbrechung setzen. NULL kann, in welchem ​​Fall es ignoriert wird
Original:
pointer to the object to put the remaining time on interruption. May be NULL, in which case it is ignored
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

0 über erfolgreiche Schlaf, -1 wenn ein Interrupt aufgetreten ist, anderen negativen Wert, wenn ein Fehler aufgetreten ist .
Original:
0 on successful sleep, -1 if an interrupt occurred, other negative value if an 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] Siehe auch

yields the current time slice
(Funktion) [edit]