Event Sets


Typedefs

typedef ix_evs_s ix_evs_t
 handle of event set structure

Functions

ix_evs_tix_evs_new ()
int ix_evs_free (ix_evs_t *pevs)
int ix_evs_wait (ix_evs_t *mask, ix_evs_t *result, int msec)
ix_event_tix_evs_add (ix_evs_t *pevs, ix_event_t *pev)
int ix_evs_isset (ix_evs_t *pevs, ix_event_t *pev)
ix_event_tix_evs_rem (ix_evs_t *pevs, ix_event_t *pev)
ix_event_tix_evs_pop (ix_evs_t *pevs)
int ix_evs_clear (ix_evs_t *pevs)

Detailed Description

This module describes the methods to create and handle sets of ix-events. The core function of event handling is ix_evs_wait(), which is to wait for at least one event in an event-set.

Create empty event sets with ix_evs_new(), add an event with ix_evs_add(), wait for events in eventset and check which are set with the various check or event pop methods.

See Events for more information dealing with events.


Function Documentation

ix_event_t* ix_evs_add ( ix_evs_t pevs,
ix_event_t pev 
)

adds an event to event-set

Parameters:
pevs handle of event-set
pev handle of event to add
Returns:
  • event which was add
  • NULL: error

int ix_evs_clear ( ix_evs_t pevs  ) 

clears the set

Parameters:
pevs handle of event-set
Returns:
  • 0: OK
  • <0: Error

int ix_evs_free ( ix_evs_t pevs  ) 

destructor, release memory of event-set but not of the events in the set

Parameters:
pevs handle of event-set
Returns:
  • 0: OK
  • !0: error

int ix_evs_isset ( ix_evs_t pevs,
ix_event_t pev 
) [inline]

checks if event is in event-set

Parameters:
pevs handle of event-set
pev event to check
Returns:
  • 1: event in event-set
  • 0: event not in event-set

ix_evs_t* ix_evs_new (  ) 

constructor, allocates a new event-set

Returns:
  • handle to event-set
  • NULL: error

ix_event_t* ix_evs_pop ( ix_evs_t pevs  ) 

pops an event out of event-set

Parameters:
pevs handle of event-set
Returns:
  • popped event
  • NULL: event-set is empty

ix_event_t* ix_evs_rem ( ix_evs_t pevs,
ix_event_t pev 
)

removes event from event-set

Parameters:
pevs handle of event-set
pev event to remove from set
Returns:
  • removed event
  • NULL: event not in set

int ix_evs_wait ( ix_evs_t mask,
ix_evs_t result,
int  msec 
)

waits for events in mask to be set, the events which are set are added to result, times out after msec millisecs

Parameters:
mask event-set of event we wait for
result result event-set
msec timeout in milli-seconds
Returns:
  • 0: timeout
  • >0: number of events in result
  • <0: error


Generated on 4 Mar 2014 for ixtools by  doxygen 1.4.7