Unexpand two TAILQ_FOREACH_SAFE cases.
Ok'ed by: davidxu
This commit is contained in:
parent
0f924547b0
commit
36c285d128
@ -101,8 +101,7 @@ _thr_gc(struct pthread *curthread)
|
||||
THREAD_LIST_LOCK(curthread);
|
||||
|
||||
/* Check the threads waiting for GC. */
|
||||
for (td = TAILQ_FIRST(&_thread_gc_list); td != NULL; td = td_next) {
|
||||
td_next = TAILQ_NEXT(td, gcle);
|
||||
TAILQ_FOREACH_SAFE(td, &_thread_gc_list, gcle, td_next) {
|
||||
if (td->tid != TID_TERMINATED) {
|
||||
/* make sure we are not still in userland */
|
||||
continue;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user