diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-20 22:36:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-22 20:35:40 +0200 |
commit | 4c3023bc803012656cf45749960282351efc8020 (patch) | |
tree | 979feef511fde3dbe564e5362e89a2e8b793909e /ldso/include/ldsodefs.h | |
parent | 51f9b66d2fee1c7c1088b548751ac64131220b6e (diff) |
xtensa: add support for NPTL
Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl
Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'ldso/include/ldsodefs.h')
-rw-r--r-- | ldso/include/ldsodefs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ldso/include/ldsodefs.h b/ldso/include/ldsodefs.h index 4063d00f4..f17ac0ca0 100644 --- a/ldso/include/ldsodefs.h +++ b/ldso/include/ldsodefs.h @@ -62,13 +62,18 @@ extern void _dl_get_tls_static_info (size_t *sizep, size_t *alignp) extern void _dl_allocate_static_tls (struct link_map *map) internal_function attribute_hidden; +extern int _dl_try_allocate_static_tls (struct link_map* map) + internal_function attribute_hidden; /* Taken from glibc/elf/dl-reloc.c */ #define CHECK_STATIC_TLS(sym_map) \ do { \ - if (unlikely((sym_map)->l_tls_offset == NO_TLS_OFFSET)) \ + if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET, 0)) \ _dl_allocate_static_tls (sym_map); \ } while (0) +#define TRY_STATIC_TLS(sym_map) \ + (__builtin_expect ((sym_map)->l_tls_offset != NO_TLS_OFFSET, 1) \ + || _dl_try_allocate_static_tls (sym_map) == 0) /* These are internal entry points to the two halves of _dl_allocate_tls, only used within rtld.c itself at startup time. */ |