muteki
Loading...
Searching...
No Matches
utls.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
13#ifndef __OSDEP_UTLS_H__
14#define __OSDEP_UTLS_H__
15
16#include <muteki/threading.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
39
48extern void osdep_utls_cinit(void);
49
57extern void osdep_utls_cfini(void);
58
65extern void *osdep_utls_peek(const thread_t *thr);
66
73#ifdef __cplusplus
74} // extern "C"
75#endif
76
77#endif // __OSDEP_UTLS_H__
Native threading API.
Statistics of TLS allocation.
Definition utls.h:25
size_t slots_used
Number of slots used. Only valid when is_initialized is true.
Definition utls.h:33
bool is_initialized
If true, TLS container is initialized.
Definition utls.h:29
size_t slots_allocated
Number of slots already allocated for the container. Only valid when is_initialized is true.
Definition utls.h:37
Thread descriptor structure.
Definition threading.h:117
void osdep_utls_cfini(void)
Manually destroy the UTLS container.
void * osdep_utls_peek(const thread_t *thr)
Get the TLS space by thread descriptor pointer.
void osdep_utls_get_stats(osdep_utls_stats_t *stats)
Get statistics of TLS allocation.
void osdep_utls_cinit(void)
Manually initialize UTLS container.
struct osdep_utls_stats_s osdep_utls_stats_t
Statistics of TLS allocation.