Index: libcfa/src/concurrency/coroutine.cfa
===================================================================
--- libcfa/src/concurrency/coroutine.cfa	(revision 69a61d208f84a31df0da633405dc55a920f8e768)
+++ libcfa/src/concurrency/coroutine.cfa	(revision e8e457eec7f0e42a7c71c07ffcf5e3ea27d00b48)
@@ -138,5 +138,4 @@
 
 	// context switch to specified coroutine
-	verify( src->context.SP );
 	verify( dst->context.SP );
 	CtxSwitch( &src->context, &dst->context );
Index: libcfa/src/concurrency/invoke.c
===================================================================
--- libcfa/src/concurrency/invoke.c	(revision 69a61d208f84a31df0da633405dc55a920f8e768)
+++ libcfa/src/concurrency/invoke.c	(revision e8e457eec7f0e42a7c71c07ffcf5e3ea27d00b48)
@@ -29,5 +29,5 @@
 extern void __suspend_internal(void);
 extern void __leave_coroutine( struct coroutine_desc * );
-extern void __finish_creation( struct coroutine_desc * );
+extern void __finish_creation( struct thread_desc * );
 extern void __leave_thread_monitor( struct thread_desc * this );
 extern void disable_interrupts();
@@ -93,8 +93,5 @@
 	// First suspend, once the thread arrives here,
 	// the function pointer to main can be invalidated without risk
-	__finish_creation(&thrd->self_cor);
-
-	// Restore the last to NULL, we clobbered because of the thunk problem
-	thrd->self_cor.last = NULL;
+	__finish_creation( thrd );
 
 	// Officially start the thread by enabling preemption
