home *** CD-ROM | disk | FTP | other *** search
- #pragma internal on
-
- // You need to initialize (and cleanup) this manager only
- // if you want to use the Timers.
- void InitFabTaskManager_OldTimers(void);
- void CleanupFabTaskManager_OldTimers(void);
-
- /*
- theProc is the procedure you want to schedule for execution.
- It must be in a LOCKED segment (it should not move, guys).
-
- - for System Tasks:
- theProc is supposed to move memory; if it does not, call it directly instead of deferring it!
-
- - for (new) Timer Tasks:
- theProc is called at system task time and thus is not subject to certain limitations;
-
- - for (old) Timer Tasks:
- theProc is called at interrupt time and thus is subject to well-known limitations;
- theProc is supposed not to trash register A3 (68K) because of my implementation.
-
- Pass NULL in theProc and the Mac will almost surely HANG.
- */
-
- // tasks created with autoDestroy run only once and self-destruct
- // don't call this at interrupt time!
- void *Fab_CreateSystemTask(void (*theProc)(void *), void *param, Boolean autoDestroy);
-
- // of course you can do the scheduling at interrupt time
- void Fab_ScheduleSystemTask(void *theTaskPtr);
-
- // you need to destroy only if you set autoDestroy to false
- // don't call this at interrupt time!
- void Fab_DestroySystemTask(void *theTaskPtr);
-
-
- /** New calls that don't use the Time Manager **/
-
- // don't call these at interrupt time!
- void *Fab_CreateTimerTask(void (*theProc)(void *), void *param, Boolean autoDestroy);
- void Fab_DestroyTimerTask(void *theTaskPtr);
-
- // you may call these at interrupt time
- #if !GENERATING68K
- void Fab_ScheduleTimerTask(void *theTaskPtr, UInt32 millisecs);
- void Fab_RescheduleTimerTask(void *theTaskPtr, UInt32 millisecs);
- void Fab_CancelTimerTask(void *theTaskPtr);
- #else
- #pragma parameter Fab_ScheduleTimerTask(__A0,__D0)
- asm void Fab_ScheduleTimerTask(void *tPtr, UInt32);
- #pragma parameter Fab_RescheduleTimerTask(__A0,__D0)
- asm void Fab_RescheduleTimerTask(void *tPtr, UInt32);
- #pragma parameter Fab_CancelTimerTask(__A0)
- asm void Fab_CancelTimerTask(void *tPtr);
- #endif
-
-
- /*** Old calls that use the darned Time Manager ***/
-
- // don't call these at interrupt time!
- void *FabOld_CreateTimerTask(void (*theProc)(void *), void *param);
- void FabOld_DestroyTimerTask(void *theTaskPtr);
-
- // you may call these at interrupt time
- void FabOld_ScheduleTimerTask(void *theTaskPtr, long millisecs);
- void FabOld_CancelTimerTask(void *theTaskPtr);
-
- // call this at idle time -- of course not at interrupt time!
- void CheckCallQueue(void);
-
- #pragma internal reset
-
-