home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d168 / dillonstuff.lha / doc / dres / qints.doc < prev    next >
Text File  |  1988-11-22  |  3KB  |  84 lines

  1.  
  2.                  QINTS.DOC
  3.  
  4.     I call them Q-Interrupts to tell them apart from other types of
  5. interrupts that exist on the Amiga.  QInts provide a general purpose
  6. priority enhanced local task-interrupt system based on exceptions.
  7.  
  8.     Essentially, one can associate a Q interrupt with any set of EXEC
  9. signals.  When an associated signal comes in, a Q interrupt occurs.  The
  10. interrupt is taken immediately if the current task Q-priority is lower
  11. than the Q-priority of the interrupt, else it is queued until the
  12. priority becomes lower.
  13.  
  14.     When a Q-interrupt is taken, the task's Q-priority is raised to that
  15. of the Q-interrupt while the interrupt is being processed.  Additionaly,
  16. the application software may set the task's Q-priority at any time,
  17. usually to prevent interrupts from occuring in critical sections.
  18.  
  19. OpenQInts                            OpenQInts
  20.  
  21.     handle = OpenQInts()
  22.     long handle;
  23.  
  24.     This routine initializes a handle for the Q interrupt system.  All
  25.     32 EXEC signals may be controlled through this one handle.    NULL is
  26.     returned on error, else a non-zero handle is returned.
  27.  
  28. CloseQInts                            CloseQInts
  29.  
  30.     (void) = CloseQInts(handle)
  31.     long handle;
  32.  
  33.     This routine shuts down the handle, including the removal of any
  34.     active Q Interrupt vectors.
  35.  
  36. SetQPri                             SetQPri
  37.  
  38.     (void) = SetQPri(handle, pri)
  39.     long handle;
  40.     long pri;
  41.  
  42.     This routine sets the current Q-interrupt priority for the task...
  43.     actually all interrupts associated with the handle but this is
  44.     usually all the interrupts period.
  45.  
  46.     Any Q-interrupts with higher priority can occur, while interrupts
  47.     with lower or equal priority will be queued until you SetQPri() to
  48.     a lower value.
  49.  
  50.     'pri' has a range -127 to 127
  51.  
  52. SetQVector                            SetQVector
  53.  
  54.     oldvec = SetQvector(handle, vector, signo, arg, pri)
  55.     void (*oldvec)();
  56.     void (*vector)();
  57.     long handle;
  58.     long signo;
  59.     long arg;
  60.     long pri;
  61.  
  62.     This routine applied or removes or changes the priority of a
  63.     Q interrupt.  If vector is NULL, the interrupt is removed for the
  64.     specified signo.  If vector is not NULL the interrupt is set for
  65.     the specified signo, replacing any previous interrupt vector and
  66.     priority that existed.
  67.  
  68.     The interrupt has a priority of 'pri', (-127 to 127).
  69.  
  70.     The vector may be a C routine.  The OpenQInts() routine saved A4/A5
  71.     and these registers are automatically re-loaded before the vector
  72.     is called to support the small-data model.    Additionaly, D2 and D3
  73.     Parameters are also scratch to support Aztec C.  Both Aztec and Lattice
  74.     C are thus supported.  Parameters to the service routine are passed on
  75.     the stack:
  76.  
  77.     (*vector)(arg)
  78.  
  79.     Specifically, the argument you gave SetQVector().
  80.  
  81.     NOTE:   SetQVector() may be called from a Q-interrupt.
  82.  
  83.  
  84.