summaryrefslogtreecommitdiffstats
path: root/tools/regression/geom/geom_kernsim.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-04-16 11:42:13 +0000
committerphk <phk@FreeBSD.org>2002-04-16 11:42:13 +0000
commitd9b060bed348d8dcfc6d151462f56bd5cdb9de1e (patch)
treec05ea6e18bb7021635382ed2389e0093888ad030 /tools/regression/geom/geom_kernsim.c
parentb9814500193331e3b93b279ab5224b997694ddfe (diff)
downloadFreeBSD-src-d9b060bed348d8dcfc6d151462f56bd5cdb9de1e.zip
FreeBSD-src-d9b060bed348d8dcfc6d151462f56bd5cdb9de1e.tar.gz
Forgot to commit the updates to the regression test suite.
Sponsored by: DARPA & NAI labs.
Diffstat (limited to 'tools/regression/geom/geom_kernsim.c')
-rw-r--r--tools/regression/geom/geom_kernsim.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/regression/geom/geom_kernsim.c b/tools/regression/geom/geom_kernsim.c
index de87bfc..ba3ccf6 100644
--- a/tools/regression/geom/geom_kernsim.c
+++ b/tools/regression/geom/geom_kernsim.c
@@ -104,7 +104,7 @@ wakeup(void *chan)
secrethandshake();
for (i = 0; i < NTHREAD; i++)
if (thr[i].wchan == chan) {
- // printf("wakeup %s\n", thr[i].name);
+ printf("wakeup %s\n", thr[i].name);
atomic_clear_int(&sleeping, 1 << i);
write(thr[i].pipe[1], "\0", 1);
}
@@ -136,13 +136,13 @@ tsleep(void *chan, int pri __unused, const char *wmesg, int timo)
tp->wchan = chan;
tp->wmesg = wmesg;
fd = tp->pipe[0];
- // printf("tsleep %s %p %s\n", tp->name, chan, wmesg);
+ printf("tsleep %s %p %s\n", tp->name, chan, wmesg);
for (;;) {
if (timo > 0) {
tv.tv_sec = 1;
tv.tv_usec = 0;
} else {
- tv.tv_sec = 10;
+ tv.tv_sec = 3;
tv.tv_usec = 0;
}
FD_ZERO(&r);
@@ -152,11 +152,10 @@ tsleep(void *chan, int pri __unused, const char *wmesg, int timo)
atomic_set_int(&sleeping, 1 << i);
j = select(fd + 1, &r, &w, &e, &tv);
secrethandshake();
- if (j)
- break;
- atomic_set_int(&sleeping, 1 << i);
+ break;
}
- i = read(fd, buf, sizeof(buf));
+ if (j)
+ i = read(fd, buf, sizeof(buf));
tp->wchan = 0;
tp->wmesg = 0;
return(i);
@@ -169,7 +168,7 @@ rattle()
for (;;) {
secrethandshake();
- usleep(100000);
+ usleep(500000);
secrethandshake();
i = sleeping & 7;
if (i != 7)
@@ -311,7 +310,7 @@ mtx_unlock_spin(struct mtx *mp)
}
void
-mtx_init(struct mtx *mp, char *bla __unused, int foo __unused)
+mtx_init(struct mtx *mp, const char *bla __unused, const char *yak __unused, int foo __unused)
{
mp->mtx_lock = 0;
}
OpenPOWER on IntegriCloud