Index: libcfa/src/concurrency/coroutine.hfa
===================================================================
--- libcfa/src/concurrency/coroutine.hfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/coroutine.hfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -10,6 +10,6 @@
 // Created On       : Mon Nov 28 12:27:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Feb  4 12:29:26 2020
-// Update Count     : 11
+// Last Modified On : Thu Jan  6 16:33:16 2022
+// Update Count     : 12
 //
 
@@ -155,5 +155,5 @@
 
 	if( unlikely(dst->context.SP == 0p) ) {
-		__stack_prepare(&dst->stack, 65000);
+		__stack_prepare(&dst->stack, DEFAULT_STACK_SIZE);
 		__cfactx_start(main, dst, cor, __cfactx_invoke_coroutine);
 	}
Index: libcfa/src/concurrency/invoke.h
===================================================================
--- libcfa/src/concurrency/invoke.h	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/invoke.h	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Dec  5 16:26:03 2019
-// Update Count     : 44
+// Last Modified On : Thu Jan  6 16:37:40 2022
+// Update Count     : 47
 //
 
@@ -27,4 +27,6 @@
 #ifndef _INVOKE_H_
 #define _INVOKE_H_
+
+	enum { DEFAULT_STACK_SIZE = 65000 };
 
 	struct __cfaehm_try_resume_node;
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/kernel.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -142,16 +142,4 @@
 extern void __disable_interrupts_hard();
 extern void __enable_interrupts_hard();
-
-static inline void __disable_interrupts_checked() {
-	/* paranoid */ verify( __preemption_enabled() );
-	disable_interrupts();
-	/* paranoid */ verify( ! __preemption_enabled() );
-}
-
-static inline void __enable_interrupts_checked( bool poll = true ) {
-	/* paranoid */ verify( ! __preemption_enabled() );
-	enable_interrupts( poll );
-	/* paranoid */ verify( __preemption_enabled() );
-}
 
 
@@ -776,12 +764,13 @@
 // Unconditionnaly wake a thread
 void __wake_proc(processor * this) {
+	/* paranoid */ verify( ! __preemption_enabled() );
+
 	__cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this);
 
-	__disable_interrupts_checked();
-		/* paranoid */ verify( ! __preemption_enabled() );
-		eventfd_t val;
-		val = 1;
-		eventfd_write( this->idle_fd, val );
-	__enable_interrupts_checked();
+	eventfd_t val;
+	val = 1;
+	eventfd_write( this->idle_fd, val );
+
+	/* paranoid */ verify( ! __preemption_enabled() );
 }
 
Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -279,5 +279,7 @@
 	// When its coroutine terminates, it return control to the mainThread
 	// which is currently here
+	/* paranoid */ verify( !__atomic_load_n(&mainProcessor->do_terminate, __ATOMIC_ACQUIRE) );
 	__atomic_store_n(&mainProcessor->do_terminate, true, __ATOMIC_RELEASE);
+	__wake_proc( mainProcessor );
 	__kernel_last_resume( __cfaabi_tls.this_processor );
 	mainThread->self_cor.state = Halted;
@@ -403,5 +405,5 @@
 
 	__cfaabi_tls.this_thread->curr_cor = dst;
-	__stack_prepare( &dst->stack, 65000 );
+	__stack_prepare( &dst->stack, DEFAULT_STACK_SIZE );
 	__cfactx_start(main, dst, this->runner, __cfactx_invoke_coroutine);
 
