llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.32k stars 11.69k forks source link

[libc] proxy header for threads.h #92968

Open nickdesaulniers opened 4 months ago

nickdesaulniers commented 4 months ago

https://github.com/llvm/llvm-project/pull/89329#discussion_r1608973206

nickdesaulniers commented 4 months ago

To flush out this issue description more, we'd like to:

  1. create libc/hdr/types/cnd_t.h which based on LIBC_FULL_BUILD either
    • includes include/llvm-libc-types/cnd_t.h OR
    • includes
  2. create libc/hdr/threads_macros.h which based on LIBC_FULL_BUILD either
    • defines thrd_error and thrd_success OR
    • includes
  3. replace #include <threads.h> throughout libc/src/ with more specific includes of either libc/hdr/threads_macros.h, or libc/hdr/types/cnd_t.h or other threads related headers (following the same pattern).
  4. clean up the TODO left in src/threads/linux/cnd_broadcast.cpp