Skip to content

[llvm][Support] Determine the max thread length on Haiku #107801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions llvm/lib/Support/Unix/Threading.inc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
#include <unistd.h> // For syscall()
#endif

#if defined(__HAIKU__)
#include <OS.h> // For B_OS_NAME_LENGTH
#endif

namespace llvm {
pthread_t
llvm_execute_on_thread_impl(void *(*ThreadFunc)(void *), void *Arg,
Expand Down Expand Up @@ -139,6 +143,8 @@ uint64_t llvm::get_threadid() {
static constexpr uint32_t get_max_thread_name_length_impl() {
#if defined(PTHREAD_MAX_NAMELEN_NP)
return PTHREAD_MAX_NAMELEN_NP;
#elif defined(__HAIKU__)
return B_OS_NAME_LENGTH;
#elif defined(__APPLE__)
return 64;
#elif defined(__sun__) && defined(__svr4__)
Expand Down
Loading