udi_timer_cancel(3udi)


Cancel a pending timer

SYNOPSIS

#include <udi.h>

void udi_timer_cancel (

	udi_cb_t *gcb );
 

ARGUMENTS gcb is a pointer to a control block that was passed to a prior udi_timer_start or udi_timer_start_repeating service call.

DESCRIPTION Any timer service request with a pending callback can be canceled by this call. The control block must be the same one specified when the service was requested, and must be active (i.e. the callback has not yet been called).

Once udi_timer_cancel has returned, the original callback routine is guaranteed not to be called. Ownership of the control block is transferred back to the requestor, and the control block is available for reuse.

WARNINGS udi_timer_cancel must be called from the region that owned the control block at the time of the original request. It cannot be used to cancel a pending request in another region.

A driver must keep track of its in-progress requests to avoid canceling a different request than intended. A good rule of thumb is that udi_timer_cancel must not be used to cancel a request without first checking to see if the corresponding callback has been called.

If a driver issues a udi_timer_cancel for a control block that is not active the driver is in error. See the "Driver Faults/Recovery" section of "Execution Model" for an explanation of how the environment may react to this driver error.

REFERENCES udi_timer_start, udi_timer_start_repeating, udi_cancel


UDI Core Specification Contents