Use pause() rather than tsleep() on explicit global dummy variables.

This commit is contained in:
John Baldwin 2007-02-27 17:22:30 +00:00
parent f36511e7f8
commit 84d37a463a
3 changed files with 3 additions and 7 deletions

View File

@ -110,7 +110,6 @@ static int
scsuspend(device_t dev) scsuspend(device_t dev)
{ {
int retry = 10; int retry = 10;
static int dummy;
sc_softc_t *sc; sc_softc_t *sc;
sc = &main_softc; sc = &main_softc;
@ -128,7 +127,7 @@ scsuspend(device_t dev)
if (!sc->switch_in_progress) { if (!sc->switch_in_progress) {
break; break;
} }
tsleep(&dummy, 0, "scsuspend", 100); pause("scsuspend", hz);
} while (retry--); } while (retry--);
return (0); return (0);

View File

@ -82,8 +82,6 @@ struct fork_args {
}; };
#endif #endif
static int forksleep; /* Place for fork1() to sleep on. */
/* /*
* MPSAFE * MPSAFE
*/ */
@ -772,7 +770,7 @@ fail:
thread_single_end(); thread_single_end();
PROC_UNLOCK(p1); PROC_UNLOCK(p1);
} }
tsleep(&forksleep, PUSER, "fork", hz / 2); pause("fork", hz / 2);
return (error); return (error);
} }

View File

@ -89,7 +89,6 @@ static int
scsuspend(device_t dev) scsuspend(device_t dev)
{ {
int retry = 10; int retry = 10;
static int dummy;
sc_softc_t *sc; sc_softc_t *sc;
sc = &main_softc; sc = &main_softc;
@ -107,7 +106,7 @@ scsuspend(device_t dev)
if (!sc->switch_in_progress) { if (!sc->switch_in_progress) {
break; break;
} }
tsleep(&dummy, 0, "scsuspend", 100); pause("scsuspend", hz);
} while (retry--); } while (retry--);
return (0); return (0);