chSysLockFromIsr();

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
daniellpu9
Posts: 5
Joined: Tue Apr 29, 2014 2:49 pm

chSysLockFromIsr();

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: chSysLockFromIsr();

Post 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
Post Reply