The "e" Package

These routines are meant to provide a flexible, portable means to generate periodic events. NOTE: THIS PACKAGE IS WORK IN PROGRESS. THE INTERFACE MAY CHANGE IN THE NEXT RELEASE, POSSIBLY WITHOUT NOTICE.

Library: karma
Link With: -lkarma

Functions

e_test_supportedTest if application supports scheduled events.
e_create_listCreate a periodic event management list.
e_dispatch_eventsDispatch events for a list.
e_register_funcRegister a function to be called periodically.
e_unregister_funcUnregister an event function.
e_unix_initInitialise periodic event management support under Unix.
e_unix_dispatch_eventsDispatch events for Unix.

Prototype Functions

e_PROTO_event_funcEvent callback.

Tables

e_DISPATCH_LEVELSList of dispatch levels


Functions


EXPERIMENTAL FUNCTION: subject to change without notice

flag e_test_supported ()

This routine will determine if scheduled events have been supported by the application.

Parameters:

Returns: TRUE if scheduled events are supported, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KPeriodicEventList e_create_list (unsigned long interval_us, unsigned long interval_s, void *list_info)

Create a periodic event management list.

Parameters:

Returns: A KPeriodicEventList on success, else the process aborts.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void e_dispatch_events (KPeriodicEventList list, unsigned int dispatch_level, flag timeout)

Dispatch events for a list.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KPeriodicEventFunc e_register_func (KPeriodicEventList list, flag (*func) (), void *info, unsigned long interval, unsigned int dispatch_level)

Register a function to be called periodically.

Parameters:

Returns: A KPeriodicEventFunc on success, else the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void e_unregister_func (KPeriodicEventFunc func)

Unregister an event function.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void e_unix_init ()

Initialise periodic event management support under Unix.

Parameters:

Returns: Nothing on success, else the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void e_unix_dispatch_events (unsigned int dispatch_level)

Dispatch events for Unix.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


Prototype Functions


flag e_PROTO_event_func (KPeriodicEventFunc func, void *f_info, void *l_info)

This routine is called when a periodic event occurs.

Parameters:

Returns: TRUE if the event function should be called again, else FALSE.
Multithreading Level: Unsafe


Tables


e_DISPATCH_LEVELS List of dispatch levels

Dispatch level Meaning
DISPATCH_SYNCHRONOUS Dispatch synchronously with the application main thread
DISPATCH_ASYNCHRONOUS Dispatch asynchronously (like a Unix signal handler). Use with caution, as race conditions may result


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services