summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_cond.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-05-31 14:38:22 +0000
committermtm <mtm@FreeBSD.org>2003-05-31 14:38:22 +0000
commite454f0b24397cfb0e2e61b8e804b101c4095708b (patch)
tree2ce2b27d372050112f9145ef69d1d4516c19b15e /lib/libthr/thread/thr_cond.c
parentd535a2bede497c2a96ac85a112dec900ea2d4691 (diff)
downloadFreeBSD-src-e454f0b24397cfb0e2e61b8e804b101c4095708b.zip
FreeBSD-src-e454f0b24397cfb0e2e61b8e804b101c4095708b.tar.gz
I botched one of my committs in the last round. Fix it.
Diffstat (limited to 'lib/libthr/thread/thr_cond.c')
-rw-r--r--lib/libthr/thread/thr_cond.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c
index 95e5589..6a86b39 100644
--- a/lib/libthr/thread/thr_cond.c
+++ b/lib/libthr/thread/thr_cond.c
@@ -529,10 +529,11 @@ cond_queue_enq(pthread_cond_t cond, pthread_t pthread)
static inline int
cond_init(pthread_cond_t *cond)
{
+ int error = 0;
_SPINLOCK(&static_cond_lock);
if (*cond == PTHREAD_COND_INITIALIZER)
- return (_pthread_cond_init(cond, NULL));
+ error = _pthread_cond_init(cond, NULL);
_SPINUNLOCK(&static_cond_lock);
- return (0);
+ return (error);
}
OpenPOWER on IntegriCloud