06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ev_receive pSOS+ <strong>System</strong> <strong>Calls</strong><br />

Return Value<br />

Error Codes<br />

Notes<br />

EV_NOWAIT /<br />

EV_WAIT<br />

EV_ANY /<br />

EV_ALL<br />

Return if the event condition is unsatisfied /<br />

block until the event condition is satisfied.<br />

Selecting EV_NOWAIT is a convenient way to reset<br />

all or selected pending events. For example, an<br />

ev_receive() for events 1 and 2<br />

unconditionally resets events 1 and 2.<br />

Wait for ANY / ALL of the desired events.<br />

A successful return with EV_ANY signifies that at<br />

least one specified event was captured. A<br />

successful return with the EV_ALL attribute<br />

signifies that all specified events have been<br />

captured.<br />

timeout If EV_WAIT is set, the timeout parameter specifies the timeout in<br />

units of clock ticks. If the value of timeout is 0, ev_receive()<br />

waits indefinitely.<br />

If EV_NOWAIT is set, the timeout argument is ignored.<br />

events_r Points to the variable where ev_receive() stores the actual events<br />

captured.<br />

This system call returns 0 on success, or an error code on failure.<br />

Hex Mnemonic Description<br />

0x01 ERR_TIMEOUT Timed out; this error code is returned<br />

only if EV_WAIT was used and the<br />

timeout argument was nonzero.<br />

0x3C ERR_NOEVS Selected events not pending; this code<br />

is returned only if the EV_NOWAIT<br />

attribute was selected.<br />

1. Events are not accumulated. No matter how many identical events are sent to<br />

the calling task before it calls ev_receive() for receiving the event, the result<br />

is the same as if one event were pending.<br />

1-28 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!