lock for OSX / temp /

main
Dominik Madarász 2023-10-16 17:20:31 +02:00
parent d822f4f16d
commit 1e3a34ddf3
3 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;