[libc-commits] [libc] [libc][threads] adjust futex library and expose requeue API (PR #192478)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Thu Apr 16 09:20:48 PDT 2026


================
@@ -79,6 +80,35 @@ class Futex : public cpp::Atomic<FutexWordType> {
         /* ignored */ nullptr,
         /* ignored */ 0);
   }
+  LIBC_INLINE ErrorOr<int> requeue_to(Futex &other,
+                                      cpp::optional<FutexWordType> oldval,
+                                      int wake_limit, int requeue_limit,
+                                      bool is_shared = false) {
+    int ret;
+    if (oldval)
+      ret = syscall_impl<int>(
+          /* syscall number */ FUTEX_SYSCALL_ID,
----------------
jhuber6 wrote:

I believe the LLVM style is `/*varname=*/` which clang-format will understand.

https://github.com/llvm/llvm-project/pull/192478


More information about the libc-commits mailing list