Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Threads are now named
[simgrid.git] / testsuite / xbt / context_usage.c
index 749fbaf..1392e23 100644 (file)
@@ -49,8 +49,8 @@ int fB(int argc, char** argv)
   printf("Here is fB: ");
   print_args(argc,argv);
 
-/*   printf("\tContext B: Yield\n"); */
-/*   xbt_context_yield(); */
+  printf("\tContext B: Yield\n");
+  xbt_context_yield();
 
   printf("\tContext B: Push context A\n");
   xbt_fifo_push(fifo,cA);
@@ -95,9 +95,9 @@ int main(int argc, char** argv)
    
   xbt_init(&argc, argv);
 
-  cA = xbt_context_new(fA, NULL, NULL, NULL, NULL, 0, NULL);
-  cB = xbt_context_new(fB, NULL, NULL, NULL, NULL, 0, NULL);
-  cC = xbt_context_new(fC, NULL, NULL, NULL, NULL, 0, NULL);
+  cA = xbt_context_new("A",fA, NULL, NULL, NULL, NULL, 0, NULL);
+  cB = xbt_context_new("B",fB, NULL, NULL, NULL, NULL, 0, NULL);
+  cC = xbt_context_new("C",fC, NULL, NULL, NULL, NULL, 0, NULL);
 
   fifo = xbt_fifo_new();
 
@@ -125,5 +125,6 @@ int main(int argc, char** argv)
   xbt_exit();
   
   cA=cB=cC=NULL;
+  printf("Context main: Bye\n");
   return 0;
 }