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_dispatch_eventsDispatch events for a list.
e_register_funcRegister a function to be called periodically.
e_unregister_funcUnregister an event function.
e_unix_create_listCreate a periodic event management list under Unix.
e_unix_dispatch_eventsDispatch events for Unix.

Prototype Functions

e_PROTO_event_funcEvent callback.

Tables

e_DISPATCH_LEVELSList of dispatch levels


Functions


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

Dispatch events for a list.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


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


void e_unregister_func (KPeriodicEventFunc func)

Unregister an event function.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


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

Create a periodic event management list under Unix.

Parameters:

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


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

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