cnd_init

Defined in header <threads.h> int cnd_init( cnd_t* cond ); (since C11) Initializes new condition variable. The object pointed to by cond will be set to value that identifies the condition variable. Parameters cond - pointer to a variable to store identifier of the condition variable to Return value thrd_success if the condition variable was successfully created. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another er

abs

Defined in header <stdlib.h> int abs( int n ); long labs( long n ); long long llabs( long long n ); (since C99) Defined in header <inttypes.h> intmax_t imaxabs( intmax_t n ); (since C99) Computes the absolute value of an integer number. The behavior is undefined if the result cannot be represented by the return type. Parameters n - integer value Return value The absolute value of n (i.e. |n|), if it is representable.

_Alignof operator

Queries the alignment requirement of its operand type. Syntax _Alignof( type-name ) (since C11) This operator is typically used through the convenience macro alignof, which is provided in the header stdalign.h. Explanation Returns the alignment requirement of the type named by type-name. If type-name is an array type, the result is the alignment requirement of the array element type. The type-name cannot be function type or an incomplete type. The result is an integer constant of

timespec

Defined in header <time.h> struct timespec; (since C11) Structure holding an interval broken down into seconds and nanoseconds. Member objects time_t tv_sec whole seconds – >= 0 long tv_nsec nanoseconds – [0, 999999999] References C11 standard (ISO/IEC 9899:2011): 7.27.1/3 Components of time (p: 388) See also timespec_get (since C11) returns the calendar time based on a given time base (function) tm calendar time type (struct)

mtx_plain

Defined in header <threads.h> enum { mtx_plain = /* unspecified */, mtx_recursive = /* unspecified */, mtx_timed = /* unspecified */ }; (since C11) When passed to mtx_init, identifies the type of a mutex to create. Constant Explanation mtx_plain plain mutex mtx_recursive recursive mutex mtx_timed timed mutex References C11 standard (ISO/IEC 9899:2011): 7.26.1/5 mtx_plain, mtx_recursive, mtx_timed (p: 377) See also mtx_init (C11)

if statement

Conditionally executes code. Used where code needs to be executed only if some condition is true. Syntax if ( expression ) statement_true (1) if ( expression ) statement_true else statement_false (2) Explanation expression must be an expression of any scalar type. If expression compares not equal to the integer zero, statement_true is executed. In the form (2), if expression compares equal to the integer zero, statement_false is executed. As with all other selection and ite

Phases of translation

The C source file is processed by the compiler as if the following phases take place, in this exact order. Actual implementation may combine these actions or process them differently as long as the behavior is the same. Phase 1 1) The individual bytes of the source code file (which is generally a text file in some multibyte encoding such as UTF-8) are mapped, in implementation defined manner, to the characters of the source character set. In particular, OS-dependent end-of-line indicators a

Preprocessor

The preprocessor is executed at translation phase 4, before the compilation. The result of preprocessing is single file which is then passed to the actual compiler. Directives The preprocessing directives control the behavior of the preprocessor. Each directive occupies one line and has the following format: # character preprocessing instruction (one of define, undef, include, if, ifdef, ifndef, else, elif, endif, line, error, pragma) [1] arguments (depends on the instruction) line bre

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

Type-generic math

The header <tgmath.h> includes the headers <math.h> and <complex.h> and defines several type-generic macros that determine which real or, when applicable, complex function to call based on the types of the arguments. For each macro, the parameters whose corresponding real type in the unsuffixed math.h function is double are known as generic parameters (for example, both parameters of pow are generic parameters, but only the first parameter of scalbn is a generic parameter). Wh