diff --git a/userspace/libraries/LibC/include/bits/types/uthread.h b/userspace/libraries/LibC/include/bits/types/uthread.h index 9b83d83a..f83b1d4e 100644 --- a/userspace/libraries/LibC/include/bits/types/uthread.h +++ b/userspace/libraries/LibC/include/bits/types/uthread.h @@ -48,19 +48,7 @@ struct uthread uintptr_t dtv[1 + 256]; }; -#if defined(__x86_64__) -#define _get_uthread() ({ \ - struct uthread* _uthread; \ - __asm__ volatile("movq %%fs:0, %0" : "=r"(_uthread)); \ - _uthread; \ - }) -#elif defined(__i686__) -#define _get_uthread() ({ \ - struct uthread* _uthread; \ - __asm__ volatile("movl %%gs:0, %0" : "=r"(_uthread)); \ - _uthread; \ - }) -#endif +#define _get_uthread() ((struct uthread*)__builtin_thread_pointer()) __END_DECLS