Index: src/libcfa/bits/locks.h
===================================================================
--- src/libcfa/bits/locks.h	(revision b68382146bfc9aa68160d565370751e4f3074dd7)
+++ src/libcfa/bits/locks.h	(revision dbe9b08cb6411af77959a6bea07d14db2c8e18ed)
@@ -58,4 +58,9 @@
 
 #ifdef __cforall
+	extern "C" {
+		extern void disable_interrupts();
+		extern void enable_interrupts_noPoll();
+	}
+
 	extern void yield( unsigned int );
 	extern thread_local struct thread_desc *    volatile this_thread;
@@ -68,10 +73,11 @@
 	static inline _Bool try_lock  ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
 		_Bool result = __lock_test_and_test_and_set( this.lock );
-		__cfaabi_dbg_debug_do(
-			if( result ) {
+		if( result ) {
+			disable_interrupts();
+			__cfaabi_dbg_debug_do(
 				this.prev_name = caller;
 				this.prev_thrd = this_thread;
-			}
-		)
+			)
+		}
 		return result;
 	}
@@ -99,4 +105,5 @@
 			#endif
 		}
+		disable_interrupts();
 		__cfaabi_dbg_debug_do(
 			this.prev_name = caller;
@@ -111,4 +118,5 @@
 			yield( i );
 		}
+		disable_interrupts();
 		__cfaabi_dbg_debug_do(
 			this.prev_name = caller;
@@ -119,4 +127,5 @@
 	static inline void unlock( __spinlock_t & this ) {
 		__lock_release( this.lock );
+		enable_interrupts_noPoll();
 	}
 #endif
Index: src/libcfa/bits/signal.h
===================================================================
--- src/libcfa/bits/signal.h	(revision dbe9b08cb6411af77959a6bea07d14db2c8e18ed)
+++ src/libcfa/bits/signal.h	(revision dbe9b08cb6411af77959a6bea07d14db2c8e18ed)
@@ -0,0 +1,65 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// bits/signal.h -- Helper functions and defines to use signals
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Jan 25 16:06:29 2018
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#pragma once
+
+#include "bits/debug.h"
+#include "bits/defs.h"
+
+extern "C" {
+#include <errno.h>
+#define __USE_GNU
+#include <signal.h>
+#undef __USE_GNU
+#include <stdlib.h>
+#include <string.h>
+}
+
+// Short hands for signal context information
+#define __CFA_SIGCXT__ ucontext_t *
+#define __CFA_SIGPARMS__ __attribute__((unused)) int sig, __attribute__((unused)) siginfo_t *sfp, __attribute__((unused)) __CFA_SIGCXT__ cxt
+
+// Sigaction wrapper : register an signal handler
+static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags ) {
+	struct sigaction act;
+
+	act.sa_sigaction = (void (*)(int, siginfo_t *, void *))handler;
+	act.sa_flags = flags;
+
+	if ( sigaction( sig, &act, NULL ) == -1 ) {
+		__cfaabi_dbg_print_buffer_decl(
+			" __kernel_sigaction( sig:%d, handler:%p, flags:%d ), problem installing signal handler, error(%d) %s.\n",
+			sig, handler, flags, errno, strerror( errno )
+		);
+		_exit( EXIT_FAILURE );
+	}
+}
+
+// Sigaction wrapper : restore default handler
+static void __kernel_sigdefault( int sig ) {
+	struct sigaction act;
+
+	act.sa_handler = SIG_DFL;
+	act.sa_flags = 0;
+	sigemptyset( &act.sa_mask );
+
+	if ( sigaction( sig, &act, NULL ) == -1 ) {
+		__cfaabi_dbg_print_buffer_decl(
+			" __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n",
+			sig, errno, strerror( errno )
+		);
+		_exit( EXIT_FAILURE );
+	}
+}
