lock for OSX / temp /
parent
d822f4f16d
commit
1e3a34ddf3
|
@ -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
|
// 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(tcc, thread_mutex_lock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_lock( job->lock ));
|
||||||
|
|
||||||
int ret = cook(userdata);
|
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
|
// 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(tcc, thread_mutex_unlock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_unlock( job->lock ));
|
||||||
|
|
||||||
thread_exit( ret );
|
thread_exit( ret );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -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
|
// 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(tcc, thread_mutex_lock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_lock( job->lock ));
|
||||||
|
|
||||||
int ret = cook(userdata);
|
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
|
// 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(tcc, thread_mutex_unlock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_unlock( job->lock ));
|
||||||
|
|
||||||
thread_exit( ret );
|
thread_exit( ret );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -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
|
// 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(tcc, thread_mutex_lock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_lock( job->lock ));
|
||||||
|
|
||||||
int ret = cook(userdata);
|
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
|
// 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(tcc, thread_mutex_unlock( job->lock ));
|
||||||
|
ifdef(osx, thread_mutex_unlock( job->lock ));
|
||||||
|
|
||||||
thread_exit( ret );
|
thread_exit( ret );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue