Index: src/tests/sched-int-multi.c
===================================================================
--- src/tests/sched-int-multi.c	(revision e4ba18e4034ceb27ba0a576300d4831719e79f8b)
+++ src/tests/sched-int-multi.c	(revision 1ed841f7e049323e1d8acd9b17df225ae010f2a5)
@@ -2,4 +2,5 @@
 #include <kernel>
 #include <monitor>
+#include <stdlib>
 #include <thread>
 
@@ -12,4 +13,8 @@
 	int counter;
 	state_t state;
+
+	unsigned short do_signal;
+	unsigned short do_wait2;
+	unsigned short do_wait1;
 };
 
@@ -18,4 +23,8 @@
 	this->counter = 0;
 	this->state = BARGE;
+
+	this->do_signal = 6;
+	this->do_wait1  = 1;
+	this->do_wait2  = 3;
 }
 
@@ -33,26 +42,26 @@
 	c->counter++;
 
+	if( (c->counter % 1000) == 0 ) sout | c->counter | endl;
+
 	int action = c->counter % 10;
 
-	if( action == 1 || action == 3 ) {
-		if(c->state != BARGE) {
-			sout | "ERROR Mutual exclusion is inconsistent for wait" | endl;
-			abort();
-		}
+	if( action == 0 ) {
+		c->do_signal = max( ((unsigned)rand48()) % 10, 1);
+		c->do_wait1 = ((unsigned)rand48()) % (c->do_signal);
+		c->do_wait2 = ((unsigned)rand48()) % (c->do_signal);
 
+		// if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;
+	}
+
+	if( action == c->do_wait1 || action == c->do_wait2 ) {
 		c->state = WAIT;
 		wait( &cond );
 
 		if(c->state != SIGNAL) {
-			sout | "ERROR Barging detected" | endl;
+			sout | "ERROR Barging detected" | c->counter | endl;
 			abort();
 		}
 	}
-	else if( action == 6 ) {
-		if(c->state != BARGE) {
-			sout | "ERROR Mutual exclusion is inconsistent for signal" | endl;
-			abort();
-		}
-
+	else if( action == c->do_signal ) {
 		c->state = SIGNAL;
 
@@ -64,6 +73,5 @@
 	}
 
-	if( (c->counter % 1000) == 0 ) sout | c->counter | endl;
-	if( c->counter == 100_000 ) c->done = true;
+	if( c->counter >= 100_000 ) c->done = true;
 	return !c->done;
 }
@@ -82,7 +90,8 @@
 
 int main(int argc, char* argv[]) {
-	processor p[3];
+	rand48seed(0);
+	processor p;
 	{
-		Threads t[20];
+		Threads t[17];
 	}
 }
