[Previous]

[Contents]

[Next]


evt_locate_channel()

Locate an event channel.

Synopsis:

#include <evt.h>
#include <lib_evt.h>
 
int evt_locate_channel( const evt_cnx_t *evtcnx, int id, void **channel_handle )

Description:

Locate an event channel and attach to it for posting events.

The evt_locate_channel function needs the following parameters:

evtcnx

Opaque structure pointer as returned by the initial call to evt_open()

id

Unique identifier for the channel ID. This ID will match the one provided by the function evt_create_channel.

channel_handle

Return an handle which will be used to reference this particular channel in the next call to the functions evt_post_event and/or evt_post_events. If the channel with the given ID is not found, the handle returned is NULL (but evt_locate_channel return 0 as this is not considered as an error).

Returns:

Return 0 is the operation succeeds, or -1 if an error occurred (errno is then set).

Example:

See this simple example.

Errors:

EBADF

Occurs if the handle is invalid or if the channel referenced by the given handle is not opened.

EFAULT

Occurs if a memory exception happened.

See also:

evt_open(), evt_create_channel(), evt_post_event()


[Previous]

[Contents]

[Next]