udi_timer_start(3udi)


Start a callback timer

SYNOPSIS

#include <udi.h>

void udi_timer_start (

	udi_timer_expired_call_t *callback,

	udi_cb_t *gcb,

	udi_time_t interval );
 
typedef void udi_timer_expired_call_t (

	udi_cb_t *gcb );
 

ARGUMENTS callback, gcb are standard arguments described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

interval is the desired minimum interval that should elapse between the time the event is initiated with udi_timer_start and the time callback is called. The actual interval will depend on system activity, platform implementation (e.g. clock interrupt interval), timer resolution (min_timer_res), and the availability of processor resources. Under normal system activity the actual interval will be at least as long as the specified interval and not usually more than interval plus min_timer_res.

DESCRIPTION udi_timer_start schedules a delayed callback according to the parameters specified. The callback routine will be called at some time in the future, as specified by interval.

As with other control block operations, the ownership of the control block passes from the driver to the environment until such time as the callback is invoked and the control block is passed back. Re-using the specified control block for this or any other request before it has been returned to the driver via the callback routine is illegal. This may require the driver to obtain another control block by calling udi_cb_alloc in order to be able to dedicate it to this purpose.

A udi_timer_start request may be cancelled at any time by calling the udi_timer_cancel routine with the original control block pointer.

WARNINGS Control block usage must follow the rules described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

REFERENCES udi_time_t, udi_limits_t, udi_cb_alloc, udi_timer_cancel


UDI Core Specification Contents