Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 1f45c7df4a45479fa7e834a868fd6f3e589e7c0f)
+++ libcfa/src/concurrency/kernel.cfa	(revision 63b3279ec916942cd5c2959724fc80e694ddc601)
@@ -110,13 +110,13 @@
 #endif
 
-extern $thread * mainThread;
+extern thread$ * mainThread;
 extern processor * mainProcessor;
 
 //-----------------------------------------------------------------------------
 // Kernel Scheduling logic
-static $thread * __next_thread(cluster * this);
-static $thread * __next_thread_slow(cluster * this);
-static inline bool __must_unpark( $thread * thrd ) __attribute((nonnull(1)));
-static void __run_thread(processor * this, $thread * dst);
+static thread$ * __next_thread(cluster * this);
+static thread$ * __next_thread_slow(cluster * this);
+static inline bool __must_unpark( thread$ * thrd ) __attribute((nonnull(1)));
+static void __run_thread(processor * this, thread$ * dst);
 static void __wake_one(cluster * cltr);
 
@@ -181,5 +181,5 @@
 		__cfadbg_print_safe(runtime_core, "Kernel : core %p started\n", this);
 
-		$thread * readyThread = 0p;
+		thread$ * readyThread = 0p;
 		MAIN_LOOP:
 		for() {
@@ -388,5 +388,5 @@
 // runThread runs a thread by context switching
 // from the processor coroutine to the target thread
-static void __run_thread(processor * this, $thread * thrd_dst) {
+static void __run_thread(processor * this, thread$ * thrd_dst) {
 	/* paranoid */ verify( ! __preemption_enabled() );
 	/* paranoid */ verifyf( thrd_dst->state == Ready || thrd_dst->preempted != __NO_PREEMPTION, "state : %d, preempted %d\n", thrd_dst->state, thrd_dst->preempted);
@@ -406,5 +406,5 @@
 	__cfadbg_print_safe(runtime_core, "Kernel : core %p running thread %p (%s)\n", this, thrd_dst, thrd_dst->self_cor.name);
 
-	$coroutine * proc_cor = get_coroutine(this->runner);
+	coroutine$ * proc_cor = get_coroutine(this->runner);
 
 	// set state of processor coroutine to inactive
@@ -425,6 +425,6 @@
 		/* paranoid */ verify( thrd_dst->context.SP );
 		/* paranoid */ verify( thrd_dst->state != Halted );
-		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->curr_cor == proc_cor || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); // add escape condition if we are setting up the processor
-		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->curr_cor == proc_cor || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); // add escape condition if we are setting up the processor
+		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->curr_cor == proc_cor || thrd_dst->corctx_flag, "ERROR : Destination thread$ %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); // add escape condition if we are setting up the processor
+		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->curr_cor == proc_cor || thrd_dst->corctx_flag, "ERROR : Destination thread$ %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); // add escape condition if we are setting up the processor
 		/* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd_dst->canary );
 
@@ -438,6 +438,6 @@
 
 		/* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd_dst->canary );
-		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst );
-		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst );
+		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->corctx_flag, "ERROR : Destination thread$ %p has been corrupted.\n StackPointer too large.\n", thrd_dst );
+		/* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->corctx_flag, "ERROR : Destination thread$ %p has been corrupted.\n StackPointer too small.\n", thrd_dst );
 		/* paranoid */ verify( thrd_dst->context.SP );
 		/* paranoid */ verify( thrd_dst->curr_cluster == this->cltr );
@@ -505,6 +505,6 @@
 void returnToKernel() {
 	/* paranoid */ verify( ! __preemption_enabled() );
-	$coroutine * proc_cor = get_coroutine(kernelTLS().this_processor->runner);
-	$thread * thrd_src = kernelTLS().this_thread;
+	coroutine$ * proc_cor = get_coroutine(kernelTLS().this_processor->runner);
+	thread$ * thrd_src = kernelTLS().this_thread;
 
 	__STATS( thrd_src->last_proc = kernelTLS().this_processor; )
@@ -534,6 +534,6 @@
 
 	/* paranoid */ verify( ! __preemption_enabled() );
-	/* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src );
-	/* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too large.\n", thrd_src );
+	/* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ) || thrd_src->corctx_flag, "ERROR : Returning thread$ %p has been corrupted.\n StackPointer too small.\n", thrd_src );
+	/* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit) || thrd_src->corctx_flag, "ERROR : Returning thread$ %p has been corrupted.\n StackPointer too large.\n", thrd_src );
 }
 
@@ -541,5 +541,5 @@
 // Scheduler routines
 // KERNEL ONLY
-static void __schedule_thread( $thread * thrd ) {
+static void __schedule_thread( thread$ * thrd ) {
 	/* paranoid */ verify( ! __preemption_enabled() );
 	/* paranoid */ verify( ready_schedule_islocked());
@@ -589,5 +589,5 @@
 }
 
-void schedule_thread$( $thread * thrd ) {
+void schedule_thread$( thread$ * thrd ) {
 	ready_schedule_lock();
 		__schedule_thread( thrd );
@@ -596,9 +596,9 @@
 
 // KERNEL ONLY
-static inline $thread * __next_thread(cluster * this) with( *this ) {
+static inline thread$ * __next_thread(cluster * this) with( *this ) {
 	/* paranoid */ verify( ! __preemption_enabled() );
 
 	ready_schedule_lock();
-		$thread * thrd = pop_fast( this );
+		thread$ * thrd = pop_fast( this );
 	ready_schedule_unlock();
 
@@ -608,9 +608,9 @@
 
 // KERNEL ONLY
-static inline $thread * __next_thread_slow(cluster * this) with( *this ) {
+static inline thread$ * __next_thread_slow(cluster * this) with( *this ) {
 	/* paranoid */ verify( ! __preemption_enabled() );
 
 	ready_schedule_lock();
-		$thread * thrd;
+		thread$ * thrd;
 		for(25) {
 			thrd = pop_slow( this );
@@ -626,5 +626,5 @@
 }
 
-static inline bool __must_unpark( $thread * thrd ) {
+static inline bool __must_unpark( thread$ * thrd ) {
 	int old_ticket = __atomic_fetch_add(&thrd->ticket, 1, __ATOMIC_SEQ_CST);
 	switch(old_ticket) {
@@ -642,5 +642,5 @@
 }
 
-void __kernel_unpark( $thread * thrd ) {
+void __kernel_unpark( thread$ * thrd ) {
 	/* paranoid */ verify( ! __preemption_enabled() );
 	/* paranoid */ verify( ready_schedule_islocked());
@@ -657,5 +657,5 @@
 }
 
-void unpark( $thread * thrd ) {
+void unpark( thread$ * thrd ) {
 	if( !thrd ) return;
 
@@ -681,6 +681,6 @@
 	// Should never return
 	void __cfactx_thrd_leave() {
-		$thread * thrd = active_thread();
-		$monitor * this = &thrd->self_mon;
+		thread$ * thrd = active_thread();
+		monitor$ * this = &thrd->self_mon;
 
 		// Lock the monitor now
@@ -694,6 +694,6 @@
 		/* paranoid */ verify( kernelTLS().this_thread == thrd );
 		/* paranoid */ verify( thrd->context.SP );
-		/* paranoid */ verifyf( ((uintptr_t)thrd->context.SP) > ((uintptr_t)__get_stack(thrd->curr_cor)->limit), "ERROR : $thread %p has been corrupted.\n StackPointer too large.\n", thrd );
-		/* paranoid */ verifyf( ((uintptr_t)thrd->context.SP) < ((uintptr_t)__get_stack(thrd->curr_cor)->base ), "ERROR : $thread %p has been corrupted.\n StackPointer too small.\n", thrd );
+		/* paranoid */ verifyf( ((uintptr_t)thrd->context.SP) > ((uintptr_t)__get_stack(thrd->curr_cor)->limit), "ERROR : thread$ %p has been corrupted.\n StackPointer too large.\n", thrd );
+		/* paranoid */ verifyf( ((uintptr_t)thrd->context.SP) < ((uintptr_t)__get_stack(thrd->curr_cor)->base ), "ERROR : thread$ %p has been corrupted.\n StackPointer too small.\n", thrd );
 
 		thrd->state = Halting;
@@ -713,5 +713,5 @@
 bool force_yield( __Preemption_Reason reason ) {
 	__disable_interrupts_checked();
-		$thread * thrd = kernelTLS().this_thread;
+		thread$ * thrd = kernelTLS().this_thread;
 		/* paranoid */ verify(thrd->state == Active);
 
@@ -825,5 +825,5 @@
 //=============================================================================================
 void __kernel_abort_msg( char * abort_text, int abort_text_size ) {
-	$thread * thrd = __cfaabi_tls.this_thread;
+	thread$ * thrd = __cfaabi_tls.this_thread;
 
 	if(thrd) {
