Page 1 of 1

chSysLockFromIsr();

Posted: Wed May 21, 2014 6:13 pm
by daniellpu9
What does chSysLockFromIsr(); exactly Does ??? I have had that question since im using CHibiOS.
And why do i have to use I functions when i use chSysLockFromIsr();?

Thanks!

Re: chSysLockFromIsr();

Posted: Wed May 21, 2014 7:46 pm
by Giovanni
Hi,

That function starts a critical zone within an ISR. On those architectures where ISRs can be preempted by higher priority IRQs that function prevents preemption until chSysUnlockFromIsr() is called.

Both functions are used in order to call I-class functions (those whose name is terminated by an "I") that are meant to be called from within a critical zone.

Details are in the "kernel concepts" section of the documentation, see system states.

Giovanni