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.

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

Return Value<br />

Error Codes<br />

Notes<br />

ticks An optional count that begins after the last second of time has<br />

elapsed. This parameter provides a finer resolution of time, if<br />

needed.<br />

events Specifies the events to deliver upon expiration of the timer. The<br />

events are encoded into a long word with bits 31-16 reserved for<br />

system use and bits 15 - 0 available for application use.<br />

tmid Points to the variable where tm_evwhen() stores a timer identifier,<br />

which can be used if the armed timer must be cancelled.<br />

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

Hex Mnemonic Description<br />

0x47 ERR_NOTIME <strong>System</strong> time and date are not yet set.<br />

0x48 ERR_ILLDATE Date input is out of range.<br />

0x49 ERR_ILLTIME Time of day input is out of range.<br />

0x4A ERR_ILLTICKS Ticks input out of range.<br />

0x4B ERR_NOTIMERS Exceeds maximum number of<br />

configured timers.<br />

0x4E ERR_TOOLATE Too late: input date and time are<br />

already past.<br />

1. A timer is counted down by successive tm_tick() calls. If no clock or timer is<br />

provided, a timer does not expire.<br />

2. A timer established by tm_evwhen() is affected by a tm_set() call if that call<br />

changes the date and time. If a tm_set() advances the time past a scheduled<br />

alarm, it triggers the ev_send() immediately. To detect this situation, the<br />

application can check the time when it awakens and compare it with the<br />

expected time.<br />

3. A task must explicitly call ev_receive() to receive a timer-triggered event<br />

(which is like any event in every other way).<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-171<br />

1

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

Saved successfully!

Ooh no, something went wrong!