diff options
author | Xin LI <delphij@FreeBSD.org> | 2006-04-13 03:09:34 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2006-04-13 03:09:34 +0000 |
commit | 34562de4d5fe081dd76c8ce6b073aa56d617eeaf (patch) | |
tree | 85f034c174482bb7ac3e017c2115d4e91afabd11 /lib | |
parent | 6e8aee768a854a0d9ba54ac4cc3d9c4c3d29c672 (diff) | |
download | src-34562de4d5fe081dd76c8ce6b073aa56d617eeaf.tar.gz src-34562de4d5fe081dd76c8ce6b073aa56d617eeaf.zip |
Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY.
Ok'ed by: davidxu
Notes
Notes:
svn path=/head/; revision=157700
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/thread/thr_cond.c | 8 | ||||
-rw-r--r-- | lib/libkse/thread/thr_mutex.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_cond.c | 8 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_mutex.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c index fc86378cfb88..e39ae63d8b56 100644 --- a/lib/libkse/thread/thr_cond.c +++ b/lib/libkse/thread/thr_cond.c @@ -336,7 +336,7 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; } } @@ -536,7 +536,7 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; } @@ -631,7 +631,7 @@ _pthread_cond_signal(pthread_cond_t * cond) kse_wakeup(kmbx); } /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; break; @@ -758,7 +758,7 @@ cond_wait_backout(void *arg) cond_queue_remove(cond, curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&cond->c_queue) == NULL) + if (TAILQ_EMPTY(&cond->c_queue)) cond->c_mutex = NULL; break; diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c index 39e36ff61ad1..6383cd83a04d 100644 --- a/lib/libkse/thread/thr_mutex.c +++ b/lib/libkse/thread/thr_mutex.c @@ -269,7 +269,7 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex) * Check to see if this mutex is in use: */ if (((*mutex)->m_owner != NULL) || - (TAILQ_FIRST(&(*mutex)->m_queue) != NULL) || + (!TAILQ_EMPTY(&(*mutex)->m_queue)) || ((*mutex)->m_refcount != 0)) { ret = EBUSY; diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c index fc86378cfb88..e39ae63d8b56 100644 --- a/lib/libpthread/thread/thr_cond.c +++ b/lib/libpthread/thread/thr_cond.c @@ -336,7 +336,7 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; } } @@ -536,7 +536,7 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; } @@ -631,7 +631,7 @@ _pthread_cond_signal(pthread_cond_t * cond) kse_wakeup(kmbx); } /* Check for no more waiters: */ - if (TAILQ_FIRST(&(*cond)->c_queue) == NULL) + if (TAILQ_EMPTY(&(*cond)->c_queue)) (*cond)->c_mutex = NULL; break; @@ -758,7 +758,7 @@ cond_wait_backout(void *arg) cond_queue_remove(cond, curthread); /* Check for no more waiters: */ - if (TAILQ_FIRST(&cond->c_queue) == NULL) + if (TAILQ_EMPTY(&cond->c_queue)) cond->c_mutex = NULL; break; diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 39e36ff61ad1..6383cd83a04d 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -269,7 +269,7 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex) * Check to see if this mutex is in use: */ if (((*mutex)->m_owner != NULL) || - (TAILQ_FIRST(&(*mutex)->m_queue) != NULL) || + (!TAILQ_EMPTY(&(*mutex)->m_queue)) || ((*mutex)->m_refcount != 0)) { ret = EBUSY; |