DulIntInit - Initialise a DulIntType variable for this action.

Function

Initialise a DulIntType variable for this action.

Description

A variable of type DulIntType is initialised to refer to this action. You can then pass this variable (which is a pointer type) to an interrupt service routine where you can use it with a call to DulIntSignal() to signal this action. (DulIntISR is a wrap up of DulIntSignal() proving a complete implementation of a simpile ISR which takes a single parameter).

This DulIntType variable can be used with multiple interrupt events, but you must call DulIntTidy() when you are finished with it otherwise you will have a memory leak. Normally, you would call DulIntTidy() before action completion although as long as the action which calls this routine is not spawnable, you can use the variable across invocations of the action.

In addition, the DulIntSignal() call can be invoked anywhere it is necessary to signal the action which invoked DulIntInit().

This function mallocs a structure. It stores in the structure the task id fetched by DitsGetTaskId(), the action index returned by DitsGetActIndex() and the clientData item supplied by the user.

Language

C

Call

(Void) = DulIntInit (clientData,v,status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>clientDatavoid *An item to be associated with the DulIntType variable, it can be fetched using DulIntGetData().
<vDulIntType *The variable to be initialised.
!statusStatusType *Modified status.

Include files

Dul.h

Prior Requirements

Should only be called from within a DRAMA action handler.

See Also

Dul library document, Dits specification, DulIntGetData(3), DulIntSignal(3), DulIntTidy(3), DulIntISR(3), DulIntGetArgument(3), DitsGetTaskId(3), DitsSignal(3), DitsGetActIndex(3).

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au