Index: src/libcfa/concurrency/alarm.c
===================================================================
--- src/libcfa/concurrency/alarm.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/alarm.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -110,5 +110,5 @@
 }
 
-LIB_DEBUG_DO( bool validate( alarm_list_t * this ) {
+__cfaabi_dbg_debug_do( bool validate( alarm_list_t * this ) {
 	alarm_node_t ** it = &this->head;
 	while( (*it) ) {
@@ -186,5 +186,5 @@
 
 	disable_interrupts();
-	lock( event_kernel->lock DEBUG_CTX2 );
+	lock( event_kernel->lock __cfaabi_dbg_ctx2 );
 	{
 		verify( validate( alarms ) );
@@ -198,10 +198,10 @@
 	unlock( event_kernel->lock );
 	this->set = true;
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
 void unregister_self( alarm_node_t * this ) {
 	disable_interrupts();
-	lock( event_kernel->lock DEBUG_CTX2 );
+	lock( event_kernel->lock __cfaabi_dbg_ctx2 );
 	{
 		verify( validate( &event_kernel->alarms ) );
@@ -209,5 +209,5 @@
 	}
 	unlock( event_kernel->lock );
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 	this->set = false;
 }
Index: src/libcfa/concurrency/coroutine.c
===================================================================
--- src/libcfa/concurrency/coroutine.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/coroutine.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -76,5 +76,5 @@
 void ^?{}(coStack_t & this) {
 	if ( ! this.userStack && this.storage ) {
-		LIB_DEBUG_DO(
+		__cfaabi_dbg_debug_do(
 			if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) {
 				abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
@@ -131,8 +131,8 @@
 
 		// assume malloc has 8 byte alignment so add 8 to allow rounding up to 16 byte alignment
-		LIB_DEBUG_DO( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) );
-		LIB_NO_DEBUG_DO( this->storage = malloc( cxtSize + this->size + 8 ) );
+		__cfaabi_dbg_debug_do( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) );
+		__cfaabi_dbg_no_debug_do( this->storage = malloc( cxtSize + this->size + 8 ) );
 
-		LIB_DEBUG_DO(
+		__cfaabi_dbg_debug_do(
 			if ( mprotect( this->storage, pageSize, PROT_NONE ) == -1 ) {
 				abortf( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) );
@@ -144,6 +144,6 @@
 		} // if
 
-		LIB_DEBUG_DO( this->limit = (char *)this->storage + pageSize );
-		LIB_NO_DEBUG_DO( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment
+		__cfaabi_dbg_debug_do( this->limit = (char *)this->storage + pageSize );
+		__cfaabi_dbg_no_debug_do( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment
 
 	} else {
Index: src/libcfa/concurrency/invoke.c
===================================================================
--- src/libcfa/concurrency/invoke.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/invoke.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -31,70 +31,66 @@
 extern void __leave_thread_monitor( struct thread_desc * this );
 extern void disable_interrupts();
-extern void enable_interrupts( DEBUG_CTX_PARAM );
+extern void enable_interrupts( __cfaabi_dbg_ctx_param );
 
 void CtxInvokeCoroutine(
-      void (*main)(void *),
-      struct coroutine_desc *(*get_coroutine)(void *),
-      void *this
+	void (*main)(void *),
+	struct coroutine_desc *(*get_coroutine)(void *),
+	void *this
 ) {
-      // LIB_DEBUG_PRINTF("Invoke Coroutine : Received %p (main %p, get_c %p)\n", this, main, get_coroutine);
+	struct coroutine_desc* cor = get_coroutine( this );
 
-      struct coroutine_desc* cor = get_coroutine( this );
+	if(cor->state == Primed) {
+		__suspend_internal();
+	}
 
-      if(cor->state == Primed) {
-            __suspend_internal();
-      }
+	cor->state = Active;
 
-      cor->state = Active;
+	main( this );
 
-      main( this );
+	cor->state = Halted;
 
-      cor->state = Halted;
-
-      //Final suspend, should never return
-      __leave_coroutine();
-      abortf("Resumed dead coroutine");
+	//Final suspend, should never return
+	__leave_coroutine();
+	abortf("Resumed dead coroutine");
 }
 
 void CtxInvokeThread(
-      void (*dtor)(void *),
-      void (*main)(void *),
-      struct thread_desc *(*get_thread)(void *),
-      void *this
+	void (*dtor)(void *),
+	void (*main)(void *),
+	struct thread_desc *(*get_thread)(void *),
+	void *this
 ) {
-      // First suspend, once the thread arrives here,
-      // the function pointer to main can be invalidated without risk
-      __suspend_internal();
+	// First suspend, once the thread arrives here,
+	// the function pointer to main can be invalidated without risk
+	__suspend_internal();
 
-      // Fetch the thread handle from the user defined thread structure
-      struct thread_desc* thrd = get_thread( this );
+	// Fetch the thread handle from the user defined thread structure
+	struct thread_desc* thrd = get_thread( this );
 
-      // Officially start the thread by enabling preemption
-      enable_interrupts( DEBUG_CTX );
+	// Officially start the thread by enabling preemption
+	enable_interrupts( __cfaabi_dbg_ctx );
 
-      // Call the main of the thread
-      main( this );
+	// Call the main of the thread
+	main( this );
 
-      // To exit a thread we must :
-      // 1 - Mark it as halted
-      // 2 - Leave its monitor
-      // 3 - Disable the interupts
-      // 4 - Final suspend
-      // The order of these 4 operations is very important
-      //Final suspend, should never return
-      __leave_thread_monitor( thrd );
-      abortf("Resumed dead thread");
+	// To exit a thread we must :
+	// 1 - Mark it as halted
+	// 2 - Leave its monitor
+	// 3 - Disable the interupts
+	// 4 - Final suspend
+	// The order of these 4 operations is very important
+	//Final suspend, should never return
+	__leave_thread_monitor( thrd );
+	abortf("Resumed dead thread");
 }
 
 
 void CtxStart(
-      void (*main)(void *),
-      struct coroutine_desc *(*get_coroutine)(void *),
-      void *this,
-      void (*invoke)(void *)
+	void (*main)(void *),
+	struct coroutine_desc *(*get_coroutine)(void *),
+	void *this,
+	void (*invoke)(void *)
 ) {
-      // LIB_DEBUG_PRINTF("StartCoroutine : Passing in %p (main %p) to invoke (%p) from start (%p)\n", this, main, invoke, CtxStart);
-
-      struct coStack_t* stack = &get_coroutine( this )->stack;
+	struct coStack_t* stack = &get_coroutine( this )->stack;
 
 #if defined( __i386__ )
@@ -103,5 +99,5 @@
 	    void *fixedRegisters[3];		  	// fixed registers ebx, edi, esi (popped on 1st uSwitch, values unimportant)
 	    uint32_t mxcr;                        // SSE Status and Control bits (control bits are preserved across function calls)
-          uint16_t fcw;                         // X97 FPU control word (preserved across function calls)
+	    uint16_t fcw;                         // X97 FPU control word (preserved across function calls)
 	    void *rturn;                          // where to go on return from uSwitch
 	    void *dummyReturn;				// fake return compiler would have pushed on call to uInvoke
@@ -116,28 +112,28 @@
 	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->argument[0] = this;     // argument to invoke
 	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = invoke;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
 
 #elif defined( __x86_64__ )
 
-      struct FakeStack {
-            void *fixedRegisters[5];            // fixed registers rbx, r12, r13, r14, r15
-            uint32_t mxcr;                      // SSE Status and Control bits (control bits are preserved across function calls)
-            uint16_t fcw;                       // X97 FPU control word (preserved across function calls)
-            void *rturn;                        // where to go on return from uSwitch
-            void *dummyReturn;                  // NULL return address to provide proper alignment
-      };
+	struct FakeStack {
+		void *fixedRegisters[5];            // fixed registers rbx, r12, r13, r14, r15
+		uint32_t mxcr;                      // SSE Status and Control bits (control bits are preserved across function calls)
+		uint16_t fcw;                       // X97 FPU control word (preserved across function calls)
+		void *rturn;                        // where to go on return from uSwitch
+		void *dummyReturn;                  // NULL return address to provide proper alignment
+	};
 
-      ((struct machine_context_t *)stack->context)->SP = (char *)stack->base - sizeof( struct FakeStack );
-      ((struct machine_context_t *)stack->context)->FP = NULL;		// terminate stack with NULL fp
+	((struct machine_context_t *)stack->context)->SP = (char *)stack->base - sizeof( struct FakeStack );
+	((struct machine_context_t *)stack->context)->FP = NULL;		// terminate stack with NULL fp
 
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->dummyReturn = NULL;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = CtxInvokeStub;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = this;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = invoke;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->dummyReturn = NULL;
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = CtxInvokeStub;
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = this;
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = invoke;
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
 #else
-      #error Only __i386__ and __x86_64__ is supported for threads in cfa
+	#error Only __i386__ and __x86_64__ is supported for threads in cfa
 #endif
 }
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/kernel.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -150,5 +150,5 @@
 
 	this.runner = &runner;
-	LIB_DEBUG_PRINT_SAFE("Kernel : constructing main processor context %p\n", &runner);
+	__cfaabi_dbg_print_safe("Kernel : constructing main processor context %p\n", &runner);
 	runner{ &this };
 }
@@ -156,5 +156,5 @@
 void ^?{}(processor & this) {
 	if( ! this.do_terminate ) {
-		LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", &this);
+		__cfaabi_dbg_print_safe("Kernel : core %p signaling termination\n", &this);
 		this.do_terminate = true;
 		P( this.terminated );
@@ -181,5 +181,5 @@
 	processor * this = runner.proc;
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : core %p starting\n", this);
+	__cfaabi_dbg_print_safe("Kernel : core %p starting\n", this);
 
 	{
@@ -187,5 +187,5 @@
 		preemption_scope scope = { this };
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);
+		__cfaabi_dbg_print_safe("Kernel : core %p started\n", this);
 
 		thread_desc * readyThread = NULL;
@@ -213,10 +213,10 @@
 		}
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : core %p stopping\n", this);
+		__cfaabi_dbg_print_safe("Kernel : core %p stopping\n", this);
 	}
 
 	V( this->terminated );
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : core %p terminated\n", this);
+	__cfaabi_dbg_print_safe("Kernel : core %p terminated\n", this);
 }
 
@@ -292,5 +292,5 @@
 	processorCtx_t proc_cor_storage = { proc, &info };
 
-	LIB_DEBUG_PRINT_SAFE("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
+	__cfaabi_dbg_print_safe("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
 
 	//Set global state
@@ -299,5 +299,5 @@
 
 	//We now have a proper context from which to schedule threads
-	LIB_DEBUG_PRINT_SAFE("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
+	__cfaabi_dbg_print_safe("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
 
 	// SKULLDUGGERY: Since the coroutine doesn't have its own stack, we can't
@@ -310,5 +310,5 @@
 
 	// Main routine of the core returned, the core is now fully terminated
-	LIB_DEBUG_PRINT_SAFE("Kernel : core %p main ended (%p)\n", proc, proc->runner);
+	__cfaabi_dbg_print_safe("Kernel : core %p main ended (%p)\n", proc, proc->runner);
 
 	return NULL;
@@ -316,9 +316,9 @@
 
 void start(processor * this) {
-	LIB_DEBUG_PRINT_SAFE("Kernel : Starting core %p\n", this);
+	__cfaabi_dbg_print_safe("Kernel : Starting core %p\n", this);
 
 	pthread_create( &this->kernel_thread, NULL, CtxInvokeProcessor, (void*)this );
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);
+	__cfaabi_dbg_print_safe("Kernel : core %p started\n", this);
 }
 
@@ -334,5 +334,5 @@
 	verifyf( thrd->next == NULL, "Expected null got %p", thrd->next );
 
-	lock(   this_processor->cltr->ready_queue_lock DEBUG_CTX2 );
+	lock(   this_processor->cltr->ready_queue_lock __cfaabi_dbg_ctx2 );
 	append( this_processor->cltr->ready_queue, thrd );
 	unlock( this_processor->cltr->ready_queue_lock );
@@ -343,5 +343,5 @@
 thread_desc * nextThread(cluster * this) {
 	verify( disable_preempt_count > 0 );
-	lock( this->ready_queue_lock DEBUG_CTX2 );
+	lock( this->ready_queue_lock __cfaabi_dbg_ctx2 );
 	thread_desc * head = pop_head( this->ready_queue );
 	unlock( this->ready_queue_lock );
@@ -355,5 +355,5 @@
 	suspend();
 	verify( disable_preempt_count > 0 );
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -367,5 +367,5 @@
 	verify( disable_preempt_count > 0 );
 
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -381,5 +381,5 @@
 	verify( disable_preempt_count > 0 );
 
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -395,5 +395,5 @@
 	verify( disable_preempt_count > 0 );
 
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -408,5 +408,5 @@
 	verify( disable_preempt_count > 0 );
 
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -423,5 +423,5 @@
 	verify( disable_preempt_count > 0 );
 
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
@@ -441,5 +441,5 @@
 // Kernel boot procedures
 void kernel_startup(void) {
-	LIB_DEBUG_PRINT_SAFE("Kernel : Starting\n");
+	__cfaabi_dbg_print_safe("Kernel : Starting\n");
 
 	// Start by initializing the main thread
@@ -450,5 +450,5 @@
 	(*mainThread){ &info };
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : Main thread ready\n");
+	__cfaabi_dbg_print_safe("Kernel : Main thread ready\n");
 
 	// Initialize the main cluster
@@ -456,5 +456,5 @@
 	(*mainCluster){};
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : main cluster ready\n");
+	__cfaabi_dbg_print_safe("Kernel : main cluster ready\n");
 
 	// Initialize the main processor and the main processor ctx
@@ -483,11 +483,11 @@
 
 	// THE SYSTEM IS NOW COMPLETELY RUNNING
-	LIB_DEBUG_PRINT_SAFE("Kernel : Started\n--------------------------------------------------\n\n");
-
-	enable_interrupts( DEBUG_CTX );
+	__cfaabi_dbg_print_safe("Kernel : Started\n--------------------------------------------------\n\n");
+
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
 void kernel_shutdown(void) {
-	LIB_DEBUG_PRINT_SAFE("\n--------------------------------------------------\nKernel : Shutting down\n");
+	__cfaabi_dbg_print_safe("\n--------------------------------------------------\nKernel : Shutting down\n");
 
 	disable_interrupts();
@@ -513,5 +513,5 @@
 	^(mainThread){};
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : Shutdown complete\n");
+	__cfaabi_dbg_print_safe("Kernel : Shutdown complete\n");
 }
 
@@ -523,5 +523,5 @@
 	// abort cannot be recursively entered by the same or different processors because all signal handlers return when
 	// the globalAbort flag is true.
-	lock( kernel_abort_lock DEBUG_CTX2 );
+	lock( kernel_abort_lock __cfaabi_dbg_ctx2 );
 
 	// first task to abort ?
@@ -548,21 +548,21 @@
 
 	int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->self_cor.name, thrd );
-	__lib_debug_write( abort_text, len );
+	__cfaabi_dbg_bits_write( abort_text, len );
 
 	if ( thrd != this_coroutine ) {
 		len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine->name, this_coroutine );
-		__lib_debug_write( abort_text, len );
+		__cfaabi_dbg_bits_write( abort_text, len );
 	}
 	else {
-		__lib_debug_write( ".\n", 2 );
+		__cfaabi_dbg_bits_write( ".\n", 2 );
 	}
 }
 
 extern "C" {
-	void __lib_debug_acquire() {
-		lock( kernel_debug_lock DEBUG_CTX2 );
-	}
-
-	void __lib_debug_release() {
+	void __cfaabi_dbg_bits_acquire() {
+		lock( kernel_debug_lock __cfaabi_dbg_ctx2 );
+	}
+
+	void __cfaabi_dbg_bits_release() {
 		unlock( kernel_debug_lock );
 	}
@@ -582,5 +582,5 @@
 
 void P(semaphore & this) {
-	lock( this.lock DEBUG_CTX2 );
+	lock( this.lock __cfaabi_dbg_ctx2 );
 	this.count -= 1;
 	if ( this.count < 0 ) {
@@ -598,5 +598,5 @@
 void V(semaphore & this) {
 	thread_desc * thrd = NULL;
-	lock( this.lock DEBUG_CTX2 );
+	lock( this.lock __cfaabi_dbg_ctx2 );
 	this.count += 1;
 	if ( this.count <= 0 ) {
Index: src/libcfa/concurrency/kernel_private.h
===================================================================
--- src/libcfa/concurrency/kernel_private.h	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/kernel_private.h	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -30,5 +30,5 @@
 	void disable_interrupts();
 	void enable_interrupts_noPoll();
-	void enable_interrupts( DEBUG_CTX_PARAM );
+	void enable_interrupts( __cfaabi_dbg_ctx_param );
 }
 
@@ -39,5 +39,5 @@
 	disable_interrupts();
 	ScheduleThread( thrd );
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 thread_desc * nextThread(cluster * this);
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/monitor.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -91,8 +91,8 @@
 	static void __enter_monitor_desc( monitor_desc * this, const __monitor_group_t & group ) {
 		// Lock the monitor spinlock
-		DO_LOCK( this->lock DEBUG_CTX2 );
+		DO_LOCK( this->lock __cfaabi_dbg_ctx2 );
 		thread_desc * thrd = this_thread;
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner);
+		__cfaabi_dbg_print_safe("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner);
 
 		if( !this->owner ) {
@@ -100,5 +100,5 @@
 			set_owner( this, thrd );
 
-			LIB_DEBUG_PRINT_SAFE("Kernel :  mon is free \n");
+			__cfaabi_dbg_print_safe("Kernel :  mon is free \n");
 		}
 		else if( this->owner == thrd) {
@@ -106,5 +106,5 @@
 			this->recursion += 1;
 
-			LIB_DEBUG_PRINT_SAFE("Kernel :  mon already owned \n");
+			__cfaabi_dbg_print_safe("Kernel :  mon already owned \n");
 		}
 		else if( is_accepted( this, group) ) {
@@ -115,8 +115,8 @@
 			reset_mask( this );
 
-			LIB_DEBUG_PRINT_SAFE("Kernel :  mon accepts \n");
+			__cfaabi_dbg_print_safe("Kernel :  mon accepts \n");
 		}
 		else {
-			LIB_DEBUG_PRINT_SAFE("Kernel :  blocking \n");
+			__cfaabi_dbg_print_safe("Kernel :  blocking \n");
 
 			// Some one else has the monitor, wait in line for it
@@ -124,5 +124,5 @@
 			BlockInternal( &this->lock );
 
-			LIB_DEBUG_PRINT_SAFE("Kernel : %10p Entered  mon %p\n", thrd, this);
+			__cfaabi_dbg_print_safe("Kernel : %10p Entered  mon %p\n", thrd, this);
 
 			// BlockInternal will unlock spinlock, no need to unlock ourselves
@@ -130,5 +130,5 @@
 		}
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Entered  mon %p\n", thrd, this);
+		__cfaabi_dbg_print_safe("Kernel : %10p Entered  mon %p\n", thrd, this);
 
 		// Release the lock and leave
@@ -139,12 +139,12 @@
 	static void __enter_monitor_dtor( monitor_desc * this, fptr_t func ) {
 		// Lock the monitor spinlock
-		DO_LOCK( this->lock DEBUG_CTX2 );
+		DO_LOCK( this->lock __cfaabi_dbg_ctx2 );
 		thread_desc * thrd = this_thread;
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Entering dtor for mon %p (%p)\n", thrd, this, this->owner);
+		__cfaabi_dbg_print_safe("Kernel : %10p Entering dtor for mon %p (%p)\n", thrd, this, this->owner);
 
 
 		if( !this->owner ) {
-			LIB_DEBUG_PRINT_SAFE("Kernel : Destroying free mon %p\n", this);
+			__cfaabi_dbg_print_safe("Kernel : Destroying free mon %p\n", this);
 
 			// No one has the monitor, just take it
@@ -164,5 +164,5 @@
 		__monitor_group_t group = { &this, 1, func };
 		if( is_accepted( this, group) ) {
-			LIB_DEBUG_PRINT_SAFE("Kernel :  mon accepts dtor, block and signal it \n");
+			__cfaabi_dbg_print_safe("Kernel :  mon accepts dtor, block and signal it \n");
 
 			// Wake the thread that is waiting for this
@@ -183,5 +183,5 @@
 		}
 		else {
-			LIB_DEBUG_PRINT_SAFE("Kernel :  blocking \n");
+			__cfaabi_dbg_print_safe("Kernel :  blocking \n");
 
 			wait_ctx( this_thread, 0 )
@@ -196,5 +196,5 @@
 		}
 
-		LIB_DEBUG_PRINT_SAFE("Kernel : Destroying %p\n", this);
+		__cfaabi_dbg_print_safe("Kernel : Destroying %p\n", this);
 
 	}
@@ -203,7 +203,7 @@
 	void __leave_monitor_desc( monitor_desc * this ) {
 		// Lock the monitor spinlock, DO_LOCK to reduce contention
-		DO_LOCK( this->lock DEBUG_CTX2 );
-
-		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner);
+		DO_LOCK( this->lock __cfaabi_dbg_ctx2 );
+
+		__cfaabi_dbg_print_safe("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner);
 
 		verifyf( this_thread == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", this_thread, this->owner, this->recursion, this );
@@ -215,5 +215,5 @@
 		// it means we don't need to do anything
 		if( this->recursion != 0) {
-			LIB_DEBUG_PRINT_SAFE("Kernel :  recursion still %d\n", this->recursion);
+			__cfaabi_dbg_print_safe("Kernel :  recursion still %d\n", this->recursion);
 			unlock( this->lock );
 			return;
@@ -232,5 +232,5 @@
 	// Leave single monitor for the last time
 	void __leave_dtor_monitor_desc( monitor_desc * this ) {
-		LIB_DEBUG_DO(
+		__cfaabi_dbg_debug_do(
 			if( this_thread != this->owner ) {
 				abortf("Destroyed monitor %p has inconsistent owner, expected %p got %p.\n", this, this_thread, this->owner);
@@ -249,5 +249,5 @@
 
 		// Lock the monitor now
-		DO_LOCK( this->lock DEBUG_CTX2 );
+		DO_LOCK( this->lock __cfaabi_dbg_ctx2 );
 
 		disable_interrupts();
@@ -308,5 +308,5 @@
 	(this_thread->monitors){m, count, func};
 
-	// LIB_DEBUG_PRINT_SAFE("MGUARD : enter %d\n", count);
+	// __cfaabi_dbg_print_safe("MGUARD : enter %d\n", count);
 
 	// Enter the monitors in order
@@ -314,5 +314,5 @@
 	enter( group );
 
-	// LIB_DEBUG_PRINT_SAFE("MGUARD : entered\n");
+	// __cfaabi_dbg_print_safe("MGUARD : entered\n");
 }
 
@@ -320,10 +320,10 @@
 // Dtor for monitor guard
 void ^?{}( monitor_guard_t & this ) {
-	// LIB_DEBUG_PRINT_SAFE("MGUARD : leaving %d\n", this.count);
+	// __cfaabi_dbg_print_safe("MGUARD : leaving %d\n", this.count);
 
 	// Leave the monitors in order
 	leave( this.m, this.count );
 
-	// LIB_DEBUG_PRINT_SAFE("MGUARD : left\n");
+	// __cfaabi_dbg_print_safe("MGUARD : left\n");
 
 	// Restore thread context
@@ -430,5 +430,5 @@
 
 	//Some more checking in debug
-	LIB_DEBUG_DO(
+	__cfaabi_dbg_debug_do(
 		thread_desc * this_thrd = this_thread;
 		if ( this.monitor_count != this_thrd->monitors.size ) {
@@ -487,5 +487,5 @@
 	set_owner( monitors, count, signallee );
 
-	LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : signal_block condition %p (s: %p)\n", &this, signallee );
+	__cfaabi_dbg_print_buffer_decl( "Kernel : signal_block condition %p (s: %p)\n", &this, signallee );
 
 	//Everything is ready to go to sleep
@@ -496,5 +496,5 @@
 
 
-	LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel :   signal_block returned\n" );
+	__cfaabi_dbg_print_buffer_local( "Kernel :   signal_block returned\n" );
 
 	//We are back, restore the masks and recursions
@@ -535,9 +535,9 @@
 	__lock_size_t actual_count = aggregate( mon_storage, mask );
 
-	LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (__lock_size_t)max);
+	__cfaabi_dbg_print_buffer_decl( "Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (__lock_size_t)max);
 
 	if(actual_count == 0) return;
 
-	LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : waitfor internal proceeding\n");
+	__cfaabi_dbg_print_buffer_local( "Kernel : waitfor internal proceeding\n");
 
 	// Create storage for monitor context
@@ -556,5 +556,5 @@
 			__acceptable_t& accepted = mask[index];
 			if( accepted.is_dtor ) {
-				LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : dtor already there\n");
+				__cfaabi_dbg_print_buffer_local( "Kernel : dtor already there\n");
 				verifyf( accepted.size == 1,  "ERROR: Accepted dtor has more than 1 mutex parameter." );
 
@@ -568,5 +568,5 @@
 			}
 			else {
-				LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, baton-passing\n");
+				__cfaabi_dbg_print_buffer_local( "Kernel : thread present, baton-passing\n");
 
 				// Create the node specific to this wait operation
@@ -576,11 +576,11 @@
 				monitor_save;
 
-				LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel :  baton of %d monitors : ", count );
+				__cfaabi_dbg_print_buffer_local( "Kernel :  baton of %d monitors : ", count );
 				#ifdef __CFA_DEBUG_PRINT__
 					for( int i = 0; i < count; i++) {
-						LIB_DEBUG_PRINT_BUFFER_LOCAL( "%p %p ", monitors[i], monitors[i]->signal_stack.top );
+						__cfaabi_dbg_print_buffer_local( "%p %p ", monitors[i], monitors[i]->signal_stack.top );
 					}
 				#endif
-				LIB_DEBUG_PRINT_BUFFER_LOCAL( "\n");
+				__cfaabi_dbg_print_buffer_local( "\n");
 
 				// Set the owners to be the next thread
@@ -593,8 +593,8 @@
 				monitor_restore;
 
-				LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, returned\n");
+				__cfaabi_dbg_print_buffer_local( "Kernel : thread present, returned\n");
 			}
 
-			LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
+			__cfaabi_dbg_print_buffer_local( "Kernel : accepted %d\n", *mask.accepted);
 			return;
 		}
@@ -603,9 +603,9 @@
 
 	if( duration == 0 ) {
-		LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : non-blocking, exiting\n");
+		__cfaabi_dbg_print_buffer_local( "Kernel : non-blocking, exiting\n");
 
 		unlock_all( locks, count );
 
-		LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
+		__cfaabi_dbg_print_buffer_local( "Kernel : accepted %d\n", *mask.accepted);
 		return;
 	}
@@ -614,5 +614,5 @@
 	verifyf( duration < 0, "Timeout on waitfor statments not supported yet.");
 
-	LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : blocking waitfor\n");
+	__cfaabi_dbg_print_buffer_local( "Kernel : blocking waitfor\n");
 
 	// Create the node specific to this wait operation
@@ -636,7 +636,7 @@
 	monitor_restore;
 
-	LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : exiting\n");
-
-	LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
+	__cfaabi_dbg_print_buffer_local( "Kernel : exiting\n");
+
+	__cfaabi_dbg_print_buffer_local( "Kernel : accepted %d\n", *mask.accepted);
 }
 
@@ -645,5 +645,5 @@
 
 static inline void set_owner( monitor_desc * this, thread_desc * owner ) {
-	// LIB_DEBUG_PRINT_SAFE("Kernal :   Setting owner of %p to %p ( was %p)\n", this, owner, this->owner );
+	// __cfaabi_dbg_print_safe("Kernal :   Setting owner of %p to %p ( was %p)\n", this, owner, this->owner );
 
 	//Pass the monitor appropriately
@@ -677,5 +677,5 @@
 static inline thread_desc * next_thread( monitor_desc * this ) {
 	//Check the signaller stack
-	LIB_DEBUG_PRINT_SAFE("Kernel :  mon %p AS-stack top %p\n", this, this->signal_stack.top);
+	__cfaabi_dbg_print_safe("Kernel :  mon %p AS-stack top %p\n", this, this->signal_stack.top);
 	__condition_criterion_t * urgent = pop( this->signal_stack );
 	if( urgent ) {
@@ -729,5 +729,5 @@
 	for( __lock_size_t i = 0; i < count; i++) {
 		(criteria[i]){ monitors[i], waiter };
-		LIB_DEBUG_PRINT_SAFE( "Kernel :  target %p = %p\n", criteria[i].target, &criteria[i] );
+		__cfaabi_dbg_print_safe( "Kernel :  target %p = %p\n", criteria[i].target, &criteria[i] );
 		push( criteria[i].target->signal_stack, &criteria[i] );
 	}
@@ -738,5 +738,5 @@
 static inline void lock_all( __spinlock_t * locks [], __lock_size_t count ) {
 	for( __lock_size_t i = 0; i < count; i++ ) {
-		DO_LOCK( *locks[i] DEBUG_CTX2 );
+		DO_LOCK( *locks[i] __cfaabi_dbg_ctx2 );
 	}
 }
@@ -745,5 +745,5 @@
 	for( __lock_size_t i = 0; i < count; i++ ) {
 		__spinlock_t * l = &source[i]->lock;
-		DO_LOCK( *l DEBUG_CTX2 );
+		DO_LOCK( *l __cfaabi_dbg_ctx2 );
 		if(locks) locks[i] = l;
 	}
@@ -803,8 +803,8 @@
 	for(	int i = 0; i < count; i++ ) {
 
-		// LIB_DEBUG_PRINT_SAFE( "Checking %p for %p\n", &criteria[i], target );
+		// __cfaabi_dbg_print_safe( "Checking %p for %p\n", &criteria[i], target );
 		if( &criteria[i] == target ) {
 			criteria[i].ready = true;
-			// LIB_DEBUG_PRINT_SAFE( "True\n" );
+			// __cfaabi_dbg_print_safe( "True\n" );
 		}
 
@@ -812,5 +812,5 @@
 	}
 
-	LIB_DEBUG_PRINT_SAFE( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL );
+	__cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL );
 	return ready2run ? node->waiting_thread : NULL;
 }
@@ -819,5 +819,5 @@
 	thread_desc * thrd = this_thread;
 	if( !this.monitors ) {
-		// LIB_DEBUG_PRINT_SAFE("Branding\n");
+		// __cfaabi_dbg_print_safe("Branding\n");
 		assertf( thrd->monitors.data != NULL, "No current monitor to brand condition %p", thrd->monitors.data );
 		this.monitor_count = thrd->monitors.size;
Index: src/libcfa/concurrency/preemption.c
===================================================================
--- src/libcfa/concurrency/preemption.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/preemption.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -148,5 +148,5 @@
 //=============================================================================================
 
-LIB_DEBUG_DO( static thread_local void * last_interrupt = 0; )
+__cfaabi_dbg_debug_do( static thread_local void * last_interrupt = 0; )
 
 extern "C" {
@@ -159,5 +159,5 @@
 	// Enable interrupts by decrementing the counter
 	// If counter reaches 0, execute any pending CtxSwitch
-	void enable_interrupts( DEBUG_CTX_PARAM ) {
+	void enable_interrupts( __cfaabi_dbg_ctx_param ) {
 		processor * proc   = this_processor;      // Cache the processor now since interrupts can start happening after the atomic add
 		thread_desc * thrd = this_thread;         // Cache the thread now since interrupts can start happening after the atomic add
@@ -173,5 +173,5 @@
 
 		// For debugging purposes : keep track of the last person to enable the interrupts
-		LIB_DEBUG_DO( proc->last_enable = caller; )
+		__cfaabi_dbg_debug_do( proc->last_enable = caller; )
 	}
 
@@ -233,5 +233,5 @@
 // Called from kernel_startup
 void kernel_start_preemption() {
-	LIB_DEBUG_PRINT_SAFE("Kernel : Starting preemption\n");
+	__cfaabi_dbg_print_safe("Kernel : Starting preemption\n");
 
 	// Start with preemption disabled until ready
@@ -255,5 +255,5 @@
 // Called from kernel_shutdown
 void kernel_stop_preemption() {
-	LIB_DEBUG_PRINT_SAFE("Kernel : Preemption stopping\n");
+	__cfaabi_dbg_print_safe("Kernel : Preemption stopping\n");
 
 	// Block all signals since we are already shutting down
@@ -271,5 +271,5 @@
 	// Preemption is now fully stopped
 
-	LIB_DEBUG_PRINT_SAFE("Kernel : Preemption stopped\n");
+	__cfaabi_dbg_print_safe("Kernel : Preemption stopped\n");
 }
 
@@ -297,5 +297,5 @@
 // Receives SIGUSR1 signal and causes the current thread to yield
 void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ) {
-	LIB_DEBUG_DO( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); )
+	__cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); )
 
 	// Check if it is safe to preempt here
@@ -346,5 +346,5 @@
 		assertf(sig == SIGALRM, "Kernel Internal Error, sigwait: Unexpected signal %d (%d : %d)\n", sig, info.si_code, info.si_value.sival_int);
 
-		// LIB_DEBUG_PRINT_SAFE("Kernel : Caught alarm from %d with %d\n", info.si_code, info.si_value.sival_int );
+		// __cfaabi_dbg_print_safe("Kernel : Caught alarm from %d with %d\n", info.si_code, info.si_value.sival_int );
 		// Switch on the code (a.k.a. the sender) to
 		switch( info.si_code )
@@ -354,6 +354,6 @@
 		case SI_TIMER:
 		case SI_KERNEL:
-			// LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread tick\n");
-			lock( event_kernel->lock DEBUG_CTX2 );
+			// __cfaabi_dbg_print_safe("Kernel : Preemption thread tick\n");
+			lock( event_kernel->lock __cfaabi_dbg_ctx2 );
 			tick_preemption();
 			unlock( event_kernel->lock );
@@ -368,5 +368,5 @@
 
 EXIT:
-	LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread stopping\n");
+	__cfaabi_dbg_print_safe("Kernel : Preemption thread stopping\n");
 	return NULL;
 }
@@ -380,5 +380,5 @@
 
 	if ( sigaction( sig, &act, NULL ) == -1 ) {
-		LIB_DEBUG_PRINT_BUFFER_DECL(
+		__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 )
@@ -397,5 +397,5 @@
 
 	if ( sigaction( sig, &act, NULL ) == -1 ) {
-		LIB_DEBUG_PRINT_BUFFER_DECL(
+		__cfaabi_dbg_print_buffer_decl(
 			" __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n",
 			sig, errno, strerror( errno )
@@ -409,5 +409,5 @@
 //=============================================================================================
 
-LIB_DEBUG_DO(
+__cfaabi_dbg_debug_do(
 	static void __kernel_backtrace( int start ) {
 		// skip first N stack frames
@@ -476,5 +476,5 @@
 
 // void sigHandler_segv( __CFA_SIGPARMS__ ) {
-// 	LIB_DEBUG_DO(
+// 	__cfaabi_dbg_debug_do(
 // 		#ifdef __USE_STREAM__
 // 		serr 	| "*CFA runtime error* program cfa-cpp terminated with"
@@ -493,5 +493,5 @@
 // void sigHandler_abort( __CFA_SIGPARMS__ ) {
 // 	// skip first 6 stack frames
-// 	LIB_DEBUG_DO( __kernel_backtrace( 6 ); )
+// 	__cfaabi_dbg_debug_do( __kernel_backtrace( 6 ); )
 
 // 	// reset default signal handler
Index: src/libcfa/concurrency/thread.c
===================================================================
--- src/libcfa/concurrency/thread.c	(revision f5478c89f22dfaa80c81adb28a7eba9eb97eb1a7)
+++ src/libcfa/concurrency/thread.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
@@ -72,5 +72,5 @@
 	thrd_c->last = this_coroutine;
 
-	// LIB_DEBUG_PRINT_SAFE("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
+	// __cfaabi_dbg_print_safe("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
 
 	disable_interrupts();
@@ -82,5 +82,5 @@
 
 	ScheduleThread(thrd_h);
-	enable_interrupts( DEBUG_CTX );
+	enable_interrupts( __cfaabi_dbg_ctx );
 }
 
