Unexpand two TAILQ_FOREACH_SAFE cases.

Ok'ed by:	davidxu
This commit is contained in:
delphij 2006-07-17 09:23:44 +00:00
parent 0f924547b0
commit 36c285d128
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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);
}