summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-12-27 11:09:48 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-12-27 11:09:48 +0300
commit75ab7472cf3684077dba89ab504a8aaa4c4abc59 (patch)
tree27622b41027a56026b166c05996bfbefccfbef74 /pthread_stop_world.c
parent468ac9bd39e73325bb5afdc1f957eaec5ac1b3fc (diff)
downloadbdwgc-75ab7472cf3684077dba89ab504a8aaa4c4abc59.tar.gz
Fix error code in abort message if sem_wait failed in start_world (NetBSD)
* pthread_stop_world.c [GC_NETBSD_THREADS_WORKAROUND] (GC_start_world): Print errno instead of the value returned by sem_wait if the latter has failed; remove "code" local variable.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 405fa96c..e5d80889 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -1093,12 +1093,10 @@ GC_INNER void GC_start_world(void)
}
# ifdef GC_NETBSD_THREADS_WORKAROUND
for (i = 0; i < n_live_threads; i++) {
- int code;
-
- while (0 != (code = sem_wait(&GC_restart_ack_sem))) {
+ while (0 != sem_wait(&GC_restart_ack_sem)) {
if (errno != EINTR) {
ABORT_ARG1("sem_wait() for restart handler failed",
- ": errcode= %d", code);
+ ": errcode= %d", errno);
}
}
}