Skip to content

Commit b7cf2c2

Browse files
pevikwangli5665
authored andcommitted
lapi/tls.h: Cleanup ifdefs
fe24196 added .supported_archs into clone10. Therefore there is no need to keep architecture check also in lapi/tls.h. Moreover "Unsupported architecture for TLS" was misleading as it looked as a missing arch support in kernel, but it's our allocate_tls_area() implementation which does support only 3 architectures. Signed-off-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Li Wang <liwang@redhat.com> Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
1 parent 1840ee2 commit b7cf2c2

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

include/lapi/tls.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,16 @@ static inline void *allocate_tls_area(void)
5252

5353
static inline void init_tls(void)
5454
{
55-
#if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
5655
tls_ptr = allocate_tls_area();
57-
#else
58-
tst_brk(TCONF, "Unsupported architecture for TLS");
59-
#endif
6056
}
6157

6258
static inline void free_tls(void)
6359
{
6460
usleep(10000);
65-
#if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
6661
if (tls_ptr) {
6762
free(tls_ptr);
6863
tls_ptr = NULL;
6964
}
70-
#endif
7165
}
7266

7367
#endif /* LAPI_TLS_H__ */

0 commit comments

Comments
 (0)