tss_create — create a thread-specific storage key
tss_create creates a key holding a separate pointer value for each thread. Check the result before using the key and plan how resources will be released.
CKTIS / C
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
tss_create creates a key holding a separate pointer value for each thread. Check the result before using the key and plan how resources will be released.
tss_delete releases resources for a thread-specific storage key, but does not invoke destructors or automatically free the pointed-to data.
tss_get reads the pointer stored under a thread-specific storage key for the calling thread.
tss_set stores a pointer under a thread-specific storage key for the current thread and returns an operation status.
ungetc pushes a character back for another input read without modifying the file. Portable code can rely on space for one character.
The va_arg macro from <stdarg.h> reads the next argument in a function's ... portion and advances va_list state.
va_copy initializes independent va_list state at the source's current position, allowing separate reads of the same arguments.
va_end from <stdarg.h> finishes using a va_list. Each va_start or va_copy requires a matching va_end in the same function.
The va_start macro from <stdarg.h> initializes a va_list for reading arguments passed through an ellipsis. In C23, calling va_start(ap) is sufficient.
vfprintf writes formatted data to a FILE stream, taking arguments from a va_list rather than a variable argument list.
vprintf writes formatted text to stdout using arguments from a va_list. It supports custom output functions that accept a variable number of arguments.
vsnprintf formats arguments supplied through va_list. It limits writes to the buffer capacity, while its returned length lets you detect truncated output.
vsprintf writes formatted text into a buffer, obtaining arguments from a va_list. It takes no buffer size.
wcrtomb encodes one wchar_t according to LC_CTYPE, preserving conversion state in mbstate_t.
wcscmp compares null-terminated wchar_t strings; the sign of its result matters, not its exact value.
wcscpy copies a wchar_t string including its terminator. The destination must be large enough, and the copied regions must not overlap.
wcslen from <wchar.h> returns the number of wchar_t elements before the first null wide character, excluding that terminator.
wcsncmp compares at most n wchar_t elements. Its result describes ordering or equality of the compared portion, not necessarily entire strings.
wcsncpy copies wchar_t elements, padding short results with zeros but not guaranteeing string termination.
wcsstr finds the first occurrence of a wide substring. It returns a pointer to the match, or NULL when no match exists.
The <assert.h> header provides assert for checking program assumptions; NDEBUG disables these checks.
The <complex.h> header provides macros and functions for complex numbers: constructing values and reading their real and imaginary components.
The <ctype.h> header provides character-category tests and case conversion with a restricted argument domain.
The <errno.h> header provides errno and error-code macros. Interpret them according to the called function's contract.