Index: libcfa/src/concurrency/invoke.h
===================================================================
--- libcfa/src/concurrency/invoke.h	(revision 69a61d208f84a31df0da633405dc55a920f8e768)
+++ libcfa/src/concurrency/invoke.h	(revision e8e457eec7f0e42a7c71c07ffcf5e3ea27d00b48)
@@ -64,5 +64,4 @@
 	struct __stack_context_t {
 		void * SP;
-
 		void * FP;
 		// copy of global UNIX variable errno
@@ -105,5 +104,5 @@
 		struct __stack_info_t stack;
 
-		// textual name for coroutine/task, initialized by uC++ generated code
+		// textual name for coroutine/task
 		const char * name;
 
@@ -164,4 +163,10 @@
 	struct thread_desc {
 		// Core threading fields
+		// context that is switch during a CtxSwitch
+		struct __stack_context_t context;
+
+		// current execution status for coroutine
+		enum coroutine_state state;
+
 		// coroutine body used to store context
 		struct coroutine_desc  self_cor;
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 69a61d208f84a31df0da633405dc55a920f8e768)
+++ libcfa/src/concurrency/kernel.cfa	(revision e8e457eec7f0e42a7c71c07ffcf5e3ea27d00b48)
@@ -106,4 +106,5 @@
 
 void ?{}( thread_desc & this, current_stack_info_t * info) with( this ) {
+	state = Start;
 	self_cor{ info };
 	curr_cor = &self_cor;
@@ -239,8 +240,6 @@
 // runThread runs a thread by context switching
 // from the processor coroutine to the target thread
-static void runThread(processor * this, thread_desc * dst) {
-	assert(dst->curr_cor);
+static void runThread(processor * this, thread_desc * thrd_dst) {
 	coroutine_desc * proc_cor = get_coroutine(this->runner);
-	coroutine_desc * thrd_cor = dst->curr_cor;
 
 	// Reset the terminating actions here
@@ -248,9 +247,18 @@
 
 	// Update global state
-	kernelTLS.this_thread = dst;
-
-	// Context Switch to the thread
-	ThreadCtxSwitch(proc_cor, thrd_cor);
-	// when ThreadCtxSwitch returns we are back in the processor coroutine
+	kernelTLS.this_thread = thrd_dst;
+
+	// set state of processor coroutine to inactive and the thread to active
+	proc_cor->state = proc_cor->state == Halted ? Halted : Inactive;
+	thrd_dst->state = Active;
+
+	// set context switch to the thread that the processor is executing
+	verify( thrd_dst->context.SP );
+	CtxSwitch( &proc_cor->context, &thrd_dst->context );
+	// when CtxSwitch returns we are back in the processor coroutine
+
+	// set state of processor coroutine to active and the thread to inactive
+	thrd_dst->state = thrd_dst->state == Halted ? Halted : Inactive;
+	proc_cor->state = Active;
 }
 
@@ -258,6 +266,18 @@
 static void returnToKernel() {
 	coroutine_desc * proc_cor = get_coroutine(kernelTLS.this_processor->runner);
-	coroutine_desc * thrd_cor = kernelTLS.this_thread->curr_cor;
-	ThreadCtxSwitch(thrd_cor, proc_cor);
+	thread_desc * thrd_src = kernelTLS.this_thread;
+
+	// set state of current coroutine to inactive
+	thrd_src->state = thrd_src->state == Halted ? Halted : Inactive;
+	proc_cor->state = Active;
+
+	// set new coroutine that the processor is executing
+	// and context switch to it
+	verify( proc_cor->context.SP );
+	CtxSwitch( &thrd_src->context, &proc_cor->context );
+
+	// set state of new coroutine to active
+	proc_cor->state = proc_cor->state == Halted ? Halted : Inactive;
+	thrd_src->state = Active;
 }
 
@@ -343,6 +363,6 @@
 
 // KERNEL_ONLY
-void kernel_first_resume(processor * this) {
-	coroutine_desc * src = mainThread->curr_cor;
+void kernel_first_resume( processor * this ) {
+	thread_desc * src = mainThread;
 	coroutine_desc * dst = get_coroutine(this->runner);
 
@@ -354,6 +374,6 @@
 	verify( ! kernelTLS.preemption_state.enabled );
 
-	dst->last = src;
-	dst->starter = dst->starter ? dst->starter : src;
+	dst->last = &src->self_cor;
+	dst->starter = dst->starter ? dst->starter : &src->self_cor;
 
 	// set state of current coroutine to inactive
@@ -378,4 +398,17 @@
 }
 
+// KERNEL_ONLY
+void kernel_last_resume( processor * this ) {
+	coroutine_desc * src = &mainThread->self_cor;
+	coroutine_desc * dst = get_coroutine(this->runner);
+
+	verify( ! kernelTLS.preemption_state.enabled );
+	verify( dst->starter == src );
+	verify( dst->context.SP );
+
+	// context switch to the processor
+	CtxSwitch( &src->context, &dst->context );
+}
+
 //-----------------------------------------------------------------------------
 // Scheduler routines
@@ -384,5 +417,5 @@
 void ScheduleThread( thread_desc * thrd ) {
 	verify( thrd );
-	verify( thrd->self_cor.state != Halted );
+	verify( thrd->state != Halted );
 
 	verify( ! kernelTLS.preemption_state.enabled );
@@ -626,5 +659,5 @@
 	// which is currently here
 	__atomic_store_n(&mainProcessor->do_terminate, true, __ATOMIC_RELEASE);
-	returnToKernel();
+	kernel_last_resume( kernelTLS.this_processor );
 	mainThread->self_cor.state = Halted;
 
Index: libcfa/src/concurrency/thread.cfa
===================================================================
--- libcfa/src/concurrency/thread.cfa	(revision 69a61d208f84a31df0da633405dc55a920f8e768)
+++ libcfa/src/concurrency/thread.cfa	(revision e8e457eec7f0e42a7c71c07ffcf5e3ea27d00b48)
@@ -31,6 +31,7 @@
 // Thread ctors and dtors
 void ?{}(thread_desc & this, const char * const name, cluster & cl, void * storage, size_t storageSize ) with( this ) {
+	context{ NULL, NULL };
 	self_cor{ name, storage, storageSize };
-	verify(&self_cor);
+	state = Start;
 	curr_cor = &self_cor;
 	self_mon.owner = &this;
@@ -73,18 +74,14 @@
 forall( dtype T | is_thread(T) )
 void __thrd_start( T& this ) {
-	coroutine_desc* thrd_c = get_coroutine(this);
-	thread_desc   * thrd_h = get_thread   (this);
-	thrd_c->last = TL_GET( this_thread )->curr_cor;
-
-	// __cfaabi_dbg_print_safe("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
+	thread_desc * this_thrd = get_thread(this);
+	thread_desc * curr_thrd = TL_GET( this_thread );
 
 	disable_interrupts();
-	assert( thrd_c->stack.storage );
 	CtxStart(&this, CtxInvokeThread);
-	verify( thrd_c->last->context.SP );
-	verify( thrd_c->      context.SP );
-	CtxSwitch( &thrd_c->last->context, &thrd_c->context );
+	this_thrd->context.[SP, FP] = this_thrd->self_cor.context.[SP, FP];
+	verify( this_thrd->context.SP );
+	CtxSwitch( &curr_thrd->context, &this_thrd->context );
 
-	ScheduleThread(thrd_h);
+	ScheduleThread(this_thrd);
 	enable_interrupts( __cfaabi_dbg_ctx );
 }
@@ -92,6 +89,10 @@
 extern "C" {
 	// KERNEL ONLY
-	void __finish_creation(coroutine_desc * thrd_c) {
-		ThreadCtxSwitch( thrd_c, thrd_c->last );
+	void __finish_creation(thread_desc * this) {
+		// set new coroutine that the processor is executing
+		// and context switch to it
+		verify( kernelTLS.this_thread != this );
+		verify( kernelTLS.this_thread->context.SP );
+		CtxSwitch( &this->context, &kernelTLS.this_thread->context );
 	}
 }
@@ -111,20 +112,4 @@
 }
 
-// KERNEL ONLY
-void ThreadCtxSwitch(coroutine_desc* src, coroutine_desc* dst) {
-	// set state of current coroutine to inactive
-	src->state = src->state == Halted ? Halted : Inactive;
-	dst->state = Active;
-
-	// set new coroutine that the processor is executing
-	// and context switch to it
-	verify( dst->context.SP );
-	CtxSwitch( &src->context, &dst->context );
-
-	// set state of new coroutine to active
-	dst->state = dst->state == Halted ? Halted : Inactive;
-	src->state = Active;
-}
-
 // Local Variables: //
 // mode: c //
