diff options
author | 2012-01-17 02:34:18 +0000 | |
---|---|---|
committer | 2012-01-17 02:34:18 +0000 | |
commit | 2aa8ea07027e21f7e3a39dbbc13d2a3af24af722 (patch) | |
tree | 5169bf71eaf80e7fda22d364a1fdfb1d5decc13b /lib/librthread/rthread_file.c | |
parent | net_addrcmp() dies. found out to be a horrific function by eric (diff) | |
download | wireguard-openbsd-2aa8ea07027e21f7e3a39dbbc13d2a3af24af722.tar.xz wireguard-openbsd-2aa8ea07027e21f7e3a39dbbc13d2a3af24af722.zip |
Reimplement mutexes, condvars, and rwlocks to eliminate bugs,
particularly the "consume the signal you just sent" hang, and putting
the wait queues in userspace.
Do cancellation handling in pthread_cond_*wait(), pthread_join(),
and sem_wait().
Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add
'abort" argument to thrsleep to close cancellation race; make
thr{sleep,wakeup} return errno values via *retval to avoid touching
userspace errno.
Diffstat (limited to 'lib/librthread/rthread_file.c')
-rw-r--r-- | lib/librthread/rthread_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/librthread/rthread_file.c b/lib/librthread/rthread_file.c index 14190662885..28bad52d0c2 100644 --- a/lib/librthread/rthread_file.c +++ b/lib/librthread/rthread_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_file.c,v 1.3 2011/11/06 11:48:59 guenther Exp $ */ +/* $OpenBSD: rthread_file.c,v 1.4 2012/01/17 02:34:18 guenther Exp $ */ /* * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -204,7 +204,7 @@ void */ TAILQ_INSERT_TAIL(&p->lockers,self,waiting); while (p->owner != self) { - thrsleep(self, 0, NULL, &hash_lock); + __thrsleep(self, 0, NULL, &hash_lock, NULL); _spinlock(&hash_lock); } } @@ -292,7 +292,7 @@ void */ p->count = 1; - thrwakeup(p->owner, 1); + __thrwakeup(p->owner, 1); } } } |