loop doesn't work, function calls don't work
authorjjenista <jjenista>
Thu, 2 Apr 2009 21:05:13 +0000 (21:05 +0000)
committerjjenista <jjenista>
Thu, 2 Apr 2009 21:05:13 +0000 (21:05 +0000)
Robust/src/Tests/setjmpTest/sj.c

index bc9dd57385c34b1a8297a81ea8c047e120fbcebc..3d230c0049ba063968c72179d6007ce2ed1ae3dc 100644 (file)
@@ -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" );