thrd_join

Defined in header <threads.h> int thrd_join( thrd_t thr, int *res ); (since C11) Blocks the current thread until the thread identified by thr finishes execution. If res is not a null pointer, the result code of the thread is put to the location pointed to by res. The termination of the thread synchronizes-with the completion of this function. The behavior is undefined if the thread was previously detached or joined by another thread. Parameters thr - identifier of t

thrd_yield

Defined in header <threads.h> void thrd_yield(); (since C11) Provides a hint to the implementation to reschedule the execution of threads, allowing other threads to run. Parameters (none). Return value (none). Notes The exact behavior of this function depends on the implementation, in particular on the mechanics of the OS scheduler in use and the state of the system. For example, a first-in-first-out realtime scheduler (SCHED_FIFO in Linux) would suspend the curren

thrd_success

Defined in header <threads.h> enum { thrd_success = /* unspecified */, thrd_nomem = /* unspecified */, thrd_timedout = /* unspecified */, thrd_busy = /* unspecified */, thrd_error = /* unspecified */ }; (since C11) Identifiers a thread error state. Constant Explanation thrd_success indicates successful return value thrd_timedout indicates timed out return value thrd_busy indicates unsuccessful return value due to resource temporary unavail

Thread storage duration

An object whose identifier is declared with the storage-class specifier _Thread_local (since C11) has thread storage duration. Its lifetime is the entire execution of the thread for which it is created, and its stored value is initialized when the thread is started. There is a distinct object per thread, and use of the declared name in an expression refers to the object associated with the thread evaluating the expression. The result of attempting to indirectly access an object with thread stor

thrd_detach

Defined in header <threads.h> int thrd_detach( thrd_t thr ); (since C11) Detaches the thread identified by thr from the current environment. The resources held by the thread will be freed automatically once the thread exits. Parameters thr - identifier of the thread to detach Return value thrd_success if successful, thrd_error otherwise. References C11 standard (ISO/IEC 9899:2011): 7.26.5.3 The thrd_detach function (p: 383-384) See also thrd_join

thrd_current

Defined in header <threads.h> thrd_t thrd_current(); (since C11) Returns the identifier of the calling thread. Parameters (none). Return value The identifier of the calling thread. References C11 standard (ISO/IEC 9899:2011): 7.26.5.2 The thrd_current function (p: 383)

thrd_create

Defined in header <threads.h> int thrd_create( thrd_t *thr, thrd_start_t func, void *arg ); (since C11) Creates a new thread executing the function func. The function is invoked as func(arg). If successful, the object pointed to by thr is set to the identifier of the new thread. The completion of this function synchronizes-with the beginning of the thread. Parameters thr - pointer to memory location to put the identifier of the new thread func - function to ex

thrd_equal

Defined in header <threads.h> int thrd_equal( thrd_t lhs, thrd_t rhs ); (since C11) Checks whether lhs and rhs refer to the same thread. Parameters lhs, rhs - threads to compare Return value Non-zero value if lhs and rhs refer to the same value, ​0​ otherwise. References C11 standard (ISO/IEC 9899:2011): 7.26.5.4 The thrd_equal function (p: 384)

tgamma

Defined in header <math.h> float tgammaf( float arg ); (1) (since C99) double tgamma( double arg ); (2) (since C99) long double tgammal( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define tgamma( arg ) (4) (since C99) 1-3) Computes the gamma function of arg. 4) Type-generic macro: If arg has type long double, tgammal is called. Otherwise, if arg has integer type or the type double, tgamma is called. Otherwise,

system

Defined in header <stdlib.h> int system( const char *command ); Calls the host environment's command processor with command parameter. Returns implementation-defined value (usually the value that the invoked program returns). If command is NULL pointer, checks if host environment has a command processor and returns nonzero value only if it the command processor exists. Parameters command - character string identifying the command to be run in the command processor.