06.11.2014 Views

SYSTEM eCos – Embedded Configurable Operating System - MARS

SYSTEM eCos – Embedded Configurable Operating System - MARS

SYSTEM eCos – Embedded Configurable Operating System - MARS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>SYSTEM</strong>Y CZASU RZECZYWISTEGO<br />

<strong>SYSTEM</strong> <strong>eCos</strong> <strong>–</strong> <strong>Embedded</strong> <strong>Configurable</strong> <strong>Operating</strong> <strong>System</strong><br />

Piotr MALECKI<br />

INTERRUPT HANDLING (cont.):<br />

Somehow similar problem <strong>–</strong> to the question of interrupts being enabled or disabled -<br />

is the problem of the kernel scheduler lock.<br />

Scheduler may be locked in response to function like:<br />

cyg_mutex_lock<br />

cyg_semaphore_post<br />

which may be issued by the kernel for time of manipulation with some data structures<br />

after which the lock is released.<br />

Locking the scheduler may cause pending some DSRs and some chain of synchronization events<br />

influencing waking up of threads of various priorities.<br />

... various possible scenarios ...<br />

in which one can illustrate that the two-level approach to interrupt handling realised by <strong>eCos</strong><br />

allows fo safe solutions ( .. e.g. it is safer to leave cyg_semaphore_post to a DSR rather than<br />

to ISR which disabling interrupts may cause corruption of kernel data structure or even loss<br />

of some thread that would never run again).<br />

9/14

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

Saved successfully!

Ooh no, something went wrong!