Defines | |
| #define | WUT_CLK_WUT ((struct _WUT *)(0)) |
| Internal WUT clock. | |
| #define | WUT_CLK_CPU ((struct _WUT *)(1)) |
| CPU clock. | |
| #define | WUT_CLK_WALL ((struct _WUT *)(2)) |
| Wall clock. | |
Typedefs | |
| typedef _WUT | WUT |
| Typedef for struct _WUT. | |
| typedef long long | WUT_time |
| Defines the internal time representation. More... | |
| typedef enum _WUT_state | WUT_state |
| Typedef for enum _WUT_state. | |
| typedef enum _WUT_cb_status | WUT_cb_status |
| Typedef for enum _WUT_cb_status. | |
| typedef void * | WUT_cb_parameter |
| The callback parameter type. | |
| typedef WUT_cb_status(* | WUT_cb_routine )(WUT_cb_parameter *prm, WUT *wut) |
| Define the callback routine signature. More... | |
Enumerations | |
| enum | _WUT_state { WUT_K_FREE = -2, WUT_K_ACTIVE = -1, WUT_K_QUEUED = 0, WUT_K_ALLOCATED = 1, WUT_K_CANCELLED = 2, WUT_K_EXPIRED = 3 } |
| Enumerate the possible states of a WakeUp Timer entry. More... | |
| enum | _WUT_cb_status { WUT_K_STATE_CHANGE_NO = 0, WUT_K_STATE_CHANGE_YES = 1 } |
| Enumerates the various values of a WUT callable service routine. More... | |
Functions | |
| int | WUT_init (int count) |
| One time WUT services initialization routine. | |
| int | WUT_connect (int hertz) |
| One time WUT service connection routine. | |
| WUT_state | WUT_cancel (WUT *wut) |
| Cancels a WUT timer entry. | |
| WUT * | WUT_create (void) |
| Allocate a WUT timer entry. | |
| WUT_state | WUT_destroy (WUT *wut) |
| Destroys, ie frees, an unused WUT timer entry. | |
| WUT_state | WUT_restart (WUT *wut, int delay, const WUT *rel) |
| Restarts a WUT timer entry. | |
| WUT_state | WUT_start (WUT *wut, int delay, const WUT *rel, WUT_cb_routine cb, WUT_cb_parameter prm) |
| Convenience routine to start a WUT timer entry. | |
| WUT_state | WUT_state_get (const WUT *wut) |
| Gets the current state of the WUT timer entry. | |
| WUT_time | WUT_time_get (void) |
| Gets the current internal value the WUT time. | |
| int | WUT_dec_get (void) |
| Gets the current time left till the next timer expiration. | |
| int | WUT_dec_rate_get (void) |
| Gets frequency, in Hertz of the WUT clock. | |
|
|
Define the callback routine signature.
The callback signature of a WUT interupt servicing routine is
WUT_cb_status = (*WUT_cb_routine) (WUT_cb_parameter *prm,
WUT *wut);
where:
prm: Is a parameter established when creating the timer entry and
passed transparently back.
wut: The WUT control block for this timer entry.
The return value should be
WUT_K_STATE_CHANGE_NO - if the state of the WUT handle did not change
WUT_K_STATE_CHANGE_YES - if the state of the WUT handle did change
The state of the WUT handle will change if the user successfully performs
any of the calls in the callback routine.
WUT_cancel
WUT_start
WUT_restart
WUT_destroy
If the state is not changed by the user, it is marked as WUT_K_EXPIRED
by the WUT_service.
|
|
|
Defines the internal time representation.
The user of the WUT facility generally does not directly manipulate the time. However, the internal time representation is occassionally passed back to the user from a WUT routine. Later, he may pass this value back to another WUT routine. For this reason, the user must know its storage size, but not much else about it. |
|
|
Enumerates the various values of a WUT callable service routine.
The WUT Interrupt Service Routine is obligated to pass back one of two values. Either WUT_K_STATE_CHANGE_NO, indicating that the user has not changed the state of the WUT control structure, or WUT_K_STATE_CHANGE_YES, indicating he has, for example by calling WUT_restart() or WUT_destroy(). |
|
|
Enumerate the possible states of a WakeUp Timer entry.
The ownership of a timer handle is divided into two pieces. When the value of the state is >= WUT_K_ALLOCATED, the user has ownership of the WUT handle. When the user has ownership of the WUT handle, it's state will not change except by user request. The user is allowed to request state changes, for example, by WUT_cancel, but there is no guarantee that these state changes will be granted. When the value of the state is < WUT_K_ALLOCATED, the WUT services have ownership of the WUT handle. When the WUT services have ownership, the state may spontaneously change due to WUT activity. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001