@@ -564,13 +566,14 @@
 extern size_t __page_size;
 void ^?{}(processor & this) with( this ){
-	if( ! __atomic_load_n(&do_terminate, __ATOMIC_ACQUIRE) ) {
-		__cfadbg_print_safe(runtime_core, "Kernel : core %p signaling termination\n", &this);
-
-		__atomic_store_n(&do_terminate, true, __ATOMIC_RELAXED);
+	/* paranoid */ verify( !__atomic_load_n(&do_terminate, __ATOMIC_ACQUIRE) );
+	__cfadbg_print_safe(runtime_core, "Kernel : core %p signaling termination\n", &this);
+
+	__atomic_store_n(&do_terminate, true, __ATOMIC_RELAXED);
+	__disable_interrupts_checked();
 		__wake_proc( &this );
-
-		wait( terminated );
-		/* paranoid */ verify( active_processor() != &this);
-	}
+	__enable_interrupts_checked();
+
+	wait( terminated );
+	/* paranoid */ verify( active_processor() != &this);
 
 	__destroy_pthread( kernel_thread, this.stack, 0p );
@@ -721,8 +724,5 @@
 	check( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute
 
-	size_t stacksize;
-	// default stack size, normally defined by shell limit
-	check( pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" );
-	assert( stacksize >= PTHREAD_STACK_MIN );
+	size_t stacksize = DEFAULT_STACK_SIZE;
 
 	void * stack;
@@ -749,7 +749,5 @@
 	#endif
 
-
 	check( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" );
-
 	check( pthread_create( pthread, &attr, start, arg ), "pthread_create" );
 	return stack;
Index: libcfa/src/concurrency/kernel_private.hfa
===================================================================
--- libcfa/src/concurrency/kernel_private.hfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/kernel_private.hfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -60,4 +60,16 @@
 extern bool __preemption_enabled();
 
+static inline void __disable_interrupts_checked() {
+	/* paranoid */ verify( __preemption_enabled() );
+	disable_interrupts();
+	/* paranoid */ verify( ! __preemption_enabled() );
+}
+
+static inline void __enable_interrupts_checked( bool poll = true ) {
+	/* paranoid */ verify( ! __preemption_enabled() );
+	enable_interrupts( poll );
+	/* paranoid */ verify( __preemption_enabled() );
+}
+
 //release/wake-up the following resources
 void __thread_finish( thread$ * thrd );
Index: libcfa/src/concurrency/locks.hfa
===================================================================
--- libcfa/src/concurrency/locks.hfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/locks.hfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -177,4 +177,5 @@
 };
 
+static inline void ?{}(fast_lock & this) __attribute__((deprecated("use linear_backoff_then_block_lock instead")));
 static inline void ?{}(fast_lock & this) { this.owner = 0p; }
 
@@ -184,5 +185,5 @@
 }
 
-static inline void lock( fast_lock & this ) __attribute__((artificial));
+static inline void lock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
 static inline void lock( fast_lock & this ) {
 	thread$ * thrd = active_thread();
@@ -195,5 +196,5 @@
 }
 
-static inline bool try_lock( fast_lock & this ) __attribute__((artificial));
+static inline bool try_lock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
 static inline bool try_lock ( fast_lock & this ) {
 	thread$ * thrd = active_thread();
@@ -202,5 +203,5 @@
 }
 
-static inline thread$ * unlock( fast_lock & this ) __attribute__((artificial));
+static inline thread$ * unlock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
 static inline thread$ * unlock( fast_lock & this ) {
 	/* paranoid */ verify(active_thread() == this.owner);
Index: libcfa/src/concurrency/thread.hfa
===================================================================
--- libcfa/src/concurrency/thread.hfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ libcfa/src/concurrency/thread.hfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec  4 09:18:14 2019
-// Update Count     : 6
+// Last Modified On : Thu Jan  6 16:40:16 2022
+// Update Count     : 7
 //
 
@@ -65,12 +65,12 @@
 void ^?{}(thread$ & this);
 
-static inline void ?{}(thread$ & this)                                                                  { this{ "Anonymous Thread", *mainCluster, 0p, 65000 }; }
+static inline void ?{}(thread$ & this)                                                                  { this{ "Anonymous Thread", *mainCluster, 0p, DEFAULT_STACK_SIZE }; }
 static inline void ?{}(thread$ & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, 0p, stackSize }; }
 static inline void ?{}(thread$ & this, void * storage, size_t storageSize )                             { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; }
-static inline void ?{}(thread$ & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, 0p, 65000 }; }
+static inline void ?{}(thread$ & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, 0p, DEFAULT_STACK_SIZE }; }
 static inline void ?{}(thread$ & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, 0p, stackSize }; }
 static inline void ?{}(thread$ & this, struct cluster & cl, void * storage, size_t storageSize )        { this{ "Anonymous Thread", cl, storage, storageSize }; }
-static inline void ?{}(thread$ & this, const char * const name)                                         { this{ name, *mainCluster, 0p, 65000 }; }
-static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl )                   { this{ name, cl, 0p, 65000 }; }
+static inline void ?{}(thread$ & this, const char * const name)                                         { this{ name, *mainCluster, 0p, DEFAULT_STACK_SIZE }; }
+static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl )                   { this{ name, cl, 0p, DEFAULT_STACK_SIZE }; }
 static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, 0p, stackSize }; }
 
