Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision 78da4abe22e69798ee3738623dc9a2d99e34d207)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision dddb3dd01058a6f0eb621887f1bc9675d616a840)
@@ -22,4 +22,5 @@
 extern "C" {
       #include <limits.h>       // PTHREAD_STACK_MIN
+	#include <sys/eventfd.h>  // eventfd
       #include <sys/mman.h>     // mprotect
       #include <sys/resource.h> // getrlimit
@@ -80,6 +81,4 @@
 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__)
@@ -91,6 +90,4 @@
 extern void __kernel_alarm_startup(void);
 extern void __kernel_alarm_shutdown(void);
-extern void __kernel_io_startup (void);
-extern void __kernel_io_shutdown(void);
 
 //-----------------------------------------------------------------------------
@@ -104,5 +101,4 @@
 KERNEL_STORAGE($thread,	             mainThread);
 KERNEL_STORAGE(__stack_t,            mainThreadCtx);
-KERNEL_STORAGE(io_context,           mainIoContext);
 KERNEL_STORAGE(__scheduler_RWLock_t, __scheduler_lock);
 #if !defined(__CFA_NO_STATISTICS__)
@@ -200,5 +196,4 @@
 
 	void ?{}(processor & this) with( this ) {
-		( this.idle ){};
 		( this.terminated ){};
 		( this.runner ){};
@@ -228,10 +223,4 @@
 	__kernel_alarm_startup();
 
-	// Start IO
-	__kernel_io_startup();
-
-	io_context * mainio = (io_context *)&storage_mainIoContext;
-	(*mainio){ *mainCluster };
-
 	// Add the main thread to the ready queue
 	// once resume is called on mainProcessor->runner the mainThread needs to be scheduled like any normal thread
@@ -255,8 +244,4 @@
 
 static void __kernel_shutdown(void) {
-	//Before we start shutting things down, wait for systems that need threading to shutdown
-	io_context * mainio = (io_context *)&storage_mainIoContext;
-	^(*mainio){};
-
 	/* paranoid */ verify( __preemption_enabled() );
 	disable_interrupts();
@@ -276,7 +261,4 @@
 	// Disable preemption
 	__kernel_alarm_shutdown();
-
-	// Stop IO
-	__kernel_io_shutdown();
 
 	// Destroy the main processor and its context in reverse order of construction
@@ -479,5 +461,11 @@
 
 	this.io.ctx = 0p;
-	this.io.lock = false;
+	this.io.pending = false;
+	this.io.dirty   = false;
+
+	this.idle = eventfd(0, 0);
+	if (idle < 0) {
+		abort("KERNEL ERROR: PROCESSOR EVENTFD - %s\n", strerror(errno));
+	}
 
 	#if !defined(__CFA_NO_STATISTICS__)
@@ -521,8 +509,9 @@
 	// Finally we don't need the read_lock any more
 	unregister((__processor_id_t*)&this);
+
+	close(this.idle);
 }
 
 void ?{}(processor & this, const char name[], cluster & _cltr) {
-	( this.idle ){};
 	( this.terminated ){};
 	( this.runner ){};
@@ -726,27 +715,4 @@
 }
 
-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__)
 static bool verify_fwd_bck_rng(void) {
