mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-05 21:13:27 +00:00
Fix AppVeyor
This commit is contained in:
parent
a24eb639e0
commit
8a224a5f48
@ -122,18 +122,22 @@ R_API bool r_th_pause(RThread *th, bool enable) {
|
||||
|
||||
// running in thread
|
||||
R_API bool r_th_try_pause(RThread *th) {
|
||||
if (th) {
|
||||
// pthread_mutex_lock (&th->_mutex);
|
||||
// pthread_mutex_unlock (&th->_mutex);
|
||||
if (pthread_mutex_trylock (&th->_mutex) != -1) {
|
||||
pthread_mutex_unlock (&th->_mutex);
|
||||
} else {
|
||||
// oops
|
||||
}
|
||||
// pthread_cond_wait (&th->_cond, &th->_mutex);
|
||||
return true;
|
||||
if (!th) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
#if HAVE_PTHREAD
|
||||
// pthread_mutex_lock (&th->_mutex);
|
||||
// pthread_mutex_unlock (&th->_mutex);
|
||||
if (pthread_mutex_trylock (&th->_mutex) != -1) {
|
||||
pthread_mutex_unlock (&th->_mutex);
|
||||
} else {
|
||||
// oops
|
||||
}
|
||||
// pthread_cond_wait (&th->_cond, &th->_mutex);
|
||||
#else
|
||||
#pragma message("warning r_th_try_pause not implemented")
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
R_API bool r_th_start(RThread *th, int enable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user