diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 084f552..057b76f 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -335461,11 +335461,13 @@ int cook_async( void *userdata ) { // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_lock( job->lock )); + ifdef(osx, thread_mutex_lock( job->lock )); int ret = cook(userdata); // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_unlock( job->lock )); + ifdef(osx, thread_mutex_unlock( job->lock )); thread_exit( ret ); return ret; diff --git a/engine/split/v4k_cooker.c b/engine/split/v4k_cooker.c index 7f1e5a0..1bf843e 100644 --- a/engine/split/v4k_cooker.c +++ b/engine/split/v4k_cooker.c @@ -581,11 +581,13 @@ int cook_async( void *userdata ) { // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_lock( job->lock )); + ifdef(osx, thread_mutex_lock( job->lock )); int ret = cook(userdata); // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_unlock( job->lock )); + ifdef(osx, thread_mutex_unlock( job->lock )); thread_exit( ret ); return ret; diff --git a/engine/v4k.c b/engine/v4k.c index 27d2ff1..6fa9995 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -4393,11 +4393,13 @@ int cook_async( void *userdata ) { // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_lock( job->lock )); + ifdef(osx, thread_mutex_lock( job->lock )); int ret = cook(userdata); // tcc: only a single running thread shall pass, because of racing shared state due to missing thread_local support at compiler level ifdef(tcc, thread_mutex_unlock( job->lock )); + ifdef(osx, thread_mutex_unlock( job->lock )); thread_exit( ret ); return ret;