Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/tools/ctf/cvt ctfmerge: fix macOS s...
details: https://anonhg.NetBSD.org/src/rev/7a0bf190f643
branches: trunk
changeset: 375995:7a0bf190f643
user: lukem <lukem%NetBSD.org@localhost>
date: Thu May 25 12:53:56 2023 +0000
description:
ctfmerge: fix macOS semaphore implementation, part 2
dispatch_semaphore_signal() doesn't return an error, just an
indicator of whether a thread was woken or not, so there's
no need to fail on non-zero return.
diffstat:
external/cddl/osnet/dist/tools/ctf/cvt/barrier.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (15 lines):
diff -r 6ac2416adeaa -r 7a0bf190f643 external/cddl/osnet/dist/tools/ctf/cvt/barrier.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c Thu May 25 12:07:43 2023 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c Thu May 25 12:53:56 2023 +0000
@@ -109,9 +109,8 @@ barrier_wait(barrier_t *bar)
if ((errno = sema_post(&bar->bar_sem)) != 0)
terminate("%s: sema_post(bar_sem)", __func__);
#elif defined(HAVE_DISPATCH_SEMAPHORE_CREATE)
- if ((error = dispatch_semaphore_signal(bar->bar_sem)) != 0)
- terminate("%s: dispatch_semaphore_signal(bar_sem) = %ld\n",
- __func__, error);
+ /* return value doesn't matter */
+ dispatch_semaphore_signal(bar->bar_sem);
#else
if (sem_post(&bar->bar_sem) == -1)
terminate("%s: sem_post(bar_sem)", __func__);
Home |
Main Index |
Thread Index |
Old Index