diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-07-12 17:23:02 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-07-12 17:23:02 +0200 |
| commit | 2a10ddc75ba2bcf2915ff49ac88664ee8e7d1939 (patch) | |
| tree | f9a056bb679e4dc2e9173e9341003d2a2a7ada1b /src | |
| parent | 8ed08b3bbc95106320f2ee42bae2d85a336d06ca (diff) | |
| download | box64-2a10ddc75ba2bcf2915ff49ac88664ee8e7d1939.tar.gz box64-2a10ddc75ba2bcf2915ff49ac88664ee8e7d1939.zip | |
[WRAPPER] Added 1 more wrapped function to libpthreads (for #2808)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libtools/static_threads.h | 1 | ||||
| -rw-r--r-- | src/libtools/threads.c | 14 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibpthreadtypes.h | 1 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibpthread_private.h | 4 |
5 files changed, 19 insertions, 2 deletions
diff --git a/src/libtools/static_threads.h b/src/libtools/static_threads.h index 07907987..f764e6c3 100644 --- a/src/libtools/static_threads.h +++ b/src/libtools/static_threads.h @@ -57,6 +57,7 @@ int my_pthread_mutexattr_getrobust(x64emu_t* emu, my_mutexattr_t *attr, void* p) int my_pthread_mutexattr_init(x64emu_t* emu, my_mutexattr_t *attr); int my___pthread_mutexattr_init(x64emu_t* emu, my_mutexattr_t *attr); int my_pthread_mutexattr_setkind_np(x64emu_t* emu, my_mutexattr_t *attr, int k); +int my_pthread_mutexattr_setprioceiling(x64emu_t* emu, my_mutexattr_t *attr, int p); int my_pthread_mutexattr_setprotocol(x64emu_t* emu, my_mutexattr_t *attr, int p); int my_pthread_mutexattr_setpshared(x64emu_t* emu, my_mutexattr_t *attr, int p); int my_pthread_mutexattr_settype(x64emu_t* emu, my_mutexattr_t *attr, int t); diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 3e344e8c..40e7b956 100644 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -930,6 +930,20 @@ EXPORT int my_pthread_mutexattr_setkind_np(x64emu_t* emu, my_mutexattr_t *attr, attr->x86 = mattr.x86; return ret; } +EXPORT int my_pthread_mutexattr_setprioceiling(x64emu_t* emu, my_mutexattr_t *attr, int p) +{ +#ifndef TERMUX + (void)emu; + my_mutexattr_t mattr = {0}; + mattr.x86 = attr->x86; + int ret = pthread_mutexattr_setprioceiling(&mattr.nat, p); + attr->x86 = mattr.x86; + return ret; +#else + (void)emu; (void)attr; (void)p; + return 0; +#endif +} EXPORT int my_pthread_mutexattr_setprotocol(x64emu_t* emu, my_mutexattr_t *attr, int p) { #ifndef TERMUX diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 128e86c9..2287f965 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -5250,6 +5250,7 @@ wrappedlibpthread: - pthread_kill - pthread_kill@GLIBC_2.2.5 - pthread_mutexattr_setkind_np + - pthread_mutexattr_setprioceiling - pthread_mutexattr_setprotocol - pthread_mutexattr_setpshared - pthread_mutexattr_setrobust diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h index 2620f07e..cead4c00 100644 --- a/src/wrapped/generated/wrappedlibpthreadtypes.h +++ b/src/wrapped/generated/wrappedlibpthreadtypes.h @@ -64,6 +64,7 @@ typedef int32_t (*iFpppp_t)(void*, void*, void*, void*); GO(pthread_kill, iFpi_t) \ GO(pthread_kill@GLIBC_2.2.5, iFpi_t) \ GO(pthread_mutexattr_setkind_np, iFpi_t) \ + GO(pthread_mutexattr_setprioceiling, iFpi_t) \ GO(pthread_mutexattr_setprotocol, iFpi_t) \ GO(pthread_mutexattr_setpshared, iFpi_t) \ GO(pthread_mutexattr_setrobust, iFpi_t) \ diff --git a/src/wrapped/wrappedlibpthread_private.h b/src/wrapped/wrappedlibpthread_private.h index cdb241c6..d81391b0 100644 --- a/src/wrapped/wrappedlibpthread_private.h +++ b/src/wrapped/wrappedlibpthread_private.h @@ -164,7 +164,7 @@ GO(pthread_mutexattr_gettype, iFpp) GO(__pthread_mutexattr_init, iFp) GO(pthread_mutexattr_init, iFp) GO(pthread_mutexattr_setkind_np, iFpi) -//GO(pthread_mutexattr_setprioceiling, +GO(pthread_mutexattr_setprioceiling, iFpi) GO(pthread_mutexattr_setprotocol, iFpi) GO(pthread_mutexattr_setpshared, iFpi) GO(pthread_mutexattr_setrobust, iFpi) @@ -184,7 +184,7 @@ GOM(pthread_mutexattr_gettype, iFEpp) GOM(__pthread_mutexattr_init, iFEp) GOM(pthread_mutexattr_init, iFEp) GOM(pthread_mutexattr_setkind_np, iFEpi) -//GO(pthread_mutexattr_setprioceiling, +GOM(pthread_mutexattr_setprioceiling, iFEpi) GOM(pthread_mutexattr_setprotocol, iFEpi) GOM(pthread_mutexattr_setpshared, iFEpi) GOM(pthread_mutexattr_setrobust, iFEpi) |