Skip to contentSkip to conversation

rtdm_lock_get

Xenomai Gilles Chanteperdrix 2 participants 2 messages Sep 19, 2015 – Sep 22, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

now that rtdm_lock_get() locks the scheduler, and if moved the scheduler lock before the spin_lock, would not it be possible to use rtdm_lock_get() with irqs on ?

Regard.

Signature · 2 lines
					    Gilles.
https://click-hack.org
#1 lore raw
Quoted 5 lines · Gilles Chanteperdrix

Hi,

now that rtdm_lock_get() locks the scheduler, and if moved the scheduler lock before the spin_lock, would not it be possible to use rtdm_lock_get() with irqs on ?

Conceptually, yes. People will only have to be more carefully to use the right mechanism depending on if there are IRQ-based users or not - just like under Linux. We avoided this trap so far.

Maybe we should ask the user to mark IRQ-free spinlocks via a special rtdm_lock_init_noirq. Then we could validate the caller's context in a debug version.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux