home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / Examples / Tasks / TaskSignalTest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-07  |  684 b   |  33 lines

  1. #include <exec/types.h>
  2. #include <exec/nodes.h>
  3. #include <exec/lists.h>
  4. #include <exec/memory.h>
  5. #include <powerup/ppclib/interface.h>
  6. #include <powerup/gcclib/powerup_protos.h>
  7.  
  8.  
  9. int    main(void)
  10. {
  11. ULONG        MySignal;
  12. ULONG        WaitMask;
  13.  
  14.   if ((MySignal=PPCAllocSignal(-1)) != -1)
  15.   {
  16.     PPCprintf("PPCTask now waits for Signal %ld\nPlease use <Tools/PPCSignalTask TaskSignalTest %ld>\nto wake it up again",
  17.               MySignal,
  18.               MySignal);
  19.  
  20.     WaitMask    =    PPCWait(1<<MySignal);
  21.  
  22.     PPCprintf("PPCTask got Signals 0x%lx\n",
  23.               WaitMask); 
  24.  
  25.     PPCFreeSignal(MySignal);
  26.   }
  27.   else
  28.   {
  29.     PPCprintf("Couldn`t alloc the WakeUP Task signal\n");
  30.   }
  31.   return(0);
  32. }
  33.