Index: libcfa/src/concurrency/coroutine.cfa
===================================================================
--- libcfa/src/concurrency/coroutine.cfa	(revision 9fb13671f5201abdee9d86e8dcf476235dda9862)
+++ libcfa/src/concurrency/coroutine.cfa	(revision eb24cec0a055a7ee6a5524a7c6546fe58d49f85a)
@@ -196,8 +196,8 @@
 
 void __stack_clean  ( __stack_info_t * this ) {
-	size_t size = ((intptr_t)this->storage->base) - ((intptr_t)this->storage->limit) + sizeof(__stack_t);
 	void * storage = this->storage->limit;
 
 	#if CFA_COROUTINE_USE_MMAP
+		size_t size = ((intptr_t)this->storage->base) - ((intptr_t)this->storage->limit) + sizeof(__stack_t);
 		storage = (void *)(((intptr_t)storage) - __page_size);
 		if(munmap(storage, size + __page_size) == -1) {
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 9fb13671f5201abdee9d86e8dcf476235dda9862)
+++ libcfa/src/concurrency/kernel.cfa	(revision eb24cec0a055a7ee6a5524a7c6546fe58d49f85a)
@@ -109,4 +109,5 @@
 static void __run_thread(processor * this, $thread * dst);
 static void __wake_one(cluster * cltr);
+static void wait(__bin_sem_t & this);
 
 static void push  (__cluster_idles & idles, processor & proc);
@@ -548,4 +549,35 @@
 // Kernel Idle Sleep
 //=============================================================================================
+extern "C" {
+	char * strerror(int);
+}
+#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: Operation \"" #x "\" return error %d - %s\n", err, strerror(err)); }
+
+static void wait(__bin_sem_t & this) with( this ) {
+	verify(__cfaabi_dbg_in_kernel());
+	CHECKED( pthread_mutex_lock(&lock) );
+		while(val < 1) {
+			pthread_cond_wait(&cond, &lock);
+		}
+		val -= 1;
+	CHECKED( pthread_mutex_unlock(&lock) );
+}
+
+static bool post(__bin_sem_t & this) with( this ) {
+	bool needs_signal = false;
+
+	CHECKED( pthread_mutex_lock(&lock) );
+		if(val < 1) {
+			val += 1;
+			pthread_cond_signal(&cond);
+			needs_signal = true;
+		}
+	CHECKED( pthread_mutex_unlock(&lock) );
+
+	return needs_signal;
+}
+
+#undef CHECKED
+
 // Wake a thread from the front if there are any
 static void __wake_one(cluster * this) {
Index: libcfa/src/concurrency/kernel.hfa
===================================================================
--- libcfa/src/concurrency/kernel.hfa	(revision 9fb13671f5201abdee9d86e8dcf476235dda9862)
+++ libcfa/src/concurrency/kernel.hfa	(revision eb24cec0a055a7ee6a5524a7c6546fe58d49f85a)
@@ -34,9 +34,4 @@
 #endif
 
-extern "C" {
-	char * strerror(int);
-}
-#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: Operation \"" #x "\" return error %d - %s\n", err, strerror(err)); }
-
 struct __bin_sem_t {
 	pthread_mutex_t 	lock;
@@ -44,47 +39,4 @@
 	int     		val;
 };
-
-static inline void ?{}(__bin_sem_t & this) with( this ) {
-	// Create the mutex with error checking
-	pthread_mutexattr_t mattr;
-	pthread_mutexattr_init( &mattr );
-	pthread_mutexattr_settype( &mattr, PTHREAD_MUTEX_ERRORCHECK_NP);
-	pthread_mutex_init(&lock, &mattr);
-
-	pthread_cond_init (&cond, (const pthread_condattr_t *)0p);  // workaround trac#208: cast should not be required
-	val = 0;
-}
-
-static inline void ^?{}(__bin_sem_t & this) with( this ) {
-	CHECKED( pthread_mutex_destroy(&lock) );
-	CHECKED( pthread_cond_destroy (&cond) );
-}
-
-static inline void wait(__bin_sem_t & this) with( this ) {
-	verify(__cfaabi_dbg_in_kernel());
-	CHECKED( pthread_mutex_lock(&lock) );
-		while(val < 1) {
-			pthread_cond_wait(&cond, &lock);
-		}
-		val -= 1;
-	CHECKED( pthread_mutex_unlock(&lock) );
-}
-
-static inline bool post(__bin_sem_t & this) with( this ) {
-	bool needs_signal = false;
-
-	CHECKED( pthread_mutex_lock(&lock) );
-		if(val < 1) {
-			val += 1;
-			pthread_cond_signal(&cond);
-			needs_signal = true;
-		}
-	CHECKED( pthread_mutex_unlock(&lock) );
-
-	return needs_signal;
-}
-
-#undef CHECKED
-
 
 //-----------------------------------------------------------------------------
Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision 9fb13671f5201abdee9d86e8dcf476235dda9862)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision eb24cec0a055a7ee6a5524a7c6546fe58d49f85a)
@@ -80,4 +80,6 @@
 static void ?{}(processorCtx_t & this) {}
 static void ?{}(processorCtx_t & this, processor * proc, current_stack_info_t * info);
+static void ?{}(__bin_sem_t & this);
+static void ^?{}(__bin_sem_t & this);
 
 #if defined(__CFA_WITH_VERIFY__)
@@ -736,4 +738,26 @@
 }
 
+extern "C" {
+	char * strerror(int);
+}
+#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: Operation \"" #x "\" return error %d - %s\n", err, strerror(err)); }
+
+static void ?{}(__bin_sem_t & this) with( this ) {
+	// Create the mutex with error checking
+	pthread_mutexattr_t mattr;
+	pthread_mutexattr_init( &mattr );
+	pthread_mutexattr_settype( &mattr, PTHREAD_MUTEX_ERRORCHECK_NP);
+	pthread_mutex_init(&lock, &mattr);
+
+	pthread_cond_init (&cond, (const pthread_condattr_t *)0p);  // workaround trac#208: cast should not be required
+	val = 0;
+}
+
+static void ^?{}(__bin_sem_t & this) with( this ) {
+	CHECKED( pthread_mutex_destroy(&lock) );
+	CHECKED( pthread_cond_destroy (&cond) );
+}
+
+#undef CHECKED
 
 #if defined(__CFA_WITH_VERIFY__)
Index: libcfa/src/concurrency/ready_queue.cfa
===================================================================
--- libcfa/src/concurrency/ready_queue.cfa	(revision 9fb13671f5201abdee9d86e8dcf476235dda9862)
+++ libcfa/src/concurrency/ready_queue.cfa	(revision eb24cec0a055a7ee6a5524a7c6546fe58d49f85a)
@@ -330,5 +330,4 @@
 	#if defined(BIAS)
 		// Don't bother trying locally too much
-		int local_tries = 8;
 		preferred = kernelTLS().this_processor->id * 4;
 	#endif
