Index: libc/src/threads/linux/thread_utils.h =================================================================== --- libc/src/threads/linux/thread_utils.h +++ libc/src/threads/linux/thread_utils.h @@ -9,9 +9,14 @@ #ifndef LLVM_LIBC_SRC_THREADS_LINUX_THREAD_UTILS_H #define LLVM_LIBC_SRC_THREADS_LINUX_THREAD_UTILS_H +#include "include/threads.h" + +#include #include -using FutexData = _Atomic uint32_t; +using FutexData = atomic_uint_least32_t; +static_assert(sizeof(FutexData) == sizeof(thrd_t::__clear_tid), + "FutexData must be the same size as thrd_t::__clear_tid"); struct ThreadParams { static constexpr uintptr_t DefaultStackSize = 1 << 15; // 32 KB