//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
//
//		DEPRECATED TEST
//		DIFFERS BETWEEN DEBUG AND RELEASE
//
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------

#include <monitor.hfa>

monitor M {};

M a;

void f1( M & mutex a );
void f2( M & mutex a );
void f2( M & mutex a, M & mutex b );
void f3( M & mutex a );
void f3( M & mutex a, M & mutex b );
void f3( M & mutex a, M & mutex b, M & mutex c );

void foo() {

	//---------------------------------------
	waitfor( f1, a ) {
		1;
	}

	//---------------------------------------
	waitfor( f1, a ) {
		2;
	}
	waitfor( f2, a ) {
		3;
	}

	//---------------------------------------
	when( 1 < 3 ) waitfor( f2, a, a ) {
		4;
	}
	or timeout( 100 ) {
		5;
	}

	//---------------------------------------
	when( 2 < 3 ) waitfor( f3, a ) {
		5;
	}
	or else {
		6;
	}

	//---------------------------------------
	when( 3 < 3 ) waitfor( f3, a, a ) {
		7;
	}
	or when( 4 < 3 ) timeout( 101 ) {
		8;
	}
	or when( 5 < 3 ) else {
		9;
	}

	//---------------------------------------
	when( 6 < 3 ) waitfor( f3, a, a, a ) {
		10;
	}
 	or when( 7 < 3 ) waitfor( f1, a  ) {
		11;
	}
	or else {
		12;
	}

	//---------------------------------------
	when( 8 < 3 ) waitfor( f3, a, a ) {
		13;
	}
 	or waitfor( f1, a  ) {
		14;
	}
	or when( 9 < 3 ) timeout( 102 ) {
		15;
	}

	//---------------------------------------
	when( 10 < 3 ) waitfor( f1, a ) {
		16;
	}
 	or waitfor( f2, a, a ) {
		17;
	}
	or timeout( 103 ) {
		18;
	}
	or when( 11 < 3 ) else {
		19;
	}
}

int main() {

}