mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-05 14:25:42 +00:00
Fix remaining use of mutexes lock/unlocking in different threads with cksems, corecting cksem usage on osx
This commit is contained in:
parent
dd9dc7555d
commit
f690750340
5 changed files with 32 additions and 36 deletions
11
stream.c
11
stream.c
|
|
@ -113,17 +113,6 @@ bool lock_mutex(rzip_control *control, pthread_mutex_t *mutex)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Lock and unlock a mutex */
|
||||
bool wait_mutex(rzip_control *control, pthread_mutex_t *mutex)
|
||||
{
|
||||
bool ret;
|
||||
|
||||
ret = lock_mutex(control, mutex);
|
||||
if (likely(ret))
|
||||
ret = unlock_mutex(control, mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool cond_wait(rzip_control *control, pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||
{
|
||||
if (unlikely(pthread_cond_wait(cond, mutex)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue