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 >
Wrap
Text File
|
1988-11-22
|
3KB
|
84 lines
QINTS.DOC
I call them Q-Interrupts to tell them apart from other types of
interrupts that exist on the Amiga. QInts provide a general purpose
priority enhanced local task-interrupt system based on exceptions.
Essentially, one can associate a Q interrupt with any set of EXEC
signals. When an associated signal comes in, a Q interrupt occurs. The
interrupt is taken immediately if the current task Q-priority is lower
than the Q-priority of the interrupt, else it is queued until the
priority becomes lower.
When a Q-interrupt is taken, the task's Q-priority is raised to that
of the Q-interrupt while the interrupt is being processed. Additionaly,
the application software may set the task's Q-priority at any time,
usually to prevent interrupts from occuring in critical sections.
OpenQInts OpenQInts
handle = OpenQInts()
long handle;
This routine initializes a handle for the Q interrupt system. All
32 EXEC signals may be controlled through this one handle. NULL is
returned on error, else a non-zero handle is returned.
CloseQInts CloseQInts
(void) = CloseQInts(handle)
long handle;
This routine shuts down the handle, including the removal of any
active Q Interrupt vectors.
SetQPri SetQPri
(void) = SetQPri(handle, pri)
long handle;
long pri;
This routine sets the current Q-interrupt priority for the task...
actually all interrupts associated with the handle but this is
usually all the interrupts period.
Any Q-interrupts with higher priority can occur, while interrupts
with lower or equal priority will be queued until you SetQPri() to
a lower value.
'pri' has a range -127 to 127
SetQVector SetQVector
oldvec = SetQvector(handle, vector, signo, arg, pri)
void (*oldvec)();
void (*vector)();
long handle;
long signo;
long arg;
long pri;
This routine applied or removes or changes the priority of a
Q interrupt. If vector is NULL, the interrupt is removed for the
specified signo. If vector is not NULL the interrupt is set for
the specified signo, replacing any previous interrupt vector and
priority that existed.
The interrupt has a priority of 'pri', (-127 to 127).
The vector may be a C routine. The OpenQInts() routine saved A4/A5
and these registers are automatically re-loaded before the vector
is called to support the small-data model. Additionaly, D2 and D3
Parameters are also scratch to support Aztec C. Both Aztec and Lattice
C are thus supported. Parameters to the service routine are passed on
the stack:
(*vector)(arg)
Specifically, the argument you gave SetQVector().
NOTE: SetQVector() may be called from a Q-interrupt.