diff options
-rw-r--r-- | concurrency.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/concurrency.c b/concurrency.c index 78ac18b..03b4a68 100644 --- a/concurrency.c +++ b/concurrency.c @@ -25,9 +25,9 @@ static ThreadData **threads; int mainstacksize = STACKSIZE; void -recvtimeout(void *raw) +recvtimeout(void *) { - ThreadData *td = (ThreadData *)raw; + ThreadData *td = getthreaddata(); if(0 == sleep(td->timeout)){ qlock(&td->lock); td->timedout = 1; @@ -114,7 +114,7 @@ messagerecv(Function match, int timeout) if(timeout > 0){ td->timeout = timeout; qunlock(&td->lock); - timeoutid = proccreate(recvtimeout, td, STACKSIZE); + timeoutid = threadcreate(recvtimeout, nil, STACKSIZE); qlock(&td->lock); } td->timedout = 0; /* clear the timeout bit */ |