Threading Reference
File
XSFoundation/include/XS/Functions/Threading.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2020 - Jean-David Gadina - www.xs-labs.com
Date
Sunday, September 27, 2020
Overview
Threading-related functions
Tasks
XSGetCurrentThreadID
Gets the ID of the current thread
XS_EXPORT uint64_t XSGetCurrentThreadID(
void );
Return value
The ID of the current thread
XSTLSGetValue
Gets the value associated with a TLS key
void * XSTLSGetValue(
XSTLSKey *key );
Parameters
Return value
The associated value
XSTLSKeyCreate
Creates a TLS key
bool XSTLSKeyCreate(
XSTLSKey *key );
Parameters
- key
A pointer to an uninitialized TLS key
Return value
True if the key was successfully created, otherwise false
XSTLSKeyDelete
Deletes a TLS key
void XSTLSKeyDelete(
XSTLSKey *key );
Parameters
- key
A pointer to the TLS key to delete
XSTLSSetValue
Sets the value associated with a TLS key
void XSTLSSetValue(
XSTLSKey *key,
void *value,
XSObjectAssociation association );
Parameters
- key
The TLS key
- value
The value to set
- association
The association type to use
See also