From 3dcd08bd4a7cb9fa8a52a0a55d1f0c15eac9632a Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 21 Jun 2024 19:08:53 +0800 Subject: Wrapped pthread_cond_signal with aligned cond like others (#1608) --- src/libtools/threads.c | 6 ++++++ src/wrapped/wrappedlibpthread_private.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 6566b84e..074068c0 100644 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -712,6 +712,12 @@ static pthread_cond_t* alignCond(pthread_cond_t* pc) return pc; } +EXPORT int my_pthread_cond_signal(x64emu_t* emu, pthread_cond_t* cond) +{ + (void)emu; + int ret = pthread_cond_signal(alignCond(cond)); + return ret; +} EXPORT int my_pthread_cond_timedwait(x64emu_t* emu, pthread_cond_t* cond, void* mutex, void* abstime) { (void)emu; diff --git a/src/wrapped/wrappedlibpthread_private.h b/src/wrapped/wrappedlibpthread_private.h index 2ab265bb..da7d0200 100644 --- a/src/wrapped/wrappedlibpthread_private.h +++ b/src/wrapped/wrappedlibpthread_private.h @@ -107,7 +107,7 @@ GOM(pthread_cond_broadcast, iFEp) GOM(pthread_cond_destroy, iFEp) GOM(pthread_cond_init, iFEpp) #endif -GO(pthread_cond_signal, iFp) +GOM(pthread_cond_signal, iFEp) GOM(pthread_cond_timedwait, iFEppp) GOM(pthread_cond_wait, iFEpp) GOM(pthread_create, iFEpppp) -- cgit 1.4.1