Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/Makefile.am	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -27,4 +27,6 @@
 
 noinst_PROGRAMS =
+
+all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
 
 bench$(EXEEXT) :
@@ -63,27 +65,4 @@
 ctxswitch-pthread$(EXEEXT):
 	@BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-## =========================================================================================================
-creation$(EXEEXT) :\
-	creation-pthread.run		\
-	creation-cfa_coroutine.run	\
-	creation-cfa_thread.run		\
-	creation-upp_coroutine.run	\
-	creation-upp_thread.run
-
-creation-cfa_coroutine$(EXEEXT):
-	${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-cfa_thread$(EXEEXT):
-	${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-upp_coroutine$(EXEEXT):
-	u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-upp_thread$(EXEEXT):
-	u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-pthread$(EXEEXT):
-	@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
 
 ## =========================================================================================================
@@ -153,4 +132,27 @@
 
 ## =========================================================================================================
+creation$(EXEEXT) :\
+	creation-pthread.run		\
+	creation-cfa_coroutine.run	\
+	creation-cfa_thread.run		\
+	creation-upp_coroutine.run	\
+	creation-upp_thread.run
+
+creation-cfa_coroutine$(EXEEXT):
+	${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-cfa_thread$(EXEEXT):
+	${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_coroutine$(EXEEXT):
+	u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_thread$(EXEEXT):
+	u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-pthread$(EXEEXT):
+	@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+## =========================================================================================================
 
 %.run : %$(EXEEXT) ${REPEAT}
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/Makefile.in	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -444,4 +444,6 @@
 .NOTPARALLEL:
 
+all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
+
 bench$(EXEEXT) :
 	@for ccflags in "-debug" "-nodebug"; do \
@@ -479,26 +481,4 @@
 	@BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
 
-creation$(EXEEXT) :\
-	creation-pthread.run		\
-	creation-cfa_coroutine.run	\
-	creation-cfa_thread.run		\
-	creation-upp_coroutine.run	\
-	creation-upp_thread.run
-
-creation-cfa_coroutine$(EXEEXT):
-	${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-cfa_thread$(EXEEXT):
-	${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-upp_coroutine$(EXEEXT):
-	u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-upp_thread$(EXEEXT):
-	u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
-creation-pthread$(EXEEXT):
-	@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
-
 mutex$(EXEEXT) :\
 	mutex-function.run	\
@@ -562,4 +542,26 @@
 waitfor-cfa4$(EXEEXT):
 	${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation$(EXEEXT) :\
+	creation-pthread.run		\
+	creation-cfa_coroutine.run	\
+	creation-cfa_thread.run		\
+	creation-upp_coroutine.run	\
+	creation-upp_thread.run
+
+creation-cfa_coroutine$(EXEEXT):
+	${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-cfa_thread$(EXEEXT):
+	${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_coroutine$(EXEEXT):
+	u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_thread$(EXEEXT):
+	u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-pthread$(EXEEXT):
+	@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
 
 %.run : %$(EXEEXT) ${REPEAT}
Index: src/benchmark/SchedInt.c
===================================================================
--- src/benchmark/SchedInt.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#include <fstream>
-#include <stdlib>
-#include <thread>
-
-#include "bench.h"
-
-condition condA; 
-condition condB;
-condition condC;
-condition condD;
-
-monitor mon_t {};
-
-mon_t mon1, mon2;
-
-thread thrdA {};
-thread thrdB {};
-thread thrdC {};
-thread thrdD {};
-
-//-------------------------------------------------------------------
-// 1 monitor signal cycle
-void sideA( mon_t * mutex a ) {
-	long long int StartTime, EndTime;
-
-	StartTime = Time();
-	for( int i = 0;; i++ ) {
-		signal(&condA);
-		if( i > N ) break;
-		wait(&condB);
-	}
-	EndTime = Time();
-
-	sout | ( EndTime - StartTime ) / N;
-}
-
-void sideB( mon_t * mutex a ) {
-	for( int i = 0;; i++ ) {
-		signal(&condB);
-		if( i > N ) break;
-		wait(&condA);
-	}
-}
-
-//-------------------------------------------------------------------
-// 2 monitor signal cycle
-void sideC( mon_t * mutex a, mon_t * mutex b ) {
-	long long int StartTime, EndTime;
-
-	StartTime = Time();
-	for( int i = 0;; i++ ) {
-		signal(&condC);
-		if( i > N ) break;
-		wait(&condD);
-	}
-	EndTime = Time();
-
-	sout | ( EndTime - StartTime ) / N | endl;
-}
-
-void sideD( mon_t * mutex a, mon_t * mutex b ) {
-	for( int i = 0;; i++ ) {
-		signal(&condD);
-		if( i > N ) break;
-		wait(&condC);
-	}
-}
-
-void main( thrdA * this ) { sideA( &mon1 ); }
-void main( thrdB * this ) { sideB( &mon1 ); }
-void main( thrdC * this ) { sideC( &mon1, &mon2 ); }
-void main( thrdD * this ) { sideD( &mon1, &mon2 ); }
-
-int main() {
-	{
-		thrdA a;
-		thrdB b;
-	}
-	{
-		thrdC c;
-		thrdD d;
-	}
-}
Index: src/benchmark/csv-data.c
===================================================================
--- src/benchmark/csv-data.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/csv-data.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -111,7 +111,7 @@
 	StartTime = Time();
 	for( int i = 0;; i++ ) {
-		signal(&cond1a);
-		if( i > N ) break;
-		wait(&cond1b);
+		signal(cond1a);
+		if( i > N ) break;
+		wait(cond1b);
 	}
 	EndTime = Time();
@@ -122,7 +122,7 @@
 void side1B( mon_t & mutex a ) {
 	for( int i = 0;; i++ ) {
-		signal(&cond1b);
-		if( i > N ) break;
-		wait(&cond1a);
+		signal(cond1b);
+		if( i > N ) break;
+		wait(cond1a);
 	}
 }
@@ -159,7 +159,7 @@
 	StartTime = Time();
 	for( int i = 0;; i++ ) {
-		signal(&cond2a);
-		if( i > N ) break;
-		wait(&cond2b);
+		signal(cond2a);
+		if( i > N ) break;
+		wait(cond2b);
 	}
 	EndTime = Time();
@@ -170,7 +170,7 @@
 void side2B( mon_t & mutex a, mon_t & mutex b ) {
 	for( int i = 0;; i++ ) {
-		signal(&cond2b);
-		if( i > N ) break;
-		wait(&cond2a);
+		signal(cond2b);
+		if( i > N ) break;
+		wait(cond2a);
 	}
 }
Index: src/benchmark/schedint/cfa1.c
===================================================================
--- src/benchmark/schedint/cfa1.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/schedint/cfa1.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -15,5 +15,5 @@
 
 void __attribute__((noinline)) call( M & mutex a1 ) {
-	signal(&c);
+	signal(c);
 }
 
@@ -22,5 +22,5 @@
 	BENCH(
 		for (size_t i = 0; i < n; i++) {
-			wait(&c);
+			wait(c);
 		},
 		result
Index: src/benchmark/schedint/cfa2.c
===================================================================
--- src/benchmark/schedint/cfa2.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/schedint/cfa2.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -15,5 +15,5 @@
 
 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {
-	signal(&c);
+	signal(c);
 }
 
@@ -22,5 +22,5 @@
 	BENCH(
 		for (size_t i = 0; i < n; i++) {
-			wait(&c);
+			wait(c);
 		},
 		result
Index: src/benchmark/schedint/cfa4.c
===================================================================
--- src/benchmark/schedint/cfa4.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/benchmark/schedint/cfa4.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -15,5 +15,5 @@
 
 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
-	signal(&c);
+	signal(c);
 }
 
@@ -22,5 +22,5 @@
 	BENCH(
 		for (size_t i = 0; i < n; i++) {
-			wait(&c);
+			wait(c);
 		},
 		result
Index: src/libcfa/concurrency/invoke.h
===================================================================
--- src/libcfa/concurrency/invoke.h	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/invoke.h	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -25,119 +25,173 @@
 #define _INVOKE_H_
 
-      #define unlikely(x)    __builtin_expect(!!(x), 0)
-      #define thread_local _Thread_local
-
-      typedef void (*fptr_t)();
-
-      struct spinlock {
-            volatile int lock;
-            #ifdef __CFA_DEBUG__
-                  const char * prev_name;
-                  void* prev_thrd;
-            #endif
-      };
-
-      struct __thread_queue_t {
-            struct thread_desc * head;
-            struct thread_desc ** tail;
-      };
-
-      struct __condition_stack_t {
-            struct __condition_criterion_t * top;
-      };
-
-      #ifdef __CFORALL__
-      extern "Cforall" {
-            void ?{}( struct __thread_queue_t & );
-            void append( struct __thread_queue_t *, struct thread_desc * );
-            struct thread_desc * pop_head( struct __thread_queue_t * );
-            struct thread_desc * remove( struct __thread_queue_t *, struct thread_desc ** );
-
-            void ?{}( struct __condition_stack_t & );
-            void push( struct __condition_stack_t *, struct __condition_criterion_t * );
-            struct __condition_criterion_t * pop( struct __condition_stack_t * );
-
-            void ?{}(spinlock & this);
-            void ^?{}(spinlock & this);
-      }
-      #endif
-
-      struct coStack_t {
-            unsigned int size;                        // size of stack
-            void *storage;                            // pointer to stack
-            void *limit;                              // stack grows towards stack limit
-            void *base;                               // base of stack
-            void *context;                            // address of cfa_context_t
-            void *top;                                // address of top of storage
-            bool userStack;                           // whether or not the user allocated the stack
-      };
-
-      enum coroutine_state { Halted, Start, Inactive, Active, Primed };
-
-      struct coroutine_desc {
-            struct coStack_t stack;                   // stack information of the coroutine
-            const char *name;                         // textual name for coroutine/task, initialized by uC++ generated code
-            int errno_;                               // copy of global UNIX variable errno
-            enum coroutine_state state;               // current execution status for coroutine
-            struct coroutine_desc * starter;          // first coroutine to resume this one
-            struct coroutine_desc * last;             // last coroutine to resume this one
-      };
-
-      struct __waitfor_mask_t {
-            short * accepted;                         // the index of the accepted function, -1 if none
-            struct __acceptable_t * clauses;          // list of acceptable functions, null if any
-            short size;                               // number of acceptable functions
-      };
-
-      struct monitor_desc {
-            struct spinlock lock;                     // spinlock to protect internal data
-            struct thread_desc * owner;               // current owner of the monitor
-            struct __thread_queue_t entry_queue;      // queue of threads that are blocked waiting for the monitor
-            struct __condition_stack_t signal_stack;  // stack of conditions to run next once we exit the monitor
-            unsigned int recursion;                   // monitor routines can be called recursively, we need to keep track of that
-            struct __waitfor_mask_t mask;             // mask used to know if some thread is waiting for something while holding the monitor
-            struct __condition_node_t * dtor_node;    // node used to signal the dtor in a waitfor dtor
-      };
-
-      struct __monitor_group_t {
-            struct monitor_desc ** list;              // currently held monitors
-            short                  size;              // number of currently held monitors
-            fptr_t                 func;              // last function that acquired monitors
-      };
-
-      struct thread_desc {
-            // Core threading fields
-            struct coroutine_desc  self_cor;          // coroutine body used to store context
-            struct monitor_desc    self_mon;          // monitor body used for mutual exclusion
-            struct monitor_desc *  self_mon_p;        // pointer to monitor with sufficient lifetime for current monitors
-            struct __monitor_group_t monitors;        // monitors currently held by this thread
-
-            // Link lists fields
-            struct thread_desc * next;                // instrusive link field for threads
-
-
+	#define unlikely(x)    __builtin_expect(!!(x), 0)
+	#define thread_local _Thread_local
+
+	typedef void (*fptr_t)();
+	typedef int_fast16_t __lock_size_t;
+
+	struct spinlock {
+		volatile int lock;
+		#ifdef __CFA_DEBUG__
+			const char * prev_name;
+			void* prev_thrd;
+		#endif
+	};
+
+	struct __thread_queue_t {
+		struct thread_desc * head;
+		struct thread_desc ** tail;
+	};
+
+	struct __condition_stack_t {
+		struct __condition_criterion_t * top;
+	};
+
+	#ifdef __CFORALL__
+	extern "Cforall" {
+		void ?{}( struct __thread_queue_t & );
+		void append( struct __thread_queue_t &, struct thread_desc * );
+		struct thread_desc * pop_head( struct __thread_queue_t & );
+		struct thread_desc * remove( struct __thread_queue_t &, struct thread_desc ** );
+
+		void ?{}( struct __condition_stack_t & );
+		void push( struct __condition_stack_t &, struct __condition_criterion_t * );
+		struct __condition_criterion_t * pop( struct __condition_stack_t & );
+
+		void  ?{}(spinlock & this);
+		void ^?{}(spinlock & this);
+	}
+	#endif
+
+	struct coStack_t {
+		// size of stack
+		size_t size;
+
+		// pointer to stack
+		void *storage;
+
+		// stack grows towards stack limit
+		void *limit;
+
+		// base of stack
+		void *base;
+
+		// address of cfa_context_t
+		void *context;
+
+		// address of top of storage
+		void *top;
+
+		// whether or not the user allocated the stack
+		bool userStack;
+	};
+
+	enum coroutine_state { Halted, Start, Inactive, Active, Primed };
+
+	struct coroutine_desc {
+		// stack information of the coroutine
+		struct coStack_t stack;
+
+		// textual name for coroutine/task, initialized by uC++ generated code
+		const char *name;
+
+		// copy of global UNIX variable errno
+		int errno_;
+
+		// current execution status for coroutine
+		enum coroutine_state state;
+
+		// first coroutine to resume this one
+		struct coroutine_desc * starter;
+
+		// last coroutine to resume this one
+		struct coroutine_desc * last;
+	};
+
+	struct __waitfor_mask_t {
+		// the index of the accepted function, -1 if none
+		short * accepted;
+
+		// list of acceptable functions, null if any
+		struct __acceptable_t * clauses;
+
+		// number of acceptable functions
+		__lock_size_t size;
+	};
+
+	struct monitor_desc {
+		// spinlock to protect internal data
+		struct spinlock lock;
+
+		// current owner of the monitor
+		struct thread_desc * owner;
+
+		// queue of threads that are blocked waiting for the monitor
+		struct __thread_queue_t entry_queue;
+
+		// stack of conditions to run next once we exit the monitor
+		struct __condition_stack_t signal_stack;
+
+		// monitor routines can be called recursively, we need to keep track of that
+		unsigned int recursion;
+
+		// mask used to know if some thread is waiting for something while holding the monitor
+		struct __waitfor_mask_t mask;
+
+		// node used to signal the dtor in a waitfor dtor
+		struct __condition_node_t * dtor_node;
+	};
+
+	struct __monitor_group_t {
+		// currently held monitors
+		struct monitor_desc ** list;
+
+		// number of currently held monitors
+		__lock_size_t size;
+
+		// last function that acquired monitors
+		fptr_t func;
+	};
+
+	struct thread_desc {
+		// Core threading fields
+		// coroutine body used to store context
+		struct coroutine_desc  self_cor;
+
+		// monitor body used for mutual exclusion
+		struct monitor_desc    self_mon;
+
+		// pointer to monitor with sufficient lifetime for current monitors
+		struct monitor_desc *  self_mon_p;
+
+		// monitors currently held by this thread
+		struct __monitor_group_t monitors;
+
+		// Link lists fields
+		// instrusive link field for threads
+		struct thread_desc * next;
      };
 
      #ifdef __CFORALL__
      extern "Cforall" {
-            static inline monitor_desc * ?[?]( const __monitor_group_t & this, ptrdiff_t index ) {
-                  return this.list[index];
-            }
-
-            static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) {
-                  if( (lhs.list != 0) != (rhs.list != 0) ) return false;
-                  if( lhs.size != rhs.size ) return false;
-                  if( lhs.func != rhs.func ) return false;
-
-                  // Check that all the monitors match
-                  for( int i = 0; i < lhs.size; i++ ) {
-                        // If not a match, check next function
-                        if( lhs[i] != rhs[i] ) return false;
-                  }
-
-                  return true;
-            }
-      }
-      #endif
+		static inline monitor_desc * ?[?]( const __monitor_group_t & this, ptrdiff_t index ) {
+			return this.list[index];
+		}
+
+		static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) {
+			if( (lhs.list != 0) != (rhs.list != 0) ) return false;
+			if( lhs.size != rhs.size ) return false;
+			if( lhs.func != rhs.func ) return false;
+
+			// Check that all the monitors match
+			for( int i = 0; i < lhs.size; i++ ) {
+				// If not a match, check next function
+				if( lhs[i] != rhs[i] ) return false;
+			}
+
+			return true;
+		}
+	}
+	#endif
 
 #endif //_INVOKE_H_
@@ -146,25 +200,25 @@
 #define _INVOKE_PRIVATE_H_
 
-      struct machine_context_t {
-            void *SP;
-            void *FP;
-            void *PC;
-      };
-
-      // assembler routines that performs the context switch
-      extern void CtxInvokeStub( void );
-      void CtxSwitch( void * from, void * to ) asm ("CtxSwitch");
-
-      #if   defined( __x86_64__ )
-      #define CtxGet( ctx ) __asm__ ( \
-                  "movq %%rsp,%0\n"   \
-                  "movq %%rbp,%1\n"   \
-            : "=rm" (ctx.SP), "=rm" (ctx.FP) )
-      #elif defined( __i386__ )
-      #define CtxGet( ctx ) __asm__ ( \
-                  "movl %%esp,%0\n"   \
-                  "movl %%ebp,%1\n"   \
-            : "=rm" (ctx.SP), "=rm" (ctx.FP) )
-      #endif
+	struct machine_context_t {
+		void *SP;
+		void *FP;
+		void *PC;
+	};
+
+	// assembler routines that performs the context switch
+	extern void CtxInvokeStub( void );
+	void CtxSwitch( void * from, void * to ) asm ("CtxSwitch");
+
+	#if   defined( __x86_64__ )
+	#define CtxGet( ctx ) __asm__ ( \
+			"movq %%rsp,%0\n"   \
+			"movq %%rbp,%1\n"   \
+		: "=rm" (ctx.SP), "=rm" (ctx.FP) )
+	#elif defined( __i386__ )
+	#define CtxGet( ctx ) __asm__ ( \
+			"movl %%esp,%0\n"   \
+			"movl %%ebp,%1\n"   \
+		: "=rm" (ctx.SP), "=rm" (ctx.FP) )
+	#endif
 
 #endif //_INVOKE_PRIVATE_H_
Index: src/libcfa/concurrency/kernel
===================================================================
--- src/libcfa/concurrency/kernel	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/kernel	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -26,8 +26,15 @@
 //-----------------------------------------------------------------------------
 // Locks
-void lock      ( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, spin if already acquired
-void lock_yield( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, yield repeatedly if already acquired
-bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, return false if already acquired
-void unlock    ( spinlock * );                        // Unlock the spinlock
+// Lock the spinlock, spin if already acquired
+void lock      ( spinlock * DEBUG_CTX_PARAM2 );
+
+// Lock the spinlock, yield repeatedly if already acquired
+void lock_yield( spinlock * DEBUG_CTX_PARAM2 );
+
+// Lock the spinlock, return false if already acquired
+bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );
+
+// Unlock the spinlock
+void unlock    ( spinlock * );
 
 struct semaphore {
@@ -39,6 +46,6 @@
 void  ?{}(semaphore & this, int count = 1);
 void ^?{}(semaphore & this);
-void P(semaphore * this);
-void V(semaphore * this);
+void   P (semaphore & this);
+void   V (semaphore & this);
 
 
@@ -46,10 +53,15 @@
 // Cluster
 struct cluster {
-	spinlock ready_queue_lock;                      // Ready queue locks
-	__thread_queue_t ready_queue;                   // Ready queue for threads
-	unsigned long long int preemption;              // Preemption rate on this cluster
+	// Ready queue locks
+	spinlock ready_queue_lock;
+
+	// Ready queue for threads
+	__thread_queue_t ready_queue;
+
+	// Preemption rate on this cluster
+	unsigned long long int preemption;
 };
 
-void ?{}(cluster & this);
+void ?{} (cluster & this);
 void ^?{}(cluster & this);
 
@@ -79,26 +91,39 @@
 struct processor {
 	// Main state
-	struct processorCtx_t * runner;                 // Coroutine ctx who does keeps the state of the processor
-	cluster * cltr;                                 // Cluster from which to get threads
-	pthread_t kernel_thread;                        // Handle to pthreads
+	// Coroutine ctx who does keeps the state of the processor
+	struct processorCtx_t * runner;
+
+	// Cluster from which to get threads
+	cluster * cltr;
+
+	// Handle to pthreads
+	pthread_t kernel_thread;
 
 	// Termination
-	volatile bool do_terminate;                     // Set to true to notify the processor should terminate
-	semaphore terminated;                           // Termination synchronisation
+	// Set to true to notify the processor should terminate
+	volatile bool do_terminate;
+
+	// Termination synchronisation
+	semaphore terminated;
 
 	// RunThread data
-	struct FinishAction finish;                     // Action to do after a thread is ran
+	// Action to do after a thread is ran
+	struct FinishAction finish;
 
 	// Preemption data
-	struct alarm_node_t * preemption_alarm;         // Node which is added in the discrete event simulaiton
-	bool pending_preemption;                        // If true, a preemption was triggered in an unsafe region, the processor must preempt as soon as possible
+	// Node which is added in the discrete event simulaiton
+	struct alarm_node_t * preemption_alarm;
+
+	// If true, a preemption was triggered in an unsafe region, the processor must preempt as soon as possible
+	bool pending_preemption;
 
 #ifdef __CFA_DEBUG__
-	char * last_enable;                             // Last function to enable preemption on this processor
+	// Last function to enable preemption on this processor
+	char * last_enable;
 #endif
 };
 
-void ?{}(processor & this);
-void ?{}(processor & this, cluster * cltr);
+void  ?{}(processor & this);
+void  ?{}(processor & this, cluster * cltr);
 void ^?{}(processor & this);
 
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/kernel.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -158,5 +158,5 @@
 		LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", &this);
 		this.do_terminate = true;
-		P( &this.terminated );
+		P( this.terminated );
 		pthread_join( this.kernel_thread, NULL );
 	}
@@ -216,5 +216,5 @@
 	}
 
-	V( &this->terminated );
+	V( this->terminated );
 
 	LIB_DEBUG_PRINT_SAFE("Kernel : core %p terminated\n", this);
@@ -335,5 +335,5 @@
 
 	lock(   &this_processor->cltr->ready_queue_lock DEBUG_CTX2 );
-	append( &this_processor->cltr->ready_queue, thrd );
+	append( this_processor->cltr->ready_queue, thrd );
 	unlock( &this_processor->cltr->ready_queue_lock );
 
@@ -344,5 +344,5 @@
 	verify( disable_preempt_count > 0 );
 	lock( &this->ready_queue_lock DEBUG_CTX2 );
-	thread_desc * head = pop_head( &this->ready_queue );
+	thread_desc * head = pop_head( this->ready_queue );
 	unlock( &this->ready_queue_lock );
 	verify( disable_preempt_count > 0 );
@@ -398,5 +398,5 @@
 }
 
-void BlockInternal(spinlock ** locks, unsigned short count) {
+void BlockInternal(spinlock * locks [], unsigned short count) {
 	disable_interrupts();
 	this_processor->finish.action_code = Release_Multi;
@@ -411,5 +411,5 @@
 }
 
-void BlockInternal(spinlock ** locks, unsigned short lock_count, thread_desc ** thrds, unsigned short thrd_count) {
+void BlockInternal(spinlock * locks [], unsigned short lock_count, thread_desc * thrds [], unsigned short thrd_count) {
 	disable_interrupts();
 	this_processor->finish.action_code = Release_Multi_Schedule;
@@ -618,29 +618,29 @@
 void ^?{}(semaphore & this) {}
 
-void P(semaphore * this) {
-	lock( &this->lock DEBUG_CTX2 );
-	this->count -= 1;
-	if ( this->count < 0 ) {
+void P(semaphore & this) {
+	lock( &this.lock DEBUG_CTX2 );
+	this.count -= 1;
+	if ( this.count < 0 ) {
 		// queue current task
-		append( &this->waiting, (thread_desc *)this_thread );
+		append( this.waiting, (thread_desc *)this_thread );
 
 		// atomically release spin lock and block
-		BlockInternal( &this->lock );
+		BlockInternal( &this.lock );
 	}
 	else {
-	    unlock( &this->lock );
-	}
-}
-
-void V(semaphore * this) {
+	    unlock( &this.lock );
+	}
+}
+
+void V(semaphore & this) {
 	thread_desc * thrd = NULL;
-	lock( &this->lock DEBUG_CTX2 );
-	this->count += 1;
-	if ( this->count <= 0 ) {
+	lock( &this.lock DEBUG_CTX2 );
+	this.count += 1;
+	if ( this.count <= 0 ) {
 		// remove task at head of waiting list
-		thrd = pop_head( &this->waiting );
-	}
-
-	unlock( &this->lock );
+		thrd = pop_head( this.waiting );
+	}
+
+	unlock( &this.lock );
 
 	// make new owner
@@ -655,16 +655,16 @@
 }
 
-void append( __thread_queue_t * this, thread_desc * t ) {
-	verify(this->tail != NULL);
-	*this->tail = t;
-	this->tail = &t->next;
-}
-
-thread_desc * pop_head( __thread_queue_t * this ) {
-	thread_desc * head = this->head;
+void append( __thread_queue_t & this, thread_desc * t ) {
+	verify(this.tail != NULL);
+	*this.tail = t;
+	this.tail = &t->next;
+}
+
+thread_desc * pop_head( __thread_queue_t & this ) {
+	thread_desc * head = this.head;
 	if( head ) {
-		this->head = head->next;
+		this.head = head->next;
 		if( !head->next ) {
-			this->tail = &this->head;
+			this.tail = &this.head;
 		}
 		head->next = NULL;
@@ -673,5 +673,5 @@
 }
 
-thread_desc * remove( __thread_queue_t * this, thread_desc ** it ) {
+thread_desc * remove( __thread_queue_t & this, thread_desc ** it ) {
 	thread_desc * thrd = *it;
 	verify( thrd );
@@ -679,12 +679,12 @@
 	(*it) = thrd->next;
 
-	if( this->tail == &thrd->next ) {
-		this->tail = it;
+	if( this.tail == &thrd->next ) {
+		this.tail = it;
 	}
 
 	thrd->next = NULL;
 
-	verify( (this->head == NULL) == (&this->head == this->tail) );
-	verify( *this->tail == NULL );
+	verify( (this.head == NULL) == (&this.head == this.tail) );
+	verify( *this.tail == NULL );
 	return thrd;
 }
@@ -694,14 +694,14 @@
 }
 
-void push( __condition_stack_t * this, __condition_criterion_t * t ) {
+void push( __condition_stack_t & this, __condition_criterion_t * t ) {
 	verify( !t->next );
-	t->next = this->top;
-	this->top = t;
-}
-
-__condition_criterion_t * pop( __condition_stack_t * this ) {
-	__condition_criterion_t * top = this->top;
+	t->next = this.top;
+	this.top = t;
+}
+
+__condition_criterion_t * pop( __condition_stack_t & this ) {
+	__condition_criterion_t * top = this.top;
 	if( top ) {
-		this->top = top->next;
+		this.top = top->next;
 		top->next = NULL;
 	}
Index: src/libcfa/concurrency/kernel_private.h
===================================================================
--- src/libcfa/concurrency/kernel_private.h	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/kernel_private.h	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -48,6 +48,6 @@
 void BlockInternal(thread_desc * thrd);
 void BlockInternal(spinlock * lock, thread_desc * thrd);
-void BlockInternal(spinlock ** locks, unsigned short count);
-void BlockInternal(spinlock ** locks, unsigned short count, thread_desc ** thrds, unsigned short thrd_count);
+void BlockInternal(spinlock * locks [], unsigned short count);
+void BlockInternal(spinlock * locks [], unsigned short count, thread_desc * thrds [], unsigned short thrd_count);
 void LeaveThread(spinlock * lock, thread_desc * thrd);
 
Index: src/libcfa/concurrency/monitor
===================================================================
--- src/libcfa/concurrency/monitor	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/monitor	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -39,17 +39,13 @@
 }
 
-// static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
-// 	return ((intptr_t)lhs) < ((intptr_t)rhs);
-// }
-
 struct monitor_guard_t {
 	monitor_desc ** m;
-	int count;
+	__lock_size_t   count;
 	monitor_desc ** prev_mntrs;
-	unsigned short  prev_count;
+	__lock_size_t   prev_count;
 	fptr_t          prev_func;
 };
 
-void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() );
+void ?{}( monitor_guard_t & this, monitor_desc ** m, __lock_size_t count, void (*func)() );
 void ^?{}( monitor_guard_t & this );
 
@@ -57,5 +53,5 @@
 	monitor_desc * m;
 	monitor_desc ** prev_mntrs;
-	unsigned short  prev_count;
+	__lock_size_t   prev_count;
 	fptr_t          prev_func;
 };
@@ -74,16 +70,32 @@
 
 struct __condition_criterion_t {
-	bool ready;						//Whether or not the criterion is met (True if met)
-	monitor_desc * target;				//The monitor this criterion concerns
-	struct __condition_node_t * owner;		//The parent node to which this criterion belongs
-	__condition_criterion_t * next;		//Intrusive linked list Next field
+	// Whether or not the criterion is met (True if met)
+	bool ready;
+
+	// The monitor this criterion concerns
+	monitor_desc * target;
+
+	// The parent node to which this criterion belongs
+	struct __condition_node_t * owner;
+
+	// Intrusive linked list Next field
+	__condition_criterion_t * next;
 };
 
 struct __condition_node_t {
-	thread_desc * waiting_thread;			//Thread that needs to be woken when all criteria are met
-	__condition_criterion_t * criteria; 	//Array of criteria (Criterions are contiguous in memory)
-	unsigned short count;				//Number of criterions in the criteria
-	__condition_node_t * next;			//Intrusive linked list Next field
-	uintptr_t user_info;				//Custom user info accessible before signalling
+	// Thread that needs to be woken when all criteria are met
+	thread_desc * waiting_thread;
+
+	// Array of criteria (Criterions are contiguous in memory)
+	__condition_criterion_t * criteria;
+
+	// Number of criterions in the criteria
+	__lock_size_t count;
+
+	// Intrusive linked list Next field
+	__condition_node_t * next;
+
+	// Custom user info accessible before signalling
+	uintptr_t user_info;
 };
 
@@ -93,16 +105,21 @@
 };
 
-void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info );
+void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info );
 void ?{}(__condition_criterion_t & this );
 void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner );
 
 void ?{}( __condition_blocked_queue_t & );
-void append( __condition_blocked_queue_t *, __condition_node_t * );
-__condition_node_t * pop_head( __condition_blocked_queue_t * );
+void append( __condition_blocked_queue_t &, __condition_node_t * );
+__condition_node_t * pop_head( __condition_blocked_queue_t & );
 
 struct condition {
-	__condition_blocked_queue_t blocked;	//Link list which contains the blocked threads as-well as the information needed to unblock them
-	monitor_desc ** monitors;			//Array of monitor pointers (Monitors are NOT contiguous in memory)
-	unsigned short monitor_count;			//Number of monitors in the array
+	// Link list which contains the blocked threads as-well as the information needed to unblock them
+	__condition_blocked_queue_t blocked;
+
+	// Array of monitor pointers (Monitors are NOT contiguous in memory)
+	monitor_desc ** monitors;
+
+	// Number of monitors in the array
+	__lock_size_t monitor_count;
 };
 
@@ -116,9 +133,9 @@
 }
 
-void wait( condition * this, uintptr_t user_info = 0 );
-bool signal( condition * this );
-bool signal_block( condition * this );
-static inline bool is_empty( condition * this ) { return !this->blocked.head; }
-uintptr_t front( condition * this );
+              void wait        ( condition & this, uintptr_t user_info = 0 );
+              bool signal      ( condition & this );
+              bool signal_block( condition & this );
+static inline bool is_empty    ( condition & this ) { return !this.blocked.head; }
+         uintptr_t front       ( condition & this );
 
 //-----------------------------------------------------------------------------
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/libcfa/concurrency/monitor.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -26,6 +26,6 @@
 // Forward declarations
 static inline void set_owner ( monitor_desc * this, thread_desc * owner );
-static inline void set_owner ( monitor_desc ** storage, short count, thread_desc * owner );
-static inline void set_mask  ( monitor_desc ** storage, short count, const __waitfor_mask_t & mask );
+static inline void set_owner ( monitor_desc * storage [], __lock_size_t count, thread_desc * owner );
+static inline void set_mask  ( monitor_desc * storage [], __lock_size_t count, const __waitfor_mask_t & mask );
 static inline void reset_mask( monitor_desc * this );
 
@@ -33,23 +33,23 @@
 static inline bool is_accepted( monitor_desc * this, const __monitor_group_t & monitors );
 
-static inline void lock_all( spinlock ** locks, unsigned short count );
-static inline void lock_all( monitor_desc ** source, spinlock ** /*out*/ locks, unsigned short count );
-static inline void unlock_all( spinlock ** locks, unsigned short count );
-static inline void unlock_all( monitor_desc ** locks, unsigned short count );
-
-static inline void save   ( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks );
-static inline void restore( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*in */ recursions, __waitfor_mask_t * /*in */ masks );
-
-static inline void init     ( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria );
-static inline void init_push( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria );
+static inline void lock_all  ( spinlock * locks [], __lock_size_t count );
+static inline void lock_all  ( monitor_desc * source [], spinlock * /*out*/ locks [], __lock_size_t count );
+static inline void unlock_all( spinlock * locks [], __lock_size_t count );
+static inline void unlock_all( monitor_desc * locks [], __lock_size_t count );
+
+static inline void save   ( monitor_desc * ctx [], __lock_size_t count, spinlock * locks [], unsigned int /*out*/ recursions [], __waitfor_mask_t /*out*/ masks [] );
+static inline void restore( monitor_desc * ctx [], __lock_size_t count, spinlock * locks [], unsigned int /*in */ recursions [], __waitfor_mask_t /*in */ masks [] );
+
+static inline void init     ( __lock_size_t count, monitor_desc * monitors [], __condition_node_t & waiter, __condition_criterion_t criteria [] );
+static inline void init_push( __lock_size_t count, monitor_desc * monitors [], __condition_node_t & waiter, __condition_criterion_t criteria [] );
 
 static inline thread_desc *        check_condition   ( __condition_criterion_t * );
-static inline void                 brand_condition   ( condition * );
-static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t &, monitor_desc ** monitors, int count );
+static inline void                 brand_condition   ( condition & );
+static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t &, monitor_desc * monitors [], __lock_size_t count );
 
 forall(dtype T | sized( T ))
-static inline short insert_unique( T ** array, short & size, T * val );
-static inline short count_max    ( const __waitfor_mask_t & mask );
-static inline short aggregate    ( monitor_desc ** storage, const __waitfor_mask_t & mask );
+static inline __lock_size_t insert_unique( T * array [], __lock_size_t & size, T * val );
+static inline __lock_size_t count_max    ( const __waitfor_mask_t & mask );
+static inline __lock_size_t aggregate    ( monitor_desc * storage [], const __waitfor_mask_t & mask );
 
 //-----------------------------------------------------------------------------
@@ -58,16 +58,16 @@
 	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                                     */ \
 	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up                            */ \
-	init( count, monitors, &waiter, criteria );               /* Link everything together                                                            */ \
+	init( count, monitors, waiter, criteria );                /* Link everything together                                                            */ \
 
 #define wait_ctx_primed(thrd, user_info)                        /* Create the necessary information to use the signaller stack                         */ \
 	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                                     */ \
 	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up                            */ \
-	init_push( count, monitors, &waiter, criteria );          /* Link everything together and push it to the AS-Stack                                */ \
+	init_push( count, monitors, waiter, criteria );           /* Link everything together and push it to the AS-Stack                                */ \
 
 #define monitor_ctx( mons, cnt )                                /* Define that create the necessary struct for internal/external scheduling operations */ \
 	monitor_desc ** monitors = mons;                          /* Save the targeted monitors                                                          */ \
-	unsigned short count = cnt;                               /* Save the count to a local variable                                                  */ \
+	__lock_size_t count = cnt;                                /* Save the count to a local variable                                                  */ \
 	unsigned int recursions[ count ];                         /* Save the current recursion levels to restore them later                             */ \
-	__waitfor_mask_t masks[ count ];                          /* Save the current waitfor masks to restore them later                                */ \
+	__waitfor_mask_t masks [ count ];                         /* Save the current waitfor masks to restore them later                                */ \
 	spinlock *   locks     [ count ];                         /* We need to pass-in an array of locks to BlockInternal                               */ \
 
@@ -114,5 +114,5 @@
 
 			// Some one else has the monitor, wait in line for it
-			append( &this->entry_queue, thrd );
+			append( this->entry_queue, thrd );
 			BlockInternal( &this->lock );
 
@@ -153,5 +153,5 @@
 		}
 
-		int count = 1;
+		__lock_size_t count = 1;
 		monitor_desc ** monitors = &this;
 		__monitor_group_t group = { &this, 1, func };
@@ -160,5 +160,5 @@
 
 			// Wake the thread that is waiting for this
-			__condition_criterion_t * urgent = pop( &this->signal_stack );
+			__condition_criterion_t * urgent = pop( this->signal_stack );
 			verify( urgent );
 
@@ -182,5 +182,5 @@
 
 			// Some one else has the monitor, wait in line for it
-			append( &this->entry_queue, thrd );
+			append( this->entry_queue, thrd );
 			BlockInternal( &this->lock );
 
@@ -272,5 +272,5 @@
 // relies on the monitor array being sorted
 static inline void enter( __monitor_group_t monitors ) {
-	for(int i = 0; i < monitors.size; i++) {
+	for( __lock_size_t i = 0; i < monitors.size; i++) {
 		__enter_monitor_desc( monitors.list[i], monitors );
 	}
@@ -279,6 +279,6 @@
 // Leave multiple monitor
 // relies on the monitor array being sorted
-static inline void leave(monitor_desc ** monitors, int count) {
-	for(int i = count - 1; i >= 0; i--) {
+static inline void leave(monitor_desc * monitors [], __lock_size_t count) {
+	for( __lock_size_t i = count - 1; i >= 0; i--) {
 		__leave_monitor_desc( monitors[i] );
 	}
@@ -287,5 +287,5 @@
 // Ctor for monitor guard
 // Sorts monitors before entering
-void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, fptr_t func ) {
+void ?{}( monitor_guard_t & this, monitor_desc * m [], __lock_size_t count, fptr_t func ) {
 	// Store current array
 	this.m = m;
@@ -296,12 +296,8 @@
 
 	// Save previous thread context
-	this.prev_mntrs = this_thread->monitors.list;
-	this.prev_count = this_thread->monitors.size;
-	this.prev_func  = this_thread->monitors.func;
+	this.[prev_mntrs, prev_count, prev_func] = this_thread->monitors.[list, size, func];
 
 	// Update thread context (needed for conditions)
-	this_thread->monitors.list = m;
-	this_thread->monitors.size = count;
-	this_thread->monitors.func = func;
+	this_thread->monitors.[list, size, func] = [m, count, func];
 
 	// LIB_DEBUG_PRINT_SAFE("MGUARD : enter %d\n", count);
@@ -325,29 +321,21 @@
 
 	// Restore thread context
-	this_thread->monitors.list = this.prev_mntrs;
-	this_thread->monitors.size = this.prev_count;
-	this_thread->monitors.func = this.prev_func;
-}
-
+	this_thread->monitors.[list, size, func] = this.[prev_mntrs, prev_count, prev_func];
+}
 
 // Ctor for monitor guard
 // Sorts monitors before entering
-void ?{}( monitor_dtor_guard_t & this, monitor_desc ** m, fptr_t func ) {
+void ?{}( monitor_dtor_guard_t & this, monitor_desc * m [], fptr_t func ) {
 	// Store current array
 	this.m = *m;
 
 	// Save previous thread context
-	this.prev_mntrs = this_thread->monitors.list;
-	this.prev_count = this_thread->monitors.size;
-	this.prev_func  = this_thread->monitors.func;
+	this.[prev_mntrs, prev_count, prev_func] = this_thread->monitors.[list, size, func];
 
 	// Update thread context (needed for conditions)
-	this_thread->monitors.list = m;
-	this_thread->monitors.size = 1;
-	this_thread->monitors.func = func;
+	this_thread->monitors.[list, size, func] = [m, 1, func];
 
 	__enter_monitor_dtor( this.m, func );
 }
-
 
 // Dtor for monitor guard
@@ -357,12 +345,10 @@
 
 	// Restore thread context
-	this_thread->monitors.list = this.prev_mntrs;
-	this_thread->monitors.size = this.prev_count;
-	this_thread->monitors.func = this.prev_func;
+	this_thread->monitors.[list, size, func] = this.[prev_mntrs, prev_count, prev_func];
 }
 
 //-----------------------------------------------------------------------------
 // Internal scheduling types
-void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
+void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info ) {
 	this.waiting_thread = waiting_thread;
 	this.count = count;
@@ -378,8 +364,8 @@
 }
 
-void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner ) {
+void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t & owner ) {
 	this.ready  = false;
 	this.target = target;
-	this.owner  = owner;
+	this.owner  = &owner;
 	this.next   = NULL;
 }
@@ -387,14 +373,14 @@
 //-----------------------------------------------------------------------------
 // Internal scheduling
-void wait( condition * this, uintptr_t user_info = 0 ) {
+void wait( condition & this, uintptr_t user_info = 0 ) {
 	brand_condition( this );
 
 	// Check that everything is as expected
-	assertf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
-	verifyf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
-	verifyf( this->monitor_count < 32u, "Excessive monitor count (%i)", this->monitor_count );
+	assertf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
+	verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%i)", this.monitor_count );
+	verifyf( this.monitor_count < 32u, "Excessive monitor count (%i)", this.monitor_count );
 
 	// Create storage for monitor context
-	monitor_ctx( this->monitors, this->monitor_count );
+	monitor_ctx( this.monitors, this.monitor_count );
 
 	// Create the node specific to this wait operation
@@ -403,5 +389,5 @@
 	// Append the current wait operation to the ones already queued on the condition
 	// We don't need locks for that since conditions must always be waited on inside monitor mutual exclusion
-	append( &this->blocked, &waiter );
+	append( this.blocked, &waiter );
 
 	// Lock all monitors (aggregates the locks as well)
@@ -409,5 +395,5 @@
 
 	// Find the next thread(s) to run
-	short thread_count = 0;
+	__lock_size_t thread_count = 0;
 	thread_desc * threads[ count ];
 	__builtin_memset( threads, 0, sizeof( threads ) );
@@ -417,5 +403,5 @@
 
 	// Remove any duplicate threads
-	for( int i = 0; i < count; i++) {
+	for( __lock_size_t i = 0; i < count; i++) {
 		thread_desc * new_owner = next_thread( monitors[i] );
 		insert_unique( threads, thread_count, new_owner );
@@ -429,32 +415,32 @@
 }
 
-bool signal( condition * this ) {
+bool signal( condition & this ) {
 	if( is_empty( this ) ) { return false; }
 
 	//Check that everything is as expected
-	verify( this->monitors );
-	verify( this->monitor_count != 0 );
+	verify( this.monitors );
+	verify( this.monitor_count != 0 );
 
 	//Some more checking in debug
 	LIB_DEBUG_DO(
 		thread_desc * this_thrd = this_thread;
-		if ( this->monitor_count != this_thrd->monitors.size ) {
-			abortf( "Signal on condition %p made with different number of monitor(s), expected %i got %i", this, this->monitor_count, this_thrd->monitors.size );
-		}
-
-		for(int i = 0; i < this->monitor_count; i++) {
-			if ( this->monitors[i] != this_thrd->monitors.list[i] ) {
-				abortf( "Signal on condition %p made with different monitor, expected %p got %i", this, this->monitors[i], this_thrd->monitors.list[i] );
+		if ( this.monitor_count != this_thrd->monitors.size ) {
+			abortf( "Signal on condition %p made with different number of monitor(s), expected %i got %i", &this, this.monitor_count, this_thrd->monitors.size );
+		}
+
+		for(int i = 0; i < this.monitor_count; i++) {
+			if ( this.monitors[i] != this_thrd->monitors.list[i] ) {
+				abortf( "Signal on condition %p made with different monitor, expected %p got %i", &this, this.monitors[i], this_thrd->monitors.list[i] );
 			}
 		}
 	);
 
-	unsigned short count = this->monitor_count;
+	__lock_size_t count = this.monitor_count;
 
 	// Lock all monitors
-	lock_all( this->monitors, NULL, count );
+	lock_all( this.monitors, NULL, count );
 
 	//Pop the head of the waiting queue
-	__condition_node_t * node = pop_head( &this->blocked );
+	__condition_node_t * node = pop_head( this.blocked );
 
 	//Add the thread to the proper AS stack
@@ -462,22 +448,22 @@
 		__condition_criterion_t * crit = &node->criteria[i];
 		assert( !crit->ready );
-		push( &crit->target->signal_stack, crit );
+		push( crit->target->signal_stack, crit );
 	}
 
 	//Release
-	unlock_all( this->monitors, count );
+	unlock_all( this.monitors, count );
 
 	return true;
 }
 
-bool signal_block( condition * this ) {
-	if( !this->blocked.head ) { return false; }
+bool signal_block( condition & this ) {
+	if( !this.blocked.head ) { return false; }
 
 	//Check that everything is as expected
-	verifyf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
-	verifyf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
+	verifyf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
+	verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%i)", this.monitor_count );
 
 	// Create storage for monitor context
-	monitor_ctx( this->monitors, this->monitor_count );
+	monitor_ctx( this.monitors, this.monitor_count );
 
 	// Lock all monitors (aggregates the locks them as well)
@@ -491,8 +477,8 @@
 
 	//Find the thread to run
-	thread_desc * signallee = pop_head( &this->blocked )->waiting_thread;
+	thread_desc * signallee = pop_head( this.blocked )->waiting_thread;
 	set_owner( monitors, count, signallee );
 
-	LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : signal_block condition %p (s: %p)\n", this, signallee );
+	LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : signal_block condition %p (s: %p)\n", &this, signallee );
 
 	//Everything is ready to go to sleep
@@ -512,10 +498,10 @@
 
 // Access the user_info of the thread waiting at the front of the queue
-uintptr_t front( condition * this ) {
+uintptr_t front( condition & this ) {
 	verifyf( !is_empty(this),
 		"Attempt to access user data on an empty condition.\n"
 		"Possible cause is not checking if the condition is empty before reading stored data."
 	);
-	return this->blocked.head->user_info;
+	return this.blocked.head->user_info;
 }
 
@@ -537,10 +523,10 @@
 	// This statment doesn't have a contiguous list of monitors...
 	// Create one!
-	short max = count_max( mask );
+	__lock_size_t max = count_max( mask );
 	monitor_desc * mon_storage[max];
 	__builtin_memset( mon_storage, 0, sizeof( mon_storage ) );
-	short actual_count = aggregate( mon_storage, mask );
-
-	LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max);
+	__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);
 
 	if(actual_count == 0) return;
@@ -569,5 +555,5 @@
 
 				__condition_criterion_t * dtor_crit = mon2dtor->dtor_node->criteria;
-				push( &mon2dtor->signal_stack, dtor_crit );
+				push( mon2dtor->signal_stack, dtor_crit );
 
 				unlock_all( locks, count );
@@ -629,5 +615,5 @@
 	set_mask( monitors, count, mask );
 
-	for(int i = 0; i < count; i++) {
+	for( __lock_size_t i = 0; i < count; i++) {
 		verify( monitors[i]->owner == this_thread );
 	}
@@ -661,8 +647,8 @@
 }
 
-static inline void set_owner( monitor_desc ** monitors, short count, thread_desc * owner ) {
+static inline void set_owner( monitor_desc * monitors [], __lock_size_t count, thread_desc * owner ) {
 	monitors[0]->owner     = owner;
 	monitors[0]->recursion = 1;
-	for( int i = 1; i < count; i++ ) {
+	for( __lock_size_t i = 1; i < count; i++ ) {
 		monitors[i]->owner     = owner;
 		monitors[i]->recursion = 0;
@@ -670,6 +656,6 @@
 }
 
-static inline void set_mask( monitor_desc ** storage, short count, const __waitfor_mask_t & mask ) {
-	for(int i = 0; i < count; i++) {
+static inline void set_mask( monitor_desc * storage [], __lock_size_t count, const __waitfor_mask_t & mask ) {
+	for( __lock_size_t i = 0; i < count; i++) {
 		storage[i]->mask = mask;
 	}
@@ -685,5 +671,5 @@
 	//Check the signaller stack
 	LIB_DEBUG_PRINT_SAFE("Kernel :  mon %p AS-stack top %p\n", this, this->signal_stack.top);
-	__condition_criterion_t * urgent = pop( &this->signal_stack );
+	__condition_criterion_t * urgent = pop( this->signal_stack );
 	if( urgent ) {
 		//The signaller stack is not empty,
@@ -697,5 +683,5 @@
 	// No signaller thread
 	// Get the next thread in the entry_queue
-	thread_desc * new_owner = pop_head( &this->entry_queue );
+	thread_desc * new_owner = pop_head( this->entry_queue );
 	set_owner( this, new_owner );
 
@@ -705,5 +691,5 @@
 static inline bool is_accepted( monitor_desc * this, const __monitor_group_t & group ) {
 	__acceptable_t * it = this->mask.clauses; // Optim
-	int count = this->mask.size;
+	__lock_size_t count = this->mask.size;
 
 	// Check if there are any acceptable functions
@@ -714,5 +700,5 @@
 
 	// For all acceptable functions check if this is the current function.
-	for( short i = 0; i < count; i++, it++ ) {
+	for( __lock_size_t i = 0; i < count; i++, it++ ) {
 		if( *it == group ) {
 			*this->mask.accepted = i;
@@ -725,30 +711,30 @@
 }
 
-static inline void init( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria ) {
-	for(int i = 0; i < count; i++) {
+static inline void init( __lock_size_t count, monitor_desc * monitors [], __condition_node_t & waiter, __condition_criterion_t criteria [] ) {
+	for( __lock_size_t i = 0; i < count; i++) {
 		(criteria[i]){ monitors[i], waiter };
 	}
 
-	waiter->criteria = criteria;
-}
-
-static inline void init_push( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria ) {
-	for(int i = 0; i < count; i++) {
+	waiter.criteria = criteria;
+}
+
+static inline void init_push( __lock_size_t count, monitor_desc * monitors [], __condition_node_t & waiter, __condition_criterion_t criteria [] ) {
+	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] );
-		push( &criteria[i].target->signal_stack, &criteria[i] );
-	}
-
-	waiter->criteria = criteria;
-}
-
-static inline void lock_all( spinlock ** locks, unsigned short count ) {
-	for( int i = 0; i < count; i++ ) {
+		push( criteria[i].target->signal_stack, &criteria[i] );
+	}
+
+	waiter.criteria = criteria;
+}
+
+static inline void lock_all( spinlock * locks [], __lock_size_t count ) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		lock_yield( locks[i] DEBUG_CTX2 );
 	}
 }
 
-static inline void lock_all( monitor_desc ** source, spinlock ** /*out*/ locks, unsigned short count ) {
-	for( int i = 0; i < count; i++ ) {
+static inline void lock_all( monitor_desc * source [], spinlock * /*out*/ locks [], __lock_size_t count ) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		spinlock * l = &source[i]->lock;
 		lock_yield( l DEBUG_CTX2 );
@@ -757,18 +743,24 @@
 }
 
-static inline void unlock_all( spinlock ** locks, unsigned short count ) {
-	for( int i = 0; i < count; i++ ) {
+static inline void unlock_all( spinlock * locks [], __lock_size_t count ) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		unlock( locks[i] );
 	}
 }
 
-static inline void unlock_all( monitor_desc ** locks, unsigned short count ) {
-	for( int i = 0; i < count; i++ ) {
+static inline void unlock_all( monitor_desc * locks [], __lock_size_t count ) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		unlock( &locks[i]->lock );
 	}
 }
 
-static inline void save( monitor_desc ** ctx, short count, __attribute((unused)) spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks ) {
-	for( int i = 0; i < count; i++ ) {
+static inline void save(
+	monitor_desc * ctx [],
+	__lock_size_t count,
+	__attribute((unused)) spinlock * locks [],
+	unsigned int /*out*/ recursions [],
+	__waitfor_mask_t /*out*/ masks []
+) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		recursions[i] = ctx[i]->recursion;
 		masks[i]      = ctx[i]->mask;
@@ -776,7 +768,13 @@
 }
 
-static inline void restore( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks ) {
+static inline void restore(
+	monitor_desc * ctx [],
+	__lock_size_t count,
+	spinlock * locks [],
+	unsigned int /*out*/ recursions [],
+	__waitfor_mask_t /*out*/ masks []
+) {
 	lock_all( locks, count );
-	for( int i = 0; i < count; i++ ) {
+	for( __lock_size_t i = 0; i < count; i++ ) {
 		ctx[i]->recursion = recursions[i];
 		ctx[i]->mask      = masks[i];
@@ -811,24 +809,24 @@
 }
 
-static inline void brand_condition( condition * this ) {
+static inline void brand_condition( condition & this ) {
 	thread_desc * thrd = this_thread;
-	if( !this->monitors ) {
+	if( !this.monitors ) {
 		// LIB_DEBUG_PRINT_SAFE("Branding\n");
 		assertf( thrd->monitors.list != NULL, "No current monitor to brand condition %p", thrd->monitors.list );
-		this->monitor_count = thrd->monitors.size;
-
-		this->monitors = malloc( this->monitor_count * sizeof( *this->monitors ) );
-		for( int i = 0; i < this->monitor_count; i++ ) {
-			this->monitors[i] = thrd->monitors.list[i];
-		}
-	}
-}
-
-static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t & mask, monitor_desc ** monitors, int count ) {
-
-	__thread_queue_t * entry_queue = &monitors[0]->entry_queue;
+		this.monitor_count = thrd->monitors.size;
+
+		this.monitors = malloc( this.monitor_count * sizeof( *this.monitors ) );
+		for( int i = 0; i < this.monitor_count; i++ ) {
+			this.monitors[i] = thrd->monitors.list[i];
+		}
+	}
+}
+
+static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t & mask, monitor_desc * monitors [], __lock_size_t count ) {
+
+	__thread_queue_t & entry_queue = monitors[0]->entry_queue;
 
 	// For each thread in the entry-queue
-	for(	thread_desc ** thrd_it = &entry_queue->head;
+	for(	thread_desc ** thrd_it = &entry_queue.head;
 		*thrd_it;
 		thrd_it = &(*thrd_it)->next
@@ -852,8 +850,8 @@
 
 forall(dtype T | sized( T ))
-static inline short insert_unique( T ** array, short & size, T * val ) {
+static inline __lock_size_t insert_unique( T * array [], __lock_size_t & size, T * val ) {
 	if( !val ) return size;
 
-	for(int i = 0; i <= size; i++) {
+	for( __lock_size_t i = 0; i <= size; i++) {
 		if( array[i] == val ) return size;
 	}
@@ -864,7 +862,7 @@
 }
 
-static inline short count_max( const __waitfor_mask_t & mask ) {
-	short max = 0;
-	for( int i = 0; i < mask.size; i++ ) {
+static inline __lock_size_t count_max( const __waitfor_mask_t & mask ) {
+	__lock_size_t max = 0;
+	for( __lock_size_t i = 0; i < mask.size; i++ ) {
 		max += mask.clauses[i].size;
 	}
@@ -872,9 +870,9 @@
 }
 
-static inline short aggregate( monitor_desc ** storage, const __waitfor_mask_t & mask ) {
-	short size = 0;
-	for( int i = 0; i < mask.size; i++ ) {
+static inline __lock_size_t aggregate( monitor_desc * storage [], const __waitfor_mask_t & mask ) {
+	__lock_size_t size = 0;
+	for( __lock_size_t i = 0; i < mask.size; i++ ) {
 		__libcfa_small_sort( mask.clauses[i].list, mask.clauses[i].size );
-		for( int j = 0; j < mask.clauses[i].size; j++) {
+		for( __lock_size_t j = 0; j < mask.clauses[i].size; j++) {
 			insert_unique( storage, size, mask.clauses[i].list[j] );
 		}
@@ -890,16 +888,16 @@
 }
 
-void append( __condition_blocked_queue_t * this, __condition_node_t * c ) {
-	verify(this->tail != NULL);
-	*this->tail = c;
-	this->tail = &c->next;
-}
-
-__condition_node_t * pop_head( __condition_blocked_queue_t * this ) {
-	__condition_node_t * head = this->head;
+void append( __condition_blocked_queue_t & this, __condition_node_t * c ) {
+	verify(this.tail != NULL);
+	*this.tail = c;
+	this.tail = &c->next;
+}
+
+__condition_node_t * pop_head( __condition_blocked_queue_t & this ) {
+	__condition_node_t * head = this.head;
 	if( head ) {
-		this->head = head->next;
+		this.head = head->next;
 		if( !head->next ) {
-			this->tail = &this->head;
+			this.tail = &this.head;
 		}
 		head->next = NULL;
Index: src/tests/boundedBuffer.c
===================================================================
--- src/tests/boundedBuffer.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/boundedBuffer.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -1,8 +1,8 @@
-// 
+//
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// boundedBuffer.c -- 
-// 
+//
+// boundedBuffer.c --
+//
 // Author           : Peter A. Buhr
 // Created On       : Mon Oct 30 12:45:13 2017
@@ -10,5 +10,5 @@
 // Last Modified On : Mon Oct 30 23:02:46 2017
 // Update Count     : 9
-// 
+//
 
 #include <stdlib>
@@ -31,16 +31,16 @@
 
 void insert( Buffer & mutex buffer, int elem ) {
-	if ( buffer.count == 20 ) wait( &buffer.empty );
+	if ( buffer.count == 20 ) wait( buffer.empty );
 	buffer.elements[buffer.back] = elem;
 	buffer.back = ( buffer.back + 1 ) % 20;
 	buffer.count += 1;
-	signal( &buffer.full );
+	signal( buffer.full );
 }
 int remove( Buffer & mutex buffer ) {
-	if ( buffer.count == 0 ) wait( &buffer.full );
+	if ( buffer.count == 0 ) wait( buffer.full );
 	int elem = buffer.elements[buffer.front];
 	buffer.front = ( buffer.front + 1 ) % 20;
 	buffer.count -= 1;
-	signal( &buffer.empty );
+	signal( buffer.empty );
 	return elem;
 }
Index: src/tests/datingService.c
===================================================================
--- src/tests/datingService.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/datingService.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -1,9 +1,9 @@
-//                               -*- Mode: C -*- 
-// 
+//                               -*- Mode: C -*-
+//
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// datingService.c -- 
-// 
+//
+// datingService.c --
+//
 // Author           : Peter A. Buhr
 // Created On       : Mon Oct 30 12:56:20 2017
@@ -11,5 +11,5 @@
 // Last Modified On : Mon Oct 30 23:02:11 2017
 // Update Count     : 15
-// 
+//
 
 #include <stdlib>										// random
@@ -18,8 +18,4 @@
 #include <thread>
 #include <unistd.h>										// getpid
-
-bool empty( condition & c ) {
-	return c.blocked.head == NULL;
-}
 
 enum { NoOfPairs = 20 };
@@ -31,10 +27,10 @@
 
 unsigned int girl( DatingService & mutex ds, unsigned int PhoneNo, unsigned int ccode ) {
-	if ( empty( ds.Boys[ccode] ) ) {
-		wait( &ds.Girls[ccode] );
+	if ( is_empty( ds.Boys[ccode] ) ) {
+		wait( ds.Girls[ccode] );
 		ds.GirlPhoneNo = PhoneNo;
 	} else {
 		ds.GirlPhoneNo = PhoneNo;
-		signal_block( &ds.Boys[ccode] );
+		signal_block( ds.Boys[ccode] );
 	} // if
 	return ds.BoyPhoneNo;
@@ -42,10 +38,10 @@
 
 unsigned int boy( DatingService & mutex ds, unsigned int PhoneNo, unsigned int ccode ) {
-	if ( empty( ds.Girls[ccode] ) ) {
-		wait( &ds.Boys[ccode] );
+	if ( is_empty( ds.Girls[ccode] ) ) {
+		wait( ds.Boys[ccode] );
 		ds.BoyPhoneNo = PhoneNo;
 	} else {
 		ds.BoyPhoneNo = PhoneNo;
-		signal_block( &ds.Girls[ccode] );
+		signal_block( ds.Girls[ccode] );
 	} // if
 	return ds.GirlPhoneNo;
Index: src/tests/sched-int-barge.c
===================================================================
--- src/tests/sched-int-barge.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/sched-int-barge.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -73,5 +73,5 @@
 	if( action == c.do_wait1 || action == c.do_wait2 ) {
 		c.state = WAIT;
-		wait( &cond );
+		wait( cond );
 
 		if(c.state != SIGNAL) {
@@ -83,6 +83,6 @@
 		c.state = SIGNAL;
 
-		signal( &cond );
-		signal( &cond );
+		signal( cond );
+		signal( cond );
 	}
 	else {
Index: src/tests/sched-int-block.c
===================================================================
--- src/tests/sched-int-block.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/sched-int-block.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -47,5 +47,5 @@
 //------------------------------------------------------------------------------
 void wait_op( global_data_t & mutex a, global_data_t & mutex b, unsigned i ) {
-	wait( &cond, (uintptr_t)this_thread );
+	wait( cond, (uintptr_t)this_thread );
 
 	yield( random( 10 ) );
@@ -74,9 +74,9 @@
 	[a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;
 
-	if( !is_empty( &cond ) ) {
+	if( !is_empty( cond ) ) {
 
-		thread_desc * next = front( &cond );
+		thread_desc * next = front( cond );
 
-		if( ! signal_block( &cond ) ) {
+		if( ! signal_block( cond ) ) {
 			sout | "ERROR expected to be able to signal" | endl;
 			abort();
Index: src/tests/sched-int-disjoint.c
===================================================================
--- src/tests/sched-int-disjoint.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/sched-int-disjoint.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -59,5 +59,5 @@
 // Waiting logic
 bool wait( global_t & mutex m, global_data_t & mutex d ) {
-	wait( &cond );
+	wait( cond );
 	if( d.state != SIGNAL ) {
 		sout | "ERROR barging!" | endl;
@@ -80,5 +80,5 @@
 //------------------------------------------------------------------------------
 // Signalling logic
-void signal( condition * cond, global_t & mutex a, global_data_t & mutex b ) {
+void signal( condition & cond, global_t & mutex a, global_data_t & mutex b ) {
 	b.state = SIGNAL;
 	signal( cond );
@@ -86,5 +86,5 @@
 
 void logic( global_t & mutex a ) {
-	signal( &cond, a, data );
+	signal( cond, a, data );
 
 	yield( random( 10 ) );
Index: src/tests/sched-int-wait.c
===================================================================
--- src/tests/sched-int-wait.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/sched-int-wait.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -41,17 +41,17 @@
 //----------------------------------------------------------------------------------------------------
 // Tools
-void signal( condition * cond, global_t & mutex a, global_t & mutex b ) {
+void signal( condition & cond, global_t & mutex a, global_t & mutex b ) {
 	signal( cond );
 }
 
-void signal( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
+void signal( condition & cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
 	signal( cond );
 }
 
-void wait( condition * cond, global_t & mutex a, global_t & mutex b ) {
+void wait( condition & cond, global_t & mutex a, global_t & mutex b ) {
 	wait( cond );
 }
 
-void wait( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
+void wait( condition & cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
 	wait( cond );
 }
@@ -65,14 +65,14 @@
 		switch( action ) {
 			case 0:
-				signal( &condABC, globalA, globalB, globalC );
+				signal( condABC, globalA, globalB, globalC );
 				break;
 			case 1:
-				signal( &condAB , globalA, globalB );
+				signal( condAB , globalA, globalB );
 				break;
 			case 2:
-				signal( &condBC , globalB, globalC );
+				signal( condBC , globalB, globalC );
 				break;
 			case 3:
-				signal( &condAC , globalA, globalC );
+				signal( condAC , globalA, globalC );
 				break;
 			default:
@@ -88,5 +88,5 @@
 void main( WaiterABC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condABC, globalA, globalB, globalC );
+		wait( condABC, globalA, globalB, globalC );
 	}
 
@@ -98,5 +98,5 @@
 void main( WaiterAB & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condAB , globalA, globalB );
+		wait( condAB , globalA, globalB );
 	}
 
@@ -108,5 +108,5 @@
 void main( WaiterAC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condAC , globalA, globalC );
+		wait( condAC , globalA, globalC );
 	}
 
@@ -118,5 +118,5 @@
 void main( WaiterBC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condBC , globalB, globalC );
+		wait( condBC , globalB, globalC );
 	}
 
Index: src/tests/thread.c
===================================================================
--- src/tests/thread.c	(revision d06c8082ddbb33e62239e6d16c4baee31b2c0526)
+++ src/tests/thread.c	(revision 6fa9e711ade8d9011abd8efddc8c998df488c1d1)
@@ -15,9 +15,9 @@
 		yield();
 	}
-	V(this.lock);
+	V(*this.lock);
 }
 
 void main(Second& this) {
-	P(this.lock);
+	P(*this.lock);
 	for(int i = 0; i < 10; i++) {
 		sout | "Second : Suspend No." | i + 1 | endl;
