home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / examples / catching_tasks / loop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-24  |  379 b   |  21 lines

  1. /* example program that runs forever */
  2.  
  3. #include <stdio.h>
  4. #include <proto/exec.h>
  5.  
  6. main()
  7. {
  8.         int i = 0;
  9.         struct Task *Task;
  10.  
  11.         /* set the priority to -1 so we don't use up all the CPU */
  12.         Task = FindTask(0);
  13.         SetTaskPri(Task, -1);
  14.         
  15.                
  16.         while (i == 0)
  17.         {
  18.                 printf("looping ...\n");
  19.         }
  20. }
  21.