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

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

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

Go to the source code of this file.

Data Structures

struct  kore_thread_local

Typedefs

typedef struct kore_thread_local kore_thread_local

Functions

KORE_FUNC void kore_thread_local_init (kore_thread_local *local)
 Initializes a thread-specific storage-slot.
KORE_FUNC void kore_thread_local_destroy (kore_thread_local *local)
 Destroys a storage-slot.
KORE_FUNC void * kore_thread_local_get (kore_thread_local *local)
 Gets the data in the storage-slot.
KORE_FUNC void kore_thread_local_set (kore_thread_local *local, void *data)
 Sets the data in the storage-slot.

Detailed Description

Provides storage-slots for thread-specific data.

Function Documentation

◆ kore_thread_local_destroy()

KORE_FUNC void kore_thread_local_destroy ( kore_thread_local * local)

Destroys a storage-slot.

Parameters
localThe storage-slot to destroy

◆ kore_thread_local_get()

KORE_FUNC void * kore_thread_local_get ( kore_thread_local * local)

Gets the data in the storage-slot.

Parameters
localThe slot to query

◆ kore_thread_local_init()

KORE_FUNC void kore_thread_local_init ( kore_thread_local * local)

Initializes a thread-specific storage-slot.

Parameters
localThe storage-slot to initialize

◆ kore_thread_local_set()

KORE_FUNC void kore_thread_local_set ( kore_thread_local * 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