home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0912.lha / Yak / Source / Source.lha / pri.c < prev    next >
C/C++ Source or Header  |  1993-07-31  |  428b  |  29 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[2] = {0,5};
  15.  
  16. void __regargs
  17. MyPri(UWORD which)
  18. {
  19.     static BOOL firsttime = TRUE;
  20.     LONG oldpri;
  21.  
  22.     oldpri = SetTaskPri(FindTask(NULL), priority[which]);
  23.     if (firsttime)
  24.     {
  25.         priority[ORIGINAL] = oldpri;
  26.         firsttime = FALSE; 
  27.     }
  28. }
  29.