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.

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

tm_evevery Sends events to the calling task at periodic intervals.<br />

#include <br />

unsigned long tm_evevery(<br />

unsigned long ticks, /* delay */<br />

unsigned long events, /* event list */<br />

unsigned long *tmid /* timer identifier */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

This system call is similar to tm_evafter() except that the armed timer expires<br />

periodically instead of once. Events are generated at the specified interval until the<br />

timer is cancelled with tm_cancel().<br />

The tm_evevery() call provides a drift-free mechanism for performing an<br />

operation at periodic intervals. Like tm_evafter(), the interval is specified in<br />

system clock ticks.<br />

ticks Specifies the periodic interval in system clock ticks.<br />

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

interval. The events are encoded into a long word with bits<br />

31-16 reserved for system use and bits 15 - 0 available for<br />

application use.<br />

tmid Points to the variable where tm_evevery() stores a timer<br />

identifier, which can be used if the armed timer must be<br />

cancelled.<br />

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

1-168 <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!