Skip to main content

Name

event_read — Read an event

Synopsis

#include "event.h"

| int **event_read** ( | e, |   | |   | buf, |   | |   | buflen, |   | |   | needmask); |   |

Event * <var class="pdparam">e</var>; char * <var class="pdparam">buf</var>; int <var class="pdparam">buflen</var>; int * <var class="pdparam">needmask</var>;

Description

Initiates a read that will populate buf and buflen with the data requested.

Parameters

e
buf

The buffer for storage.

buflen

The length of buf.

needmask

The mask required for scheduling. It can be one of the following values:

#define E_READ         0x00000001
#define E_WRITE        0x00000002
#define E_EXCEPTION    0x00000004
#define E_TIMEOUT      0x00000008
#define E_ASYNC        0x00000010

Return Value

This function returns the number of characters read.

Threading

Warning

Only call this function from the Scheduler thread.

See Also

Was this page helpful?