Use futexes on OpenBSD and improve threading

This commit is contained in:
Justine Tunney 2022-07-17 19:59:49 -07:00
parent 5b11033d4d
commit 4f4889ddf7
17 changed files with 114 additions and 63 deletions

View file

@ -250,12 +250,9 @@ extern void* sbrk(ptrdiff_t);
#if USE_LOCKS
#ifndef WIN32
#if defined (__SVR4) && defined (__sun) /* solaris */
#include <thread.h>
#elif !defined(LACKS_SCHED_H)
#include <sched.h>
#endif /* solaris or LACKS_SCHED_H */
#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0) || !USE_SPIN_LOCKS
#include <pthread.h>
#endif /* USE_RECURSIVE_LOCKS ... */
#elif defined(_MSC_VER)
#ifndef _M_AMD64