diff options
author | rsc <devnull@localhost> | 2004-05-14 15:14:21 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-05-14 15:14:21 +0000 |
commit | 1a8f27c35024af7b4ed857a388d20f0a4a560db0 (patch) | |
tree | b70f33150772d665fd2c254655b2782289b0c9da /src/libthread | |
parent | a796abef1632f379ced703b1b2e691d8f63436e2 (diff) | |
download | plan9port-1a8f27c35024af7b4ed857a388d20f0a4a560db0.tar.gz plan9port-1a8f27c35024af7b4ed857a388d20f0a4a560db0.tar.bz2 plan9port-1a8f27c35024af7b4ed857a388d20f0a4a560db0.zip |
various bug fixes
Diffstat (limited to 'src/libthread')
-rw-r--r-- | src/libthread/fdwait.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libthread/fdwait.c b/src/libthread/fdwait.c index e583da60..b544f16d 100644 --- a/src/libthread/fdwait.c +++ b/src/libthread/fdwait.c @@ -174,8 +174,8 @@ _threadfdwait(int fd, int rw, ulong pc) struct { Channel c; - Alt *qentry[2]; ulong x; + Alt *qentry[2]; } s; threadfdwaitsetup(); @@ -214,11 +214,15 @@ threadsleep(int ms) struct { Channel c; ulong x; + Alt *qentry[2]; } s; threadfdwaitsetup(); chaninit(&s.c, sizeof(ulong), 1); - + s.c.qentry = (volatile Alt**)s.qentry; + s.c.nentry = 2; + memset(s.qentry, 0, sizeof s.qentry); + sleepchan[nsleep] = &s.c; sleeptime[nsleep++] = p9nsec()/1000000+ms; recvul(&s.c); |