diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-26 17:45:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 17:45:13 +0200 |
| commit | b5105a1e57bba3305d5dce93ab4d2f7faab6b34a (patch) | |
| tree | ab26b700d3c48f2c8e32a1084ae7c2e7a8448b06 /src/wrapped32/wrappedlibpthread_private.h | |
| parent | 9beb745765e9c99bad6410094a97bf0bf9ebc1eb (diff) | |
| download | box64-b5105a1e57bba3305d5dce93ab4d2f7faab6b34a.tar.gz box64-b5105a1e57bba3305d5dce93ab4d2f7faab6b34a.zip | |
Added preliminary Box32 support (#1760)
* Improve the ReserveHigMemory helper function * [BOX32] Added some wrapping infrastructure * [BOX32] More wrapped 32bits lib infrastructure * [BOX32] Added callback and tls 32bits handling * [BOX32] Added more 32bits, around wrappers and elfs * [BOX32] Added the 32bits version of myalign * [BOX32] More wrapped libs and 32bits fixes and imrpovments * [BOX32] Added some 32bits tests * [BOX32] Try to enable some Box32 build and test on the CI * [BOX32] Disable Box32 testing on CI platform that use qemu * [BOX32] Another attempt to disable Box32 testing on CI platform that use qemu * [BOX32] Small fix for another attempt to disable Box32 testing on CI platform that use qemu * [BOX32] Yet another fix for another attempt to disable Box32 testing on CI platform that use qemu * [BOX32] Fixed a typo in CI script * [BOX32] Better scratch alighnment and enabled more tests * [BOX32] Added (partial) wrapped 32bits librt * [BOX32] Added mention of Box32 in README * [BOX32] Added phtread handling, and numerous fixes to 32bits handling. [ARM64_DYNAREC] Fixed access to segment with negative offset * [BOX32] Added system libs and cpp testing, plus some more fixes * [BOX32] Fix previous commit * [BOX32] Better stack adjustment for 32bits processes * [BOX32] Added getenv wrapped 32bits function and friends * [BOX32] Don't look for box86 for a Box32 build * [BOX32] Don't do 32bits cppThreads test for now on CI * [BOX32] Enabled a few more 32bits tests * [BOX32] For ld_lib_path for both CppThreads tests * [BOX32] [ANDROID] Some Fixes for Android Build * [BOX32] Still need to disable cppThread_32bits test on CI for some reason * [BOX32] [ANDROID] Don't show PreInit Array Warning (#1751) * [BOX32] [ANDROID] One More Fix for Android Build That I forgotten to … (#1752) * [BOX32] [ANDROID] One More Fix for Android Build That I forgotten to push before * [BOX32] [ANDROID] Try to Create __libc_init * [BOX32] [ANDROID] Try to disable NEEDED_LIBS for now (libdl is not wrapped) * [BOX32] Updated generated files * [BOX32] Added 32bits context functions * [BOX32] Added 32bits signal handling * [BOX32] Added some missing 32bits elfloader functions * [BOX32] Fix build on x86_64 machine * [BOX32] Better fix for x86_64 build * [BOX32] Actually added missing libs, and re-enabled cppThreads_32bits test * [BOX32] Added wrapped 32bits libdl * [BOX32] Try to re-enabled Box32 test on CI for ARM64 builds * [BOX32] fine-tuning Box32 test on CI for ARM64 builds * [BOX32] More fine-tuning to Box32 test on CI for ARM64 builds * [BOX32] Enabled Box32 test on CI for LA64 and RV64 builds too * [BOX32] re-Disabled Box32 test on CI for LA64 and RV64 builds, not working for now * [BOX32] Temporarily disabled cppThreads_32bits test on CI --------- Co-authored-by: KreitinnSoftware <pablopro5051@gmail.com> Co-authored-by: KreitinnSoftware <80591934+KreitinnSoftware@users.noreply.github.com>
Diffstat (limited to 'src/wrapped32/wrappedlibpthread_private.h')
| -rwxr-xr-x | src/wrapped32/wrappedlibpthread_private.h | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/src/wrapped32/wrappedlibpthread_private.h b/src/wrapped32/wrappedlibpthread_private.h new file mode 100755 index 00000000..be13d397 --- /dev/null +++ b/src/wrapped32/wrappedlibpthread_private.h @@ -0,0 +1,187 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error meh! +#endif +// General note: pthread_t is unsigned long int +// cpu_set_t is a struct with an array, default size is fixed for all architecture + +// __errno_location +// fork +// __fork +// __h_errno_location +// _IO_flockfile +// _IO_ftrylockfile +// _IO_funlockfile +// __libc_allocate_rtsig +// __libc_current_sigrtmax +// __libc_current_sigrtmin +GOM(pthread_atfork, iFEppp) +GOM(__pthread_atfork, iFEppp) +GOM(pthread_attr_destroy, iFEp) +// pthread_attr_getaffinity_np +GOM(pthread_attr_getdetachstate, iFEpp) +GOM(pthread_attr_getguardsize, iFEpp) +GOM(pthread_attr_getinheritsched, iFEpp) +GOM(pthread_attr_getschedparam, iFEpp) +GOM(pthread_attr_getschedpolicy, iFEpp) +GOM(pthread_attr_getscope, iFEpp) +GOM(pthread_attr_getstack, iFEppp) +GOM(pthread_attr_getstackaddr, iFEpp) +GOM(pthread_attr_getstacksize, iFEpp) +GOM(pthread_attr_init, iFEp) +GOM(pthread_attr_setaffinity_np, iFEpup) +GOM(pthread_attr_setdetachstate, iFEpi) +GOM(pthread_attr_setguardsize, iFEpL) +GOM(pthread_attr_setinheritsched, iFEpi) +GOM(pthread_attr_setschedparam, iFEpp) +GOM(pthread_attr_setschedpolicy, iFEpi) +GOM(pthread_attr_setscope, iFEpi) +GOM(pthread_attr_setstack, iFEppL) +GOM(pthread_attr_setstackaddr, iFEpp) +GOM(pthread_attr_setstacksize, iFEpL) +GO(pthread_barrierattr_destroy, iFp) +GO(pthread_barrierattr_getpshared, iFpp) +GO(pthread_barrierattr_init, iFp) +GO(pthread_barrierattr_setpshared, iFpi) +GO(pthread_barrier_destroy, iFp) +GO(pthread_barrier_init, iFppu) +GO(pthread_barrier_wait, iFp) +GO(pthread_cancel, iFh) +GOM(_pthread_cleanup_pop, vFEpi) +GOM(_pthread_cleanup_pop_restore, vFEpi) +GOM(_pthread_cleanup_push, vFEppp) +GOM(_pthread_cleanup_push_defer, vFEppp) +// __pthread_cleanup_routine +GO(pthread_condattr_destroy, iFp) +GO(pthread_condattr_getclock, iFpp) +GO(pthread_condattr_getpshared, iFpp) +GO(pthread_condattr_init, iFp) +GO(pthread_condattr_setclock, iFpp) +GO(pthread_condattr_setpshared, iFpi) +GO2(pthread_cond_broadcast@GLIBC_2.0, iFEp, my32_pthread_cond_broadcast_old) +GO2(pthread_cond_destroy@GLIBC_2.0, iFEp, my32_pthread_cond_destroy_old) +GO2(pthread_cond_init@GLIBC_2.0, iFEpp, my32_pthread_cond_init_old) +GO2(pthread_cond_signal@GLIBC_2.0, iFEp, my32_pthread_cond_signal_old) +GO2(pthread_cond_timedwait@GLIBC_2.0, iFEppp, my32_pthread_cond_timedwait_old) +GO2(pthread_cond_wait@GLIBC_2.0, iFEpp, my32_pthread_cond_wait_old) +GO(pthread_cond_broadcast, iFp) +GO(pthread_cond_destroy, iFp) +GO(pthread_cond_init, iFpp) +GO(pthread_cond_signal, iFp) +GOM(pthread_cond_timedwait, iFEppp) +GOM(pthread_cond_wait, iFEpp) +GOM(pthread_create, iFEBh_ppp) +GOM(pthread_detach, iFEh) +GO(pthread_equal, iFhh) +GO(pthread_exit, vFp) +GOM(pthread_getaffinity_np, iFEpup) +GO(pthread_getattr_np, iFup) +GO(pthread_getconcurrency, iFv) +GO(pthread_getcpuclockid, iFup) +GO(pthread_getschedparam, iFupp) +GO(__pthread_getspecific, pFu) +GO(pthread_getspecific, pFu) +GOM(pthread_getname_np, iFEppu) //not present on Pandora +GOM(__pthread_initialize, vFv) //%noE doesn't exist anymore... +// __pthread_initialize_minimal +GO(pthread_join, iFHBp_) +GOM(__pthread_key_create, iFEpp) +GOM(pthread_key_create, iFEpp) +GO(pthread_key_delete, iFu) +GOM(pthread_kill, iFEpi) +// pthread_kill_other_threads_np +GO(__pthread_mutexattr_destroy, iFp) +GO(pthread_mutexattr_destroy, iFp) +GO(pthread_mutexattr_getprioceiling, iFpp) +GO(pthread_mutexattr_getprotocol, iFpp) +// pthread_mutexattr_getpshared +// pthread_mutexattr_getrobust_np +GO(pthread_mutexattr_gettype, iFpp) +GO(__pthread_mutexattr_init, iFp) +GO(pthread_mutexattr_init, iFp) +GO(pthread_mutexattr_setprioceiling, iFpi) +GO(pthread_mutexattr_setprotocol, iFpp) +GO(pthread_mutexattr_setpshared, iFpi) +// pthread_mutexattr_setrobust_np +GO(__pthread_mutexattr_settype, iFpi) +GO(pthread_mutexattr_settype, iFpi) +// pthread_mutex_consistent_np +GOM(__pthread_mutex_destroy, iFp) //%noE +GOM(pthread_mutex_destroy, iFp) //%noE +// pthread_mutex_getprioceiling +GOM(__pthread_mutex_init, iFpp) //%noE +GOM(pthread_mutex_init, iFpp) //%noE +GOM(__pthread_mutex_lock, iFp) //%noE +GOM(pthread_mutex_lock, iFp) //%noE +// pthread_mutex_setprioceiling +GOM(pthread_mutex_timedlock, iFpp) //%noE +GOM(__pthread_mutex_trylock, iFp) //%noE +GOM(pthread_mutex_trylock, iFp) //%noE +GOM(__pthread_mutex_unlock, iFp) //%noE +GOM(pthread_mutex_unlock, iFp) //%noE +GOM(pthread_once, iFEpp) +GOM(__pthread_once, iFEpp) +GOM(__pthread_register_cancel, vFEp) +// __pthread_register_cancel_defer +GO(pthread_rwlockattr_destroy, vFp) +GO(pthread_rwlockattr_getkind_np, iFpp) +// pthread_rwlockattr_getpshared +GO(pthread_rwlockattr_init, iFp) +GO(pthread_rwlockattr_setkind_np, iFpi) +// pthread_rwlockattr_setpshared +// __pthread_rwlock_destroy +GO(pthread_rwlock_destroy, iFp) +GO(__pthread_rwlock_init, iFpp) +GO(pthread_rwlock_init, iFpp) +GO(__pthread_rwlock_rdlock, iFp) +GOM(pthread_rwlock_rdlock, iFp) //%noE +// pthread_rwlock_timedrdlock +// pthread_rwlock_timedwrlock +// __pthread_rwlock_tryrdlock +GO(pthread_rwlock_tryrdlock, iFp) +// __pthread_rwlock_trywrlock +GO(pthread_rwlock_trywrlock, iFp) +GO(__pthread_rwlock_unlock, iFp) +GOM(pthread_rwlock_unlock, iFp) //%noE +GO(__pthread_rwlock_wrlock, iFp) +GOM(pthread_rwlock_wrlock, iFp) //%noE +GO(pthread_self, hFv) +GOM(pthread_setaffinity_np, iFELup) +GO(pthread_setcancelstate, iFip) +GO(pthread_setcanceltype, iFip) +GO(pthread_setconcurrency, iFi) +GOM(pthread_setname_np, iFEpp) // not present on the Pandora +GO(pthread_setschedparam, iFuip) +GO(pthread_setschedprio, iFpi) +GO(__pthread_setspecific, iFup) +GO(pthread_setspecific, iFup) +GO(pthread_sigmask, iFipp) +GO(pthread_spin_destroy, iFp) +GO(pthread_spin_init, iFpi) +GO(pthread_spin_lock, iFp) +GO(pthread_spin_trylock, iFp) +GO(pthread_spin_unlock, iFp) +GO(pthread_testcancel, vFv) +GO(pthread_timedjoin_np, iFppp) +GO(pthread_tryjoin_np, iFpp) +GOM(__pthread_unregister_cancel, vFEp) +// __pthread_unregister_cancel_restore +// __pthread_unwind +GOM(__pthread_unwind_next, vFEp) +GO(pthread_yield, iFv) +// raise +// __res_state +GO(sem_close, iFp) +GO(sem_destroy, iFp) +GO(sem_getvalue, iFpp) +GO(sem_init, iFpiu) +GO(sem_open, pFpOM) +GO(sem_post, iFp) +GO(sem_timedwait, iFpp) +GO(sem_trywait, iFp) +GO(sem_unlink, iFp) +GO(sem_wait, iFp) +// __sigaction +// system +// __vfork + +GOM(pthread_mutexattr_setkind_np, iFEpi) // deprecated |