Index: libcfa/src/bits/locks.hfa
===================================================================
--- libcfa/src/bits/locks.hfa	(revision 08a994e717c46ee688776bb6c7c1bff9109eb2c7)
+++ libcfa/src/bits/locks.hfa	(revision c66f6cb71ed15bdf7843d630c7719f87d009b25d)
@@ -112,4 +112,9 @@
 	#endif
 
+	extern "C" {
+		char * strerror(int);
+	}
+	#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: %s\n", strerror(err)); }
+
 	struct __bin_sem_t {
 		pthread_mutex_t 	lock;
@@ -119,22 +124,27 @@
 
 	static inline void ?{}(__bin_sem_t & this) with( this ) {
-		pthread_mutex_init(&lock, NULL);
-		pthread_cond_init (&cond, NULL);
+		// 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, 0p);
 		val = 0;
 	}
 
 	static inline void ^?{}(__bin_sem_t & this) with( this ) {
-		pthread_mutex_destroy(&lock);
-		pthread_cond_destroy (&cond);
+		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());
-		pthread_mutex_lock(&lock);
+		CHECKED( pthread_mutex_lock(&lock) );
 			while(val < 1) {
 				pthread_cond_wait(&cond, &lock);
 			}
 			val -= 1;
-		pthread_mutex_unlock(&lock);
+		CHECKED( pthread_mutex_unlock(&lock) );
 	}
 
@@ -142,5 +152,5 @@
 		bool needs_signal = false;
 
-		pthread_mutex_lock(&lock);
+		CHECKED( pthread_mutex_lock(&lock) );
 			if(val < 1) {
 				val += 1;
@@ -148,7 +158,9 @@
 				needs_signal = true;
 			}
-		pthread_mutex_unlock(&lock);
+		CHECKED( pthread_mutex_unlock(&lock) );
 
 		return needs_signal;
 	}
+
+	#undef CHECKED
 #endif
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 08a994e717c46ee688776bb6c7c1bff9109eb2c7)
+++ libcfa/src/concurrency/kernel.cfa	(revision c66f6cb71ed15bdf7843d630c7719f87d009b25d)
@@ -250,5 +250,7 @@
 	}
 
-	pthread_join( kernel_thread, 0p );
+	int err = pthread_join( kernel_thread, 0p );
+	if( err != 0 ) abort("KERNEL ERROR: joining processor %p caused error %s\n", &this, strerror(err));
+
 	free( this.stack );
 }
@@ -824,4 +826,8 @@
 	// Destroy the main processor and its context in reverse order of construction
 	// These were manually constructed so we need manually destroy them
+	void ^?{}(processor & this) with( this ){
+		/* paranoid */ verify( this.do_terminate == true );
+	}
+
 	^(*mainProcessor){};
 
