diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/libtools/threads.c | 16 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibpthreadtypes.h | 2 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibpthread_private.h | 5 |
4 files changed, 25 insertions, 0 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 381fa6cc..7fc6e695 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -846,6 +846,14 @@ EXPORT int my_pthread_mutexattr_gettype(x64emu_t* emu, my_mutexattr_t *attr, voi attr->x86 = mattr.x86; return ret; } +EXPORT int my_pthread_mutexattr_getrobust(x64emu_t* emu, my_mutexattr_t *attr, void* p) +{ + my_mutexattr_t mattr = {0}; + mattr.x86 = attr->x86; + int ret = pthread_mutexattr_getrobust(&mattr.nat, p); + attr->x86 = mattr.x86; + return ret; +} EXPORT int my_pthread_mutexattr_init(x64emu_t* emu, my_mutexattr_t *attr) { my_mutexattr_t mattr = {0}; @@ -889,6 +897,14 @@ EXPORT int my_pthread_mutexattr_settype(x64emu_t* emu, my_mutexattr_t *attr, int return ret; } EXPORT int my___pthread_mutexattr_settype(x64emu_t* emu, my_mutexattr_t *attr, int t) __attribute__((alias("my_pthread_mutexattr_settype"))); +EXPORT int my_pthread_mutexattr_setrobust(x64emu_t* emu, my_mutexattr_t *attr, int t) +{ + my_mutexattr_t mattr = {0}; + mattr.x86 = attr->x86; + int ret = pthread_mutexattr_setrobust(&mattr.nat, t); + attr->x86 = mattr.x86; + return ret; +} #ifdef __SIZEOF_PTHREAD_MUTEX_T #if __SIZEOF_PTHREAD_MUTEX_T == 48 diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 165b3900..2fa478de 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -3577,6 +3577,7 @@ wrappedlibpthread: - pthread_mutexattr_setkind_np - pthread_mutexattr_setprotocol - pthread_mutexattr_setpshared + - pthread_mutexattr_setrobust - pthread_mutexattr_settype - iFpL: - pthread_attr_setguardsize @@ -3604,6 +3605,7 @@ wrappedlibpthread: - pthread_mutex_init - pthread_mutexattr_getkind_np - pthread_mutexattr_getprotocol + - pthread_mutexattr_getrobust - pthread_mutexattr_gettype - pthread_once - vFppp: diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h index ededbb15..1d9483ff 100644 --- a/src/wrapped/generated/wrappedlibpthreadtypes.h +++ b/src/wrapped/generated/wrappedlibpthreadtypes.h @@ -60,6 +60,7 @@ typedef int32_t (*iFpppp_t)(void*, void*, void*, void*); GO(pthread_mutexattr_setkind_np, iFpi_t) \ GO(pthread_mutexattr_setprotocol, iFpi_t) \ GO(pthread_mutexattr_setpshared, iFpi_t) \ + GO(pthread_mutexattr_setrobust, iFpi_t) \ GO(pthread_mutexattr_settype, iFpi_t) \ GO(pthread_attr_setguardsize, iFpL_t) \ GO(pthread_attr_setstacksize, iFpL_t) \ @@ -85,6 +86,7 @@ typedef int32_t (*iFpppp_t)(void*, void*, void*, void*); GO(pthread_mutex_init, iFpp_t) \ GO(pthread_mutexattr_getkind_np, iFpp_t) \ GO(pthread_mutexattr_getprotocol, iFpp_t) \ + GO(pthread_mutexattr_getrobust, iFpp_t) \ GO(pthread_mutexattr_gettype, iFpp_t) \ GO(pthread_once, iFpp_t) \ GO(_pthread_cleanup_push, vFppp_t) \ diff --git a/src/wrapped/wrappedlibpthread_private.h b/src/wrapped/wrappedlibpthread_private.h index bfb3fdea..fec8b56c 100755 --- a/src/wrapped/wrappedlibpthread_private.h +++ b/src/wrapped/wrappedlibpthread_private.h @@ -150,6 +150,7 @@ GO(pthread_mutexattr_getkind_np, iFpp) GO(pthread_mutexattr_getprotocol, iFpp) // pthread_mutexattr_getpshared // pthread_mutexattr_getrobust_np +GO(pthread_mutexattr_getrobust, iFpp) GO(pthread_mutexattr_gettype, iFpp) GO(__pthread_mutexattr_init, iFp) GO(pthread_mutexattr_init, iFp) @@ -158,6 +159,7 @@ GO(pthread_mutexattr_setkind_np, iFpi) GO(pthread_mutexattr_setprotocol, iFpi) GO(pthread_mutexattr_setpshared, iFpi) // pthread_mutexattr_setrobust_np +GO(pthread_mutexattr_setrobust, iFpi) GO(__pthread_mutexattr_settype, iFpi) GO(pthread_mutexattr_settype, iFpi) #else @@ -167,6 +169,7 @@ GOM(pthread_mutexattr_getkind_np, iFEpp) // pthread_mutexattr_getprioceiling GOM(pthread_mutexattr_getprotocol, iFEpp) // pthread_mutexattr_getpshared +GOM(pthread_mutexattr_getrobust, iFEpp) // pthread_mutexattr_getrobust_np GOM(pthread_mutexattr_gettype, iFEpp) GOM(__pthread_mutexattr_init, iFEp) @@ -175,11 +178,13 @@ GOM(pthread_mutexattr_setkind_np, iFEpi) // pthread_mutexattr_setprioceiling GOM(pthread_mutexattr_setprotocol, iFEpi) GOM(pthread_mutexattr_setpshared, iFEpi) +GOM(pthread_mutexattr_setrobust, iFEpi) // pthread_mutexattr_setrobust_np GOM(__pthread_mutexattr_settype, iFEpi) GOM(pthread_mutexattr_settype, iFEpi) #endif // pthread_mutex_consistent_np +GO(pthread_mutex_consistent, iFp) GO(__pthread_mutex_destroy, iFp) GO(pthread_mutex_destroy, iFp) // pthread_mutex_getprioceiling |