Index: tests/meta/.expect/dumpable.txt
===================================================================
--- tests/meta/.expect/dumpable.txt	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
+++ tests/meta/.expect/dumpable.txt	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -0,0 +1,1 @@
+Done
Index: tests/meta/dumpable.cfa
===================================================================
--- tests/meta/dumpable.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
+++ tests/meta/dumpable.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -0,0 +1,114 @@
+//
+// 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.
+//
+// dumpable.cfa -- Check if everything looks correctly set to dump core
+//
+// Author           : Thierry Delisle
+// Created On       : Wed Jan 05 13:53:22 2022
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <limits.h>
+#include <errno.h>
+
+#include <fstream.hfa>
+
+extern "C" {
+	#include <sys/prctl.h>
+	#include <sys/resource.h>
+	#include <sys/statvfs.h>
+	#include <unistd.h>
+}
+
+void check_ulimit() {
+	struct rlimit rlp;
+	getrlimit(RLIMIT_CORE, &rlp);
+	if(rlp.rlim_cur < 536870912) {
+		serr | "Soft core limit is less than ~500Mb: " | rlp.rlim_cur;
+	}
+
+	if(rlp.rlim_max < 536870912) {
+		serr | "Hard core limit is less than ~500Mb: " | rlp.rlim_max;
+	}
+}
+
+void check_permission() {
+	{
+		char myExe[PATH_MAX];
+		ssize_t n = readlink("/proc/self/exe", myExe, sizeof(myExe));
+		if (n < 0) {
+			perror("readlink(/proc/self/exe) error");
+			return 1;
+		}
+		myExe[n] = '\0';
+
+		if(int r = access(myExe, F_OK); r != 0) serr | "Expected current executable does not exist!" | r | errno;
+		if(int r = access(myExe, R_OK); r != 0) serr | "No read access for current executable" | r | errno;
+	}
+
+	{
+		char myCwd[PATH_MAX];
+		if (getcwd(myCwd, sizeof(myCwd)) == 0p) {
+			perror("getcwd() error");
+			return;
+		}
+
+		if(access(myCwd, F_OK) != 0) serr | "Expected current working directory does not exist!";
+		if(access(myCwd, R_OK) != 0) serr | "No read access for current working directory";
+		if(access(myCwd, W_OK) != 0) serr | "No write access for current working directory";
+	}
+}
+
+void check_free_space() {
+	struct statvfs buf;
+	if(statvfs(".", &buf) != 0) {
+		perror("statvfs() error");
+		return;
+	}
+
+	if((buf.f_bsize * buf.f_bavail) < 536870912) {
+		serr | "Available diskspace is less than ~500Mb: " | (buf.f_bsize * buf.f_bavail);
+	}
+
+	if(buf.f_favail < 10) {
+		serr | "Available inodes is less than 10: " | buf.f_favail;
+	}
+
+	if(buf.f_flag & ST_RDONLY) {
+		serr | "Filesystem is read only";
+	}
+}
+
+void check_noconflict() {
+	char * name = "./core";
+	if(access("./core", F_OK) == 0) serr | "A file of the core name ('" | name | "') already exists";
+}
+
+void check_dumpflag() {
+	int r = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
+	if(r < 0) {
+		perror("prctl(PR_GET_DUMPABLE) error");
+		return;
+	}
+
+	if(r != 1) serr | "dumpable attribute not set to 1 \"(SUID_DUMP_USER, process is dumpable)\", was" | r;
+}
+
+int main() {
+	check_ulimit();
+
+	check_permission();
+
+	check_free_space();
+
+	check_noconflict();
+
+	check_dumpflag();
+
+	sout | "Done";
+}
Index: sts/unified_locking/.expect/fast.txt
===================================================================
--- tests/unified_locking/.expect/fast.txt	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-Starting
-Done!
-Match!
Index: sts/unified_locking/fast.cfa
===================================================================
--- tests/unified_locking/fast.cfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#include <locks.hfa>
-
-#define LOCK fast_lock
-#include "mutex_test.hfa"
-
-int main() {
-    test();
-}
Index: tests/unified_locking/mutex_test.hfa
===================================================================
--- tests/unified_locking/mutex_test.hfa	(revision 0ac728b17dd68c98eeef78c246611b6f9f49265a)
+++ tests/unified_locking/mutex_test.hfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -10,4 +10,5 @@
 	thread$ * id;
 	uint32_t sum;
+	uint32_t cnt;
 };
 
@@ -27,8 +28,10 @@
 	{
 		uint32_t tsum = mo.sum;
+		uint32_t cnt = mo.cnt;
 		mo.id = me;
 		yield(random(5));
 		value = ((uint32_t)random()) ^ ((uint32_t)me);
 		if(mo.id != me) sout | "Intruder!";
+		mo.cnt = cnt + 1;
 		mo.sum = tsum + value;
 	}
@@ -54,4 +57,5 @@
 	uint32_t sum = -32;
 	mo.sum = -32;
+	mo.cnt = 0;
 	processor p[2];
 	sout | "Starting";
@@ -63,4 +67,5 @@
 	}
 	sout | "Done!";
+	if(mo.cnt != (13 * num_times)) sout | "Invalid cs count!" | mo.cnt | "vs "| (13 * num_times) | "(13 *" | num_times | ')';
 	if(sum == mo.sum) sout | "Match!";
 	else sout | "No Match!" | sum | "vs" | mo.sum;
Index: tests/zombies/fastlock.cfa
===================================================================
--- tests/zombies/fastlock.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
+++ tests/zombies/fastlock.cfa	(revision 4233338b942e20cfe71baf06a1d6257626d2ec32)
@@ -0,0 +1,8 @@
+#include <locks.hfa>
+
+#define LOCK fast_lock
+#include "mutex_test.hfa"
+
+int main() {
+    test();
+}
