event/cnxk: fix clang build on Arm
[dpdk.git] / examples / performance-thread / common / lthread_tls.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015 Intel Corporation
3  */
4
5 #ifndef LTHREAD_TLS_H_
6 #define LTHREAD_TLS_H_
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 #include "lthread_api.h"
13
14 #define RTE_PER_LTHREAD_SECTION_SIZE \
15 (&__stop_per_lt - &__start_per_lt)
16
17 struct lthread_key {
18         tls_destructor_func destructor;
19 };
20
21 struct lthread_tls {
22         void *data[LTHREAD_MAX_KEYS];
23         int  nb_keys_inuse;
24         struct lthread_sched *root_sched;
25 };
26
27 void _lthread_tls_destroy(struct lthread *lt);
28 void _lthread_key_pool_init(void);
29 void _lthread_tls_alloc(struct lthread *lt);
30
31 #ifdef __cplusplus
32 }
33 #endif
34
35 #endif                          /* LTHREAD_TLS_H_ */