about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-12 21:42:49 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-03-12 21:42:49 +0100
commitc0f98bb0ec8b996d7fe35b1b311ec421587a94fd (patch)
treeff32eaf3b02b52dcd0fb329c97c000bccf377a08 /src/wrapped
parent42b067dc39c7a5d32c59822f3d05a9b82394f6f1 (diff)
downloadbox64-c0f98bb0ec8b996d7fe35b1b311ec421587a94fd.tar.gz
box64-c0f98bb0ec8b996d7fe35b1b311ec421587a94fd.zip
Cleanup mutex wrapping
Diffstat (limited to 'src/wrapped')
-rw-r--r--src/wrapped/generated/functions_list.txt9
-rw-r--r--src/wrapped/generated/wrappedlibpthreadtypes.h9
-rwxr-xr-xsrc/wrapped/wrappedlibpthread_private.h23
3 files changed, 6 insertions, 35 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 73f50f8e..3f0c46fe 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -3533,10 +3533,6 @@ wrappedlibpthread:
   - __pthread_unregister_cancel
   - __pthread_unwind_next
 - iFp:
-  - __pthread_mutex_destroy
-  - __pthread_mutex_lock
-  - __pthread_mutex_trylock
-  - __pthread_mutex_unlock
   - __pthread_mutexattr_destroy
   - __pthread_mutexattr_init
   - pthread_attr_destroy
@@ -3548,10 +3544,6 @@ wrappedlibpthread:
   - pthread_condattr_destroy
   - pthread_condattr_init
   - pthread_getattr_default_np
-  - pthread_mutex_destroy
-  - pthread_mutex_lock
-  - pthread_mutex_trylock
-  - pthread_mutex_unlock
   - pthread_mutexattr_destroy
   - pthread_mutexattr_init
   - pthread_setattr_default_np
@@ -3599,7 +3591,6 @@ wrappedlibpthread:
   - pthread_condattr_getpshared
   - pthread_key_create
   - pthread_mutex_init
-  - pthread_mutex_timedlock
   - pthread_mutexattr_getkind_np
   - pthread_mutexattr_getprotocol
   - pthread_mutexattr_gettype
diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h
index e30c74ba..6d230b2f 100644
--- a/src/wrapped/generated/wrappedlibpthreadtypes.h
+++ b/src/wrapped/generated/wrappedlibpthreadtypes.h
@@ -30,10 +30,6 @@ typedef int64_t (*iFpppp_t)(void*, void*, void*, void*);
 	GO(__pthread_register_cancel, vFp_t) \
 	GO(__pthread_unregister_cancel, vFp_t) \
 	GO(__pthread_unwind_next, vFp_t) \
-	GO(__pthread_mutex_destroy, iFp_t) \
-	GO(__pthread_mutex_lock, iFp_t) \
-	GO(__pthread_mutex_trylock, iFp_t) \
-	GO(__pthread_mutex_unlock, iFp_t) \
 	GO(__pthread_mutexattr_destroy, iFp_t) \
 	GO(__pthread_mutexattr_init, iFp_t) \
 	GO(pthread_attr_destroy, iFp_t) \
@@ -45,10 +41,6 @@ typedef int64_t (*iFpppp_t)(void*, void*, void*, void*);
 	GO(pthread_condattr_destroy, iFp_t) \
 	GO(pthread_condattr_init, iFp_t) \
 	GO(pthread_getattr_default_np, iFp_t) \
-	GO(pthread_mutex_destroy, iFp_t) \
-	GO(pthread_mutex_lock, iFp_t) \
-	GO(pthread_mutex_trylock, iFp_t) \
-	GO(pthread_mutex_unlock, iFp_t) \
 	GO(pthread_mutexattr_destroy, iFp_t) \
 	GO(pthread_mutexattr_init, iFp_t) \
 	GO(pthread_setattr_default_np, iFp_t) \
@@ -91,7 +83,6 @@ typedef int64_t (*iFpppp_t)(void*, void*, void*, void*);
 	GO(pthread_condattr_getpshared, iFpp_t) \
 	GO(pthread_key_create, iFpp_t) \
 	GO(pthread_mutex_init, iFpp_t) \
-	GO(pthread_mutex_timedlock, iFpp_t) \
 	GO(pthread_mutexattr_getkind_np, iFpp_t) \
 	GO(pthread_mutexattr_getprotocol, iFpp_t) \
 	GO(pthread_mutexattr_gettype, iFpp_t) \
diff --git a/src/wrapped/wrappedlibpthread_private.h b/src/wrapped/wrappedlibpthread_private.h
index 2c16c02d..bfb3fdea 100755
--- a/src/wrapped/wrappedlibpthread_private.h
+++ b/src/wrapped/wrappedlibpthread_private.h
@@ -180,12 +180,17 @@ GOM(__pthread_mutexattr_settype, iFEpi)
 GOM(pthread_mutexattr_settype, iFEpi)
 #endif
 // pthread_mutex_consistent_np
-#ifdef NOALIGN
 GO(__pthread_mutex_destroy, iFp)
 GO(pthread_mutex_destroy, iFp)
 // pthread_mutex_getprioceiling
+#ifdef NOALIGN
 GO(__pthread_mutex_init, iFpp)
 GO(pthread_mutex_init, iFpp)
+#else
+// phtread_mutex_t is 40 bytes on x86_64, but 48bytes on ARM64
+GOM(__pthread_mutex_init, iFpp)
+GOM(pthread_mutex_init, iFpp)
+#endif
 GO(__pthread_mutex_lock, iFp)
 GO(pthread_mutex_lock, iFp)
 // pthread_mutex_setprioceiling
@@ -194,22 +199,6 @@ GO(__pthread_mutex_trylock, iFp)
 GO(pthread_mutex_trylock, iFp)
 GO(__pthread_mutex_unlock, iFp)
 GO(pthread_mutex_unlock, iFp)
-#else
-// phtread_mutex_t is 40 bytes on x86_64, but 48bytes on ARM64
-GOM(__pthread_mutex_destroy, iFp)
-GOM(pthread_mutex_destroy, iFp)
-// pthread_mutex_getprioceiling
-GOM(__pthread_mutex_init, iFpp)
-GOM(pthread_mutex_init, iFpp)
-GOM(__pthread_mutex_lock, iFp)
-GOM(pthread_mutex_lock, iFp)
-// pthread_mutex_setprioceiling
-GOM(pthread_mutex_timedlock, iFpp)
-GOM(__pthread_mutex_trylock, iFp)
-GOM(pthread_mutex_trylock, iFp)
-GOM(__pthread_mutex_unlock, iFp)
-GOM(pthread_mutex_unlock, iFp)
-#endif
 GOM(pthread_once, iFEpp)
 GOM(__pthread_once, iFEpp)
 GOM(__pthread_register_cancel, vFEp)