[all-commits] [llvm/llvm-project] 7094eb: [libc][threads] adjust futex library and expose re...

Schrodinger ZHU Yifan via All-commits all-commits at lists.llvm.org
Thu Apr 16 19:37:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7094eb52d8cbaa9faeb635bfb6f6c06e6cd52b64
      https://github.com/llvm/llvm-project/commit/7094eb52d8cbaa9faeb635bfb6f6c06e6cd52b64
  Author: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M libc/src/__support/threads/CMakeLists.txt
    M libc/src/__support/threads/CndVar.h
    M libc/src/__support/threads/darwin/futex_utils.h
    A libc/src/__support/threads/futex_utils.h
    M libc/src/__support/threads/linux/futex_utils.h
    M libc/src/__support/threads/raw_mutex.h
    M libc/src/__support/threads/raw_rwlock.h
    M libc/src/semaphore/CMakeLists.txt
    M libc/src/semaphore/posix_semaphore.h
    M libc/test/integration/src/__support/threads/CMakeLists.txt
    A libc/test/integration/src/__support/threads/futex_requeue_test.cpp
    M libc/test/src/__support/threads/CMakeLists.txt
    A libc/test/src/__support/threads/futex_utils_test.cpp

  Log Message:
  -----------
  [libc][threads] adjust futex library and expose requeue API (#192478)

Make futex a common abstraction layer across platforms.
(linux/wasm/macOS/windows/fuchsia all have the support, which we can
align their support later on).

This patch also expose a requeue API that returns ENOSYS on unsupported
platforms. The requeue operation will be needed to reimplement a strict
FIFO style condvar similar to musl.

Additional cleanup is done to change raw syscall return value to
`ErrorOr<int>`.

Assisted-by: Codex with gpt-5.4 medium fast



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list