mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
liblzma: Fix mythread_sync for nested locking.
This commit is contained in:
parent
4c7e28705f
commit
2ebbb994e3
1 changed files with 3 additions and 2 deletions
|
@ -70,8 +70,9 @@ do { \
|
|||
/// things down at all compared to plain pthread_mutex_lock(&mutex)
|
||||
/// and pthread_mutex_unlock(&mutex) calls.
|
||||
///
|
||||
#define mythread_sync(mutex) mythread_sync_helper(mutex, __LINE__)
|
||||
#define mythread_sync_helper(mutex, line) \
|
||||
#define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__)
|
||||
#define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line)
|
||||
#define mythread_sync_helper2(mutex, line) \
|
||||
for (unsigned int mythread_i_ ## line = 0; \
|
||||
mythread_i_ ## line \
|
||||
? (pthread_mutex_unlock(&(mutex)), 0) \
|
||||
|
|
Loading…
Reference in a new issue