Kore
Loading...
Searching...
No Matches
threadlocal.h File Reference

Provides storage-slots for thread-specific data. More...

#include <kinc/global.h>
#include <kinc/backend/threadlocal.h>

Go to the source code of this file.

Data Structures

struct  kinc_thread_local

Typedefs

typedef struct kinc_thread_local kinc_thread_local_t

Functions

KINC_FUNC void kinc_thread_local_init (kinc_thread_local_t *local)
 Initializes a thread-specific storage-slot.
KINC_FUNC void kinc_thread_local_destroy (kinc_thread_local_t *local)
 Destroys a storage-slot.
KINC_FUNC void * kinc_thread_local_get (kinc_thread_local_t *local)
 Gets the data in the storage-slot.
KINC_FUNC void kinc_thread_local_set (kinc_thread_local_t *local, void *data)
 Sets the data in the storage-slot.

Detailed Description

Provides storage-slots for thread-specific data.

Function Documentation

◆ kinc_thread_local_destroy()

KINC_FUNC void kinc_thread_local_destroy ( kinc_thread_local_t * local)

Destroys a storage-slot.

Parameters
localThe storage-slot to destroy

◆ kinc_thread_local_get()

KINC_FUNC void * kinc_thread_local_get ( kinc_thread_local_t * local)

Gets the data in the storage-slot.

Parameters
localThe slot to query

◆ kinc_thread_local_init()

KINC_FUNC void kinc_thread_local_init ( kinc_thread_local_t * local)

Initializes a thread-specific storage-slot.

Parameters
localThe storage-slot to initialize

◆ kinc_thread_local_set()

KINC_FUNC void kinc_thread_local_set ( kinc_thread_local_t * local,
void * data )

Sets the data in the storage-slot.

Parameters
localThe slot to put the data into
dataThe data to put in the slot