-
Notifications
You must be signed in to change notification settings - Fork 402
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
Support for Haiku Platform #97
Comments
BeOS/x86 should be supported. Probably not tested for a long time. |
Initial support of Haiku/amd64: 847927f Would be good to test it. Related topic: haikuports/haikuports#2215 |
Issue #97 (bdwgc). * pthread_support.c (WRAP_FUNC(pthread_create)): Change ABORT() for "sem_wait failed" case to ABORT_ARG1() to report errno as well.
(fix of commit 847927f) Issue #97 (bdwgc). * include/gc_config_macros.h [__HAIKU__ && !GC_CAN_SAVE_CALL_STACKS] (GC_ADD_CALLER): Define macro. * include/private/gcconfig.h [__HAIKU__ && __x86_64__] (X86_64, HAIKU, mach_type_known): Likewise. * include/private/gcconfig.h [HAIKU && X86_64] (HEURISTIC2, SEARCH_FOR_DATA_START): Likewise. * include/private/gcconfig.h [UNIX_LIKE && HAIKU] (NO_GETCONTEXT): Likewise. * include/private/thread_local_alloc.h [GC_HAIKU_THREADS] (USE_PTHREAD_SPECIFIC): Likewise. * include/private/gcconfig.h [HAIKU && X86_64] (etext, DATASTART): Do not define.
Fork handling (--enable-handle-fork) is not supported because of some bug in Haiku (as of hrev51798): pthread_mutex_unlock (called from GC_release_mark_lock called from fork_parent_proc) returns ESIGPARM. |
Besides the above bug, there are 2 more bugs in Haiku (for which I've created workarounds in bdwgc):
|
Issue #97 (bdwgc). The underlying pthread_join fails because of some bug in Haiku OS (as of hrev51798) when many threads are created in parallel. * tests/subthread_create.c [__HAIKU__]: Include errno.h. * tests/subthread_create.c [__HAIKU__] (main): If pthread_join returned value is ESRCH then just end the test normally (i.e. ignore the failure of pthread_join); add comment and TODO item.
Issue #97 (bdwgc). sem_wait() fails because of some bug in Haiku OS (as of hrev51798). * pthread_support.c [GC_HAIKU_THREADS] (WRAP_FUNC(pthread_create)): If errno is EACCES then just retry sem_wait instead of ABORT.
Issue #97 (bdwgc). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku*]: Define GC_THREADS and _REENTRANT macros. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku* && enable_parallel_mark]: Define PARALLEL_MARK macro. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku* && enable_thread_local_alloc]: Define THREAD_LOCAL_ALLOC macro.
Issue #97 (bdwgc). The underlying pthread_join fails because of some bug in Haiku OS (as of hrev51798) when many threads are created in parallel. * tests/subthread_create.c [__HAIKU__]: Include errno.h. * tests/subthread_create.c [__HAIKU__] (main): If pthread_join returned value is ESRCH then just end the test normally (i.e. ignore the failure of pthread_join); add comment and TODO item.
Issue #97 (bdwgc). sem_wait() fails because of some bug in Haiku OS (as of hrev51798). * pthread_support.c [GC_HAIKU_THREADS] (WRAP_FUNC(pthread_create)): If errno is EACCES then just retry sem_wait instead of ABORT.
Support for the operating system Haiku, the open source successor to beos.
Main Homepage:
https://www.haiku-os.org
Development Websites:
https://dev.haiku-os.org/
https://www.haiku-os.org/development
The text was updated successfully, but these errors were encountered: