12#ifndef __OSDEP_KTLS_H__
13#define __OSDEP_KTLS_H__
21static const unsigned int OSDEP_KTLS_KEY_MAX =
sizeof(((
thread_t *) NULL)->unk_0x34) / 4 - 1;
int osdep_ktls_init_self(void)
Initialize the TLS container on the current thread.
int osdep_ktls_set_self(unsigned int key, void *value)
Store a value in the TLS slot on the current thread.
int osdep_ktls_init(thread_t *thr)
Initialize the TLS container on a specific thread.
int osdep_ktls_free_self(unsigned int key)
Free memory previously allocated by osdep_ktls_alloc().
void ** osdep_ktls_get(thread_t *thr, unsigned int key)
Get the pointer to the TLS slot on the thread descriptor.
void * osdep_ktls_getvalue_self(unsigned int key)
Get the value stored in a TLS slot of the current thread.
void * osdep_ktls_alloc(thread_t *thr, unsigned int key, size_t bytes)
Allocate memory and store the resulting pointer in the TLS slot.
void * osdep_ktls_getvalue(thread_t *thr, unsigned int key)
Get the value stored in the TLS slot on the thread descriptor.
int osdep_ktls_set(thread_t *thr, unsigned int key, void *value)
Store a value in the TLS slot.
void ** osdep_ktls_get_self(unsigned int key)
Get the pointer to the TLS slot on the current thread.
int osdep_ktls_free(thread_t *thr, unsigned int key)
Free memory previously allocated by osdep_ktls_alloc().
void * osdep_ktls_alloc_self(unsigned int key, size_t bytes)
Allocate memory and store the resulting pointer in a TLS slot of the current thread.
Thread descriptor structure.
Definition threading.h:117