diff options
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 6d011b81be..af0b28644a 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -71,7 +71,10 @@ native_mutex_initialize(pthread_mutex_t *lock) } } -#define native_mutex_reinitialize_atfork(lock) native_mutex_initialize(lock) +#define native_mutex_reinitialize_atfork(lock) (\ + native_mutex_unlock(lock), \ + native_mutex_initialize(lock), \ + native_mutex_lock(lock)) static void native_mutex_destroy(pthread_mutex_t *lock) |