[libc-commits] [libc] [libc] inline fast path of callonce (PR #96226)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Thu Jun 20 13:17:56 PDT 2024
================
@@ -9,13 +9,38 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_THREADS_CALLONCE_H
#define LLVM_LIBC_SRC___SUPPORT_THREADS_CALLONCE_H
+#include "src/__support/macros/optimization.h"
+
+#ifdef __linux__
+#include "src/__support/threads/linux/futex_utils.h"
+#else
+#error "callonce is not supported on this platform"
----------------
nickdesaulniers wrote:
This will also keep platform specific implementation details out of non-platform-specific directories (libc/src/__support/threads/callonce.h).
https://github.com/llvm/llvm-project/pull/96226
More information about the libc-commits
mailing list