diff options
author | 2012-03-02 08:07:43 +0000 | |
---|---|---|
committer | 2012-03-02 08:07:43 +0000 | |
commit | 1efc366f026941a5f5f7619cbe39bf4b17e2b119 (patch) | |
tree | 4eb6551624ae364c92ca100afd2ad82face806a5 | |
parent | Don't include ou=People in the basedn. ypldap(8) has had netid support (diff) | |
download | wireguard-openbsd-1efc366f026941a5f5f7619cbe39bf4b17e2b119.tar.xz wireguard-openbsd-1efc366f026941a5f5f7619cbe39bf4b17e2b119.zip |
_SPINLOCK_UNLOCKED isn't zero everywhere (*cough*hppa*cough*), so
sem_init() can't assume that calloc will leave the embedded spinlock
in the unlocked state
ok miod@ otto@
-rw-r--r-- | lib/librthread/rthread_sem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librthread/rthread_sem.c b/lib/librthread/rthread_sem.c index 66c22af4b9a..3a410b62155 100644 --- a/lib/librthread/rthread_sem.c +++ b/lib/librthread/rthread_sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sem.c,v 1.4 2012/01/17 02:34:18 guenther Exp $ */ +/* $OpenBSD: rthread_sem.c,v 1.5 2012/03/02 08:07:43 guenther Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -92,6 +92,7 @@ sem_init(sem_t *semp, int pshared, unsigned int value) errno = ENOSPC; return (-1); } + sem->lock = _SPINLOCK_UNLOCKED; sem->value = value; *semp = sem; |