mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 09:12:11 +08:00
Use PTHREAD_THREADS_MAX if available
Stops us deadlocking on OpenBSD if we need more than 4 threads. Fixes #6503
This commit is contained in:
parent
b62fa53807
commit
ca08cc331b
@ -21,11 +21,17 @@
|
||||
#include "global_safety.h"
|
||||
#include "wutil.h"
|
||||
|
||||
#ifdef PTHREAD_THREADS_MAX
|
||||
#if PTHREAD_THREADS_MAX < 64
|
||||
#define IO_MAX_THREADS PTHREAD_THREADS_MAX
|
||||
#endif
|
||||
#else
|
||||
#ifdef _POSIX_THREAD_THREADS_MAX
|
||||
#if _POSIX_THREAD_THREADS_MAX < 64
|
||||
#define IO_MAX_THREADS _POSIX_THREAD_THREADS_MAX
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IO_MAX_THREADS
|
||||
#define IO_MAX_THREADS 64
|
||||
|
Loading…
x
Reference in New Issue
Block a user