diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-11-22 22:29:31 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-11-22 22:29:31 +0100 |
commit | 55d31f2cab0101dfbdeb2857e2fce2629080cf02 (patch) | |
tree | 90a653927ee803495d55ca049e45157cb0bf5339 /sys/src/9/pc/ether82598.c | |
parent | df6b68092cf2806d7c517e15d2db57b0b19a9788 (diff) |
pc kernel: kproc error and exit
catch the error() that can be thrown by sleep() and tsleep()
in kprocs.
add missing pexit() calls.
always set the freemem argument to pexit() from kproc otherwise
the process gets added to the broken list.
Diffstat (limited to 'sys/src/9/pc/ether82598.c')
-rw-r--r-- | sys/src/9/pc/ether82598.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/9/pc/ether82598.c b/sys/src/9/pc/ether82598.c index eaba15e82..b786eced7 100644 --- a/sys/src/9/pc/ether82598.c +++ b/sys/src/9/pc/ether82598.c @@ -375,6 +375,8 @@ lproc(void *v) e = v; c = e->ctlr; + while(waserror()) + ; for (;;) { r = c->reg[Links]; e->link = (r & Lnkup) != 0; @@ -467,6 +469,8 @@ tproc(void *v) e = v; c = e->ctlr; + while(waserror()) + ; for (;;) { sleep(&c->trendez, tim, c); /* transmit kicks us */ c->tim = 0; @@ -551,6 +555,8 @@ rproc(void *v) c = e->ctlr; m = c->nrd - 1; rdh = 0; + while(waserror()) + ; loop: replenish(c, rdh); im(c, Irx0); |