Use pause() rather than tsleep() on explicit global dummy variables.
This commit is contained in:
parent
f36511e7f8
commit
84d37a463a
sys
@ -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);
|
||||
|
@ -82,8 +82,6 @@ struct fork_args {
|
||||
};
|
||||
#endif
|
||||
|
||||
static int forksleep; /* Place for fork1() to sleep on. */
|
||||
|
||||
/*
|
||||
* MPSAFE
|
||||
*/
|
||||
@ -772,7 +770,7 @@ fail:
|
||||
thread_single_end();
|
||||
PROC_UNLOCK(p1);
|
||||
}
|
||||
tsleep(&forksleep, PUSER, "fork", hz / 2);
|
||||
pause("fork", hz / 2);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user