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 to set up an interrupt handler for your inter-
rupt, and translate this into an exec signal that will be sent to your
task. This allows you to ignore all the complexities of writing inter-
rupt code.
You specify the jintnum to use as the interrupt number and the sig-
nal number (signum) to be sent to 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 to get interrupts, the call can set up a
parameter area. It will allocate paramsize bytes of type paramtype,
and set up the parameter area to point to 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 to a
SetupSig structure is returned. This structure is defined in setup-
CleanupJanusSig( setsupSig)
AO
This routine undoes everything that SetupJanusSig does.
JanusLock( ptr )
AO
Gain a janus lock (e.g. a lock on a memory list). You must not keep
this lock for a long time — keep it just long enough to manipulate
the data structure associated with the lock, and don't go to sleep.
JanusUnLock( ptr)
AO
Release a janus lock.
JBCopy( source, designation, length )
AO
Al
DO
Copy arbitrary aligned memory as efficiently as possible with the
processor.
134