Download Print this page

Commodore Amiga A500 Technical Reference Manual page 140

Hide thumbs Also See for Amiga A500:

Advertisement

This routine does the "standard" things that most users of the janus
system would want. It is conceivable that most people who use the
janus board will use only this routine and CleanupJanusSig(
).
The main purpose is t o set up an interrupt handler for your inter-
rupt, and translate this into an exec signal that will be sent t o your
task. This allows you t o ignore all the complexities of writing inter-
rupt code.
You specify the jintnum t o use as the interrupt number and the sig-
nal number (signum) to be sent t o you. Jintnum should (for now) be
gotten via the include file services.[hi]. Signum will most often be
gotten via AllocSignal(-l), which allocates an unused signal.
In addition to setting up a way t o get interrupts, the call can set up a
parameter area. It will allocate paramsize bytes of type paramtype,
and set up the parameter area t o point t o them.
There is some error checking done while all this is going on. If sig-
num
is
-1 the call fails (-1
is the error return from AllocSignal
...).
If
there is already an interrupt handler then the call fails. If paramsize
is non-zero and there is already a parameter area the call fails. If it
cannot allocate enough memory the call fails.
The call returns a NULL if it fails. If it succeeds then a pointer t o a
SetupSig structure is returned. This structure is defined in setup-
sig.[hi].
This routine undoes everything that SetupJanusSig does.
JanusLock( ptr
)
A 0
Gain a janus lock (e.g. a lock on a memory list). You must not keep
this lock for a long time
-
keep itjust long enough t o manipulate
the data structure associated with the lock, and don't go t o sleep.
JanusUnLock( ptr
)
A 0
Release a janus lock.
JBCopy( source. designation, length
)
A 0
A l
DO
Copy arbitratily aligned memory as efficiently as possible with the
processor.

Advertisement

loading

This manual is also suitable for:

Amiga a2000