diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2003-04-17 22:28:58 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2003-04-17 22:28:58 +0000 |
| commit | 27dad03c9734450330c2c7ef240a60f542900f5e (patch) | |
| tree | 7f05b753c33a0474e1f033cc1c76a2c2688706de /sys/kern/kern_mutex.c | |
| parent | 0bfc4d1445698fd9095e92e4838ad3be5211593e (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_mutex.c')
| -rw-r--r-- | sys/kern/kern_mutex.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 072293156115..a2617f9621ee 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -70,11 +70,6 @@ #define mtx_owner(m) (mtx_unowned((m)) ? NULL \ : (struct thread *)((m)->mtx_lock & MTX_FLAGMASK)) -/* XXXKSE This test will change. */ -#define thread_running(td) \ - (td->td_state == TDS_RUNNING) - /* ((td)->td_oncpu != NOCPU) */ - /* * Lock classes for sleep and spin mutexes. */ @@ -561,9 +556,9 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line) * CPU, spin instead of blocking. */ owner = (struct thread *)(v & MTX_FLAGMASK); - if (m != &Giant && thread_running(owner)) { + if (m != &Giant && TD_IS_RUNNING(owner)) { mtx_unlock_spin(&sched_lock); - while (mtx_owner(m) == owner && thread_running(owner)) { + while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { #ifdef __i386__ ia32_pause(); #endif |
