mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
eliminate costly tricks to avoid TLS access for current locale state
the code being removed used atomics to track whether any threads might
be using a locale other than the current global locale, and whether
any threads might have abstract 8-bit (non-UTF-8) LC_CTYPE active, a
feature which was never committed (still pending). the motivations
were to support early execution prior to setup of the thread pointer,
to partially support systems (ancient kernels) where thread pointer
setup is not possible, and to avoid high performance cost on archs
where accessing the thread pointer may be very slow.
since commit 19a1fe670a
, the thread
pointer is always available, so these hacks are no longer needed.
removing them greatly simplifies the affected code.
This commit is contained in:
@ -23,8 +23,6 @@ struct __libc {
|
||||
volatile int ofl_lock[2];
|
||||
size_t tls_size;
|
||||
size_t page_size;
|
||||
volatile int uselocale_cnt;
|
||||
volatile int bytelocale_cnt_minus_1;
|
||||
struct __locale_struct global_locale;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user