diff options
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 5c47a73..0e3cebe 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -617,8 +617,7 @@ _mutex_unlock_private(pthread_t pthread) { struct pthread_mutex *m, *m_next; - for (m = TAILQ_FIRST(&pthread->mutexq); m != NULL; m = m_next) { - m_next = TAILQ_NEXT(m, m_qe); + TAILQ_FOREACH_SAFE(m, &pthread->mutexq, m_qe, m_next) { if ((m->m_flags & MUTEX_FLAGS_PRIVATE) != 0) _pthread_mutex_unlock(&m); } |