From e192df6069dddeceb0616a53d4ed0918239eec90 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 5 Apr 2012 00:57:19 +0200 Subject: [PATCH] Fixed order of arguments to pthread_sigmask() --- src/c/threads/queue.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/c/threads/queue.d b/src/c/threads/queue.d index e22539c00..b41ac9a99 100644 --- a/src/c/threads/queue.d +++ b/src/c/threads/queue.d @@ -203,8 +203,8 @@ ecl_wait_on(cl_env_ptr env, cl_object (*condition)(cl_env_ptr, cl_object), cl_ob { sigset_t empty; sigemptyset(&empty); - sigaddset(&empty, ecl_option_values[ECL_OPT_TRAP_INTERRUPT_SIGNAL]); - pthread_sigmask(SIG_BLOCK, &original, &empty); + sigaddset(&empty, ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]); + pthread_sigmask(SIG_BLOCK, &empty, &original); } /* 2) Now we add ourselves to the queue. In order to avoid a @@ -253,7 +253,7 @@ ecl_wait_on(cl_env_ptr env, cl_object (*condition)(cl_env_ptr, cl_object), cl_ob /* 7) Restoring signals is done last, to ensure that all cleanup steps are performed. */ - pthread_sigmask(SIG_SETMASK, NULL, &original); + pthread_sigmask(SIG_SETMASK, &original, NULL); } CL_UNWIND_PROTECT_END; #else ecl_wait_on_timed(env, condition, o);