[EMAIL PROTECTED] wrote:
> Hi, 
> 
> Looking at the xenomai documentation, I saw that the rtdm_lock_get function
> can be used in an interrupt service routine. 
> This function seems to be base on spinlocks but in my mind, spinlock under
> linux on the single CPU doesn't do anything (am I right?). Then I don't
> really understand, how the lock mechanism works when there is a race
> condition between the rtdm_lock_get in ISR and the rtdm_lock_get_irqsave
> function used in an ioctl. Would it be possible to explain me briefly what
> is doing rtdm_lock_get on the lock parameter in a single CPU context?

On UP, rtdm_lock_get/put are void (that's in contrast to Linux where
spin_lock also disables local preemption so that you can call it from
interruptible contexts without risking deadlocks).

> 
> Complementary question:
> does rtdm_lock_get_irqsave disables all interrupts?

Yes, it does (for the local CPU, of course).

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to