[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A commodity can use a sender CxObject to find out if a CxMessage has
"visited" a CxObject, but this method unnecessarily uses system resources.
A commodity that is only interested in knowing if such a visitation took
place does not need to see a corresponding input event or a CxMessage ID.
Instead, Commodities Exchange has a CxObject that uses an Exec signal.

    signalCxObj = CxObj  *CxSignal(struct Task *, LONG cx_signal);

CxSignal() sets up a signal CxObject.  When a signal CxObject receives a
CxMessage, it signals a task.  The commodity is responsible for
determining the proper task ID and allocating the signal.  Normally, a
commodity wants to be signalled so it uses FindTask(NULL) to find it's own
task address.  Note that cx_signal from the above prototype is the signal
number as returned by AllocSignal(), not the signal mask made from that
number.  For more information on signals, see the "Exec Signals" chapter.

The example Divert.c (shown a little later in this chapter) uses a signal
CxObject.


[Back to Amiga Developer Docs]