Version 2.0.0-0

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
Includes

Overview

Threading-related functions

Tasks

XSGetCurrentThreadID Top

Gets the ID of the current thread

XS_EXPORT uint64_t XSGetCurrentThreadID( void );

Return value

The ID of the current thread

XSTLSGetValue Top

Gets the value associated with a TLS key

void * XSTLSGetValue( XSTLSKey *key );

Parameters
  • key
    The TLS key
Return value

The associated value

XSTLSKeyCreate Top

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 Top

Deletes a TLS key

void XSTLSKeyDelete( XSTLSKey *key );

Parameters
  • key
    A pointer to the TLS key to delete

XSTLSSetValue Top

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