]> rtime.felk.cvut.cz Git - rtems-devel.git/blobdiff - rtems-omk-template/appfoo/task_1.c
Minor extension of appfoo example and testing with RTEMS 4.10.99.
[rtems-devel.git] / rtems-omk-template / appfoo / task_1.c
index ffd6fa24ca624a824d271c7636c4d0bacbacd4c2..9631ac6cc1ff3dda13712564c8ffeeb8e6d8b50b 100644 (file)
@@ -13,13 +13,16 @@ rtems_task Task_1(
   rtems_task_argument argument
 )
 {
+  int loops = 10;
   rtems_status_code status;
   printf("*** Starting up Task_1 ***\n");
 
-  while(1){
+  while(loops--){
     printf("Task_1 woken\n");
     status = rtems_task_wake_after( TICKS_PER_SECOND );
     check_rtems_status( status, 0, "rtems_task_wake_after" );
   }
+  printf("*** Suspend Task_1 ***\n");
+  rtems_task_suspend( RTEMS_SELF );
 }