summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-05-16 12:15:02 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-05-16 12:15:02 +0000
commit54fca2a55b88b6130ceceaa4b493e022ad3d4d72 (patch)
tree94041def67890ccdb72de7b5d1b44085eb78d193
parentfd7f369b1f1390e1d0647589d283f1fb41a1105d (diff)
No need to unlock/lock there
-rw-r--r--concurrency.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/concurrency.c b/concurrency.c
index 03b4a68..139883c 100644
--- a/concurrency.c
+++ b/concurrency.c
@@ -113,9 +113,7 @@ messagerecv(Function match, int timeout)
int timeoutid = 0;
if(timeout > 0){
td->timeout = timeout;
- qunlock(&td->lock);
timeoutid = threadcreate(recvtimeout, nil, STACKSIZE);
- qlock(&td->lock);
}
td->timedout = 0; /* clear the timeout bit */
while(td->mail == nil && !td->timedout){