home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Science / µSim 1.0 folder / Libs / FabTaskManager.h < prev    next >
Encoding:
Text File  |  1994-12-05  |  931 b   |  30 lines  |  [TEXT/MMCC]

  1. typedef struct TMInfo TMInfo, *TMInfoPtr;
  2.  
  3. struct TMInfo {
  4.     QElemPtr    link;
  5.     short    qType;
  6. #ifndef powerc
  7.     short    align;
  8. #endif
  9.     long    parameter;
  10.     void (*tmProc)(long);
  11. //    void (*respProc)(TMInfoPtr);
  12.     Ptr        savedA5;
  13. //    NMRec    tmNotification;
  14.     };
  15.  
  16. /*
  17. theProc is the procedure you want to schedule for execution.
  18. It must be in a LOCKED segment (it should not move, guys).
  19. theProc CAN move memory; if it does not, call it directly!
  20. theProc must be a "pascal void theProc(long)".
  21. The long passed is the refCon field in the Notification Manager record.
  22. You have to supply a task record previously allocated with _NewPtr.
  23. InstallProc can (and should) be called at interrupt time.
  24. Pass NIL in theProc or theTaskPtr, and the Mac will almost surely HANG.
  25. */
  26. void InitTaskManager(void);
  27. void PROCCALLEDATINTERRUPTTIME(TMInfoPtr theTaskPtr, long param);
  28. void InitTaskRecord(void (*theProc)(long), TMInfoPtr theTaskPtr);
  29. void CheckCallQueue(void);
  30.