32#ifndef _QORE_QORETHREADLOCALSTORAGE_H
34#define _QORE_QORETHREADLOCALSTORAGE_H
39DLLEXPORT
void qore_thread_local_storage_destroy(
void* qtls);
40DLLEXPORT
void qore_thread_local_storage_set(
void* qtls,
void* p);
41DLLEXPORT
void* qore_thread_local_storage_get(
void* qtls);
68 qore_thread_local_storage_destroy(
this);
73 return (T*)qore_thread_local_storage_get(
this);
77 DLLLOCAL
void set(T* ptr) {
78 qore_thread_local_storage_set(
this,
const_cast<void*
>((
const void*)ptr));
provides access to thread-local storage
Definition QoreThreadLocalStorage.h:49
DLLLOCAL void destroy()
destroys the key
Definition QoreThreadLocalStorage.h:67
DLLLOCAL QoreThreadLocalStorage()
creates the key
Definition QoreThreadLocalStorage.h:52
DLLLOCAL void set(T *ptr)
sets the key's value
Definition QoreThreadLocalStorage.h:77
DLLLOCAL T * get()
retrieves the key's value
Definition QoreThreadLocalStorage.h:72
DLLLOCAL void create()
creates the key
Definition QoreThreadLocalStorage.h:62
DLLLOCAL ~QoreThreadLocalStorage()
destroys the key
Definition QoreThreadLocalStorage.h:57