Rename cpu_pause() to pause(). Originally I was going to make this an

MI API with empty cpu_pause() functions on other arch's, but this
functionality is definitely unique to IA-32, so I decided to leave it
as i386-only and wrap it in #ifdef's.  I should have dropped the cpu_
prefix when I made that decision.

Requested by:	bde
This commit is contained in:
John Baldwin 2002-05-22 13:19:22 +00:00
parent aecf4d561b
commit 0228ea4e0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97113
4 changed files with 12 additions and 12 deletions

View File

@ -561,7 +561,7 @@ load_dr7(u_int sel)
} }
static __inline void static __inline void
cpu_pause(void) pause(void)
{ {
__asm __volatile("pause"); __asm __volatile("pause");
} }

View File

@ -561,7 +561,7 @@ load_dr7(u_int sel)
} }
static __inline void static __inline void
cpu_pause(void) pause(void)
{ {
__asm __volatile("pause"); __asm __volatile("pause");
} }

View File

@ -489,7 +489,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
if ((v = m->mtx_lock) == MTX_UNOWNED) { if ((v = m->mtx_lock) == MTX_UNOWNED) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -519,7 +519,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
(void *)(v | MTX_CONTESTED))) { (void *)(v | MTX_CONTESTED))) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -534,7 +534,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
owner->td_kse->ke_oncpu != NOCPU) { owner->td_kse->ke_oncpu != NOCPU) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -630,7 +630,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
while (m->mtx_lock != MTX_UNOWNED) { while (m->mtx_lock != MTX_UNOWNED) {
if (i++ < 10000000) { if (i++ < 10000000) {
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -644,7 +644,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
panic("spin lock %s held by %p for > 5 seconds", panic("spin lock %s held by %p for > 5 seconds",
m->mtx_object.lo_name, (void *)m->mtx_lock); m->mtx_object.lo_name, (void *)m->mtx_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
} }
critical_enter(); critical_enter();

View File

@ -489,7 +489,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
if ((v = m->mtx_lock) == MTX_UNOWNED) { if ((v = m->mtx_lock) == MTX_UNOWNED) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -519,7 +519,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
(void *)(v | MTX_CONTESTED))) { (void *)(v | MTX_CONTESTED))) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -534,7 +534,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
owner->td_kse->ke_oncpu != NOCPU) { owner->td_kse->ke_oncpu != NOCPU) {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -630,7 +630,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
while (m->mtx_lock != MTX_UNOWNED) { while (m->mtx_lock != MTX_UNOWNED) {
if (i++ < 10000000) { if (i++ < 10000000) {
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
continue; continue;
} }
@ -644,7 +644,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
panic("spin lock %s held by %p for > 5 seconds", panic("spin lock %s held by %p for > 5 seconds",
m->mtx_object.lo_name, (void *)m->mtx_lock); m->mtx_object.lo_name, (void *)m->mtx_lock);
#ifdef __i386__ #ifdef __i386__
cpu_pause(); pause();
#endif #endif
} }
critical_enter(); critical_enter();