diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-01-07 02:26:29 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-01-07 02:26:29 +0000 |
commit | 70ef09a6953e9fac946a898ec2e562c87f16678c (patch) | |
tree | 00d5e2766040c896d9329fad9b9b8cb56d3ac1c0 /lib/libthr/thread/thr_sem.c | |
parent | 6b59f7502038ec82b37976e254d33b07f80e2f8b (diff) | |
download | FreeBSD-src-70ef09a6953e9fac946a898ec2e562c87f16678c.zip FreeBSD-src-70ef09a6953e9fac946a898ec2e562c87f16678c.tar.gz |
sem_post() requires to return -1 on error.
Diffstat (limited to 'lib/libthr/thread/thr_sem.c')
-rw-r--r-- | lib/libthr/thread/thr_sem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_sem.c b/lib/libthr/thread/thr_sem.c index ec059f9..6a0bfc1 100644 --- a/lib/libthr/thread/thr_sem.c +++ b/lib/libthr/thread/thr_sem.c @@ -282,8 +282,8 @@ _sem_post(sem_t *sem) if ((*sem)->nwaiters) { retval = _thr_umtx_wake(&(*sem)->count, 1); - if (retval > 0) - retval = 0; + if (retval != 0) + retval = -1; } return (retval); } |