home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / yak.lha / Yak / src / pri.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-17  |  427 b   |  28 lines

  1. /*
  2.  * pri.c
  3.  * 
  4.  * Simple priority alteration routine for Yak.
  5.  * 
  6.  * MWS, 12-Sep-92
  7.  */
  8. #include <exec/types.h>
  9. #include <exec/tasks.h>
  10. #include <proto/exec.h>
  11.  
  12. #include "yak.h"
  13.  
  14. static LONG priority[3] = {0,0,5};
  15.  
  16. void
  17. MyPri(UWORD which)
  18. {
  19.     static BOOL firsttime = TRUE;
  20.     LONG oldpri;
  21.  
  22.     oldpri = SetTaskPri(FindTask(NULL), priority[which]);
  23.     if (firsttime == TRUE)
  24.     {
  25.         priority[ORIGINAL] = oldpri;
  26.         firsttime = FALSE; 
  27.     }
  28. }