mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
Toolchain+Userland: Enable TLS for x86_64
This is not technically a toolchain change, but it does require rebuilding the toolchain for x86_64 (and just that).
This commit is contained in:
parent
371c852fc0
commit
e1ff30a360
4 changed files with 5 additions and 27 deletions
|
@ -26,10 +26,7 @@ struct SpecificTable {
|
|||
|
||||
static KeyTable s_keys;
|
||||
|
||||
# ifndef X86_64_NO_TLS
|
||||
__thread
|
||||
# endif
|
||||
SpecificTable t_specifics;
|
||||
__thread SpecificTable t_specifics;
|
||||
|
||||
int __pthread_key_create(pthread_key_t* key, KeyDestructor destructor)
|
||||
{
|
||||
|
|
|
@ -11,16 +11,8 @@
|
|||
#include <string.h>
|
||||
|
||||
// FIXME: use thread_local and a String once TLS works
|
||||
#ifndef X86_64_NO_TLS
|
||||
__thread
|
||||
#endif
|
||||
char* s_dlerror_text
|
||||
= NULL;
|
||||
#ifndef X86_64_NO_TLS
|
||||
__thread
|
||||
#endif
|
||||
bool s_dlerror_retrieved
|
||||
= false;
|
||||
__thread char* s_dlerror_text = NULL;
|
||||
__thread bool s_dlerror_retrieved = false;
|
||||
|
||||
static void store_error(const String& error)
|
||||
{
|
||||
|
|
|
@ -33,14 +33,8 @@ static constexpr size_t required_stack_alignment = 4 * MiB;
|
|||
static constexpr size_t highest_reasonable_guard_size = 32 * PAGE_SIZE;
|
||||
static constexpr size_t highest_reasonable_stack_size = 8 * MiB; // That's the default in Ubuntu?
|
||||
|
||||
#ifndef X86_64_NO_TLS
|
||||
__thread
|
||||
#endif
|
||||
void* s_stack_location;
|
||||
#ifndef X86_64_NO_TLS
|
||||
__thread
|
||||
#endif
|
||||
size_t s_stack_size;
|
||||
__thread void* s_stack_location;
|
||||
__thread size_t s_stack_size;
|
||||
|
||||
#define __RETURN_PTHREAD_ERROR(rc) \
|
||||
return ((rc) < 0 ? -(rc) : 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue