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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167085
3 changed files with 3 additions and 7 deletions

View File

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

View File

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

View File

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