From: jjenista Date: Thu, 2 Apr 2009 21:05:13 +0000 (+0000) Subject: loop doesn't work, function calls don't work X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d9c1993b7353059380c97cdf97cf0549744296f3;p=IRC.git loop doesn't work, function calls don't work --- diff --git a/Robust/src/Tests/setjmpTest/sj.c b/Robust/src/Tests/setjmpTest/sj.c index bc9dd573..3d230c00 100644 --- a/Robust/src/Tests/setjmpTest/sj.c +++ b/Robust/src/Tests/setjmpTest/sj.c @@ -62,7 +62,7 @@ void mlpBlock( int id ) { } -#define mlpNotifyExit( id ) \ +#define mlpNotifyExit() \ while( !isEmpty( current->childQ ) ) { \ current->child = getItem( current->childQ ); \ current = (SESE*) current->child; \ @@ -77,6 +77,23 @@ void mlpBlock( int id ) { } + +void foo() { + mlpLog( "f" ); + + mlpEnqueue( 20 ); + if( mlpRet ) { + mlpLog( "fc" ); + mlpNotifyExit(); + + } else { + mlpLog( "fp" ); + mlpNotifyExit(); + } +} + + + int main() { int i; char lname[10]; @@ -98,19 +115,24 @@ int main() { sprintf( lname, "Ls%d", 10 + i ); mlpLog( lname ); - mlpNotifyExit( 10 + i ); + mlpNotifyExit(); } else { - mlpLog( "i" ); + sprintf( lname, "%d", i ); + mlpLog( lname ); } } mlpLog( "x" ); - mlpNotifyExit( 1 ); + mlpNotifyExit(); } else { mlpLog( "W" ); - mlpNotifyExit( 0 ); + + //foo(); + + mlpLog( "X" ); + mlpNotifyExit(); } printf( "End test.\n" );