21.01.2015 Views

INtime® 3.1 Software - tenAsys

INtime® 3.1 Software - tenAsys

INtime® 3.1 Software - tenAsys

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2: Understanding INtime software architecture<br />

In addition to the usual thread activities, an interrupt thread can also:<br />

• Cancel the assignment of an interrupt handler to an interrupt level.<br />

• Wait for an interrupt to occur.<br />

• Enable and disable interrupts.<br />

This shows how an interrupt thread enters an event loop where it waits to service an<br />

interrupt:<br />

Figure 2-5. Thread execution model<br />

Interrupt<br />

<br />

<br />

<br />

Upon creation, the interrupt thread uses an RT system call to set up an RT interrupt and associate<br />

itself with this interrupt. Normally, it then waits for a signal that indicates an interrupt occured.<br />

When signaled, the interrupt thread executes the required operations.<br />

The interrupt thread releases control by waiting for the next signal from the interrupt handler,<br />

which restarts the cycle shown in this figure.<br />

Managing time<br />

INtime software enables threads to:<br />

• Create alarm events that wake up the current thread at a regular interval.<br />

• Start and stop scheduling by the RT kernel.<br />

27

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

Saved successfully!

Ooh no, something went wrong!