Index: src/tests/.expect/concurrent/sched-int-multi2.txt
===================================================================
--- src/tests/.expect/concurrent/sched-int-multi2.txt	(revision 42356f4af6530b1d1809d09ce41a34db24c5eb25)
+++ src/tests/.expect/concurrent/sched-int-multi2.txt	(revision 4845ae2748facdf39ec2df3aaba15448ed6cd16f)
@@ -1,12 +1,0 @@
-Waiting 1
-Waiting 2
-Waiting 3
-Waiting 4
-Signaling ABC
-Signaling AB
-Signaling BC
-Signaling AC
-Waking 4
-Waking 3
-Waking 2
-Waking 1
Index: src/tests/sched-int-multi2.c
===================================================================
--- src/tests/sched-int-multi2.c	(revision 42356f4af6530b1d1809d09ce41a34db24c5eb25)
+++ src/tests/sched-int-multi2.c	(revision 4845ae2748facdf39ec2df3aaba15448ed6cd16f)
@@ -2,4 +2,5 @@
 #include <kernel>
 #include <monitor>
+#include <stdlib>
 #include <thread>
 
@@ -12,5 +13,15 @@
 condition condAB, condAC, condBC, condABC;
 
-thread Signaler {};
+thread Signaler {
+	int signals[4];
+};
+
+void ?{}( Signaler * this ){
+	this->signals[0] = 0;
+	this->signals[1] = 0;
+	this->signals[2] = 0;
+	this->signals[3] = 0;
+}
+
 thread WaiterAB {};
 thread WaiterAC {};
@@ -18,9 +29,5 @@
 thread WaiterABC{};
 
-int state;
-
-/*
-multi phase
-*/
+volatile bool done;
 
 //----------------------------------------------------------------------------------------------------
@@ -35,44 +42,52 @@
 
 void wait( condition * cond, global_t * mutex a, global_t * mutex b ) {
-	state++;
-	sout | "Waiting" | state | endl;
 	wait( cond );
-	sout | "Waking" | state | endl;
-	state--;
 }
 
 void wait( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
-	state++;
-	sout | "Waiting" | state | endl;
 	wait( cond );
-	sout | "Waking" | state | endl;
-	state--;
 }
 
 //----------------------------------------------------------------------------------------------------
 // Signaler
-// signals respectively AB, AC, BC, ABC
-void signalerABC( global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
-	sout | "Signaling ABC" | endl;
-	signal( &condABC, a, b, c );
-	sout | "Signaling AB" | endl;
-	signal( &condAB , a, b );
-	sout | "Signaling BC" | endl;
-	signal( &condBC , b, c );
-	sout | "Signaling AC" | endl;
-	signal( &condAC , a, c );
-}
+void main( Signaler* this ) {
 
-void signalerAB( global_t * mutex a, global_t * mutex b, global_t * c ) {
-	signalerABC(a, b, c);
-}
+	while( true ) {
+		int action = (unsigned)rand48() % 4;
+		bool finished = true;
 
-void signalerA( global_t * mutex a, global_t * b, global_t * c ) {
-	signalerAB (a, b, c);
-}
+		for(int i = 0; i < 4; i++) {
+			if( this->signals[action] < 10_000 ) {
+				finished = false;
+				break;
+			}
+			else {
+				action = (action + 1) % 4;
+			}
+		}
 
-void main( Signaler* this ) {
-	while( state != 4 ) { yield(); }
-	signalerA( &globalA, &globalB, &globalC );
+		this->signals[action]++;
+		if( finished ) break;
+
+		//sout | action | this->signals[0] | this->signals[1] | this->signals[2] | this->signals[3] | endl;
+
+		switch( action ) {
+			case 0: 
+				signal( &condABC, &globalA, &globalB, &globalC );
+				break;
+			case 1: 
+				signal( &condAB , &globalA, &globalB );
+				break;
+			case 2: 
+				signal( &condBC , &globalB, &globalC );
+				break;
+			case 3: 
+				signal( &condAC , &globalA, &globalC );
+				break;
+			default:
+				sout | "Something went wrong" | endl;
+				abort();
+		}
+	}	
 }
 
@@ -80,6 +95,7 @@
 // Waiter ABC
 void main( WaiterABC* this ) {
-	while( state != 0 ) { yield(); }
-	wait( &condABC, &globalA, &globalB, &globalC );
+	while( !done ) {
+		wait( &condABC, &globalA, &globalB, &globalC );
+	}
 }
 
@@ -87,6 +103,7 @@
 // Waiter AB
 void main( WaiterAB* this ) {
-	while( state != 1 ) { yield(); }
-	wait( &condAB , &globalA, &globalB );
+	while( !done ) {
+		wait( &condAB , &globalA, &globalB );
+	}
 }
 
@@ -94,6 +111,7 @@
 // Waiter AC
 void main( WaiterAC* this ) {
-	while( state != 2 ) { yield(); }
-	wait( &condAC , &globalA, &globalC );
+	while( !done ) {
+		wait( &condAC , &globalA, &globalC );
+	}
 }
 
@@ -101,6 +119,7 @@
 // Waiter BC
 void main( WaiterBC* this ) {
-	while( state != 3 ) { yield(); }
-	wait( &condBC , &globalB, &globalC );
+	while( !done ) {
+		wait( &condBC , &globalB, &globalC );
+	}
 }
 
@@ -108,5 +127,5 @@
 // Main
 int main(int argc, char* argv[]) {
-	state = 0;
+	done = false;
 	processor p;
 	{
@@ -115,5 +134,12 @@
 		WaiterBC  c;
 		WaiterAC  d;
-		Signaler  e;
+		{
+			Signaler  e;
+		}
+		done = true;
+		signal( &condABC, &globalA, &globalB, &globalC );
+		signal( &condAB , &globalA, &globalB );
+		signal( &condBC , &globalB, &globalC );
+		signal( &condAC , &globalA, &globalC );
 	}
 }
