paul_c wrote: > On Sunday 10 August 2008, Sebastian Kuzminsky wrote: >> It looks like rtai has semaphores but doesnt support blocking in the >> kernel (no run queues). Maybe something like spinlocks could be built >> around the non-blocking semaphore calls. > > You want one of the rt_spinlock calls defined in rtai_hal.h > >> Any comments on this? Anyone know RTAI? > > Probably rt_spin_lock_irq() and rt_spin_unlock_irq() would satisfy your needs > without incurring and undue overhead - With the proviso that the EPP access > cycle is kept to a minimum.
Thanks for the pointer Paul! The _irq versions of those functions call cli and sti to globally disable interrupts inside the lock, which would of course prevent preemption and thus allow multithreaded access to the EPP bus. I've been avoiding cli/sti in my vanilla (non-realtime) linux code for years (instead favoring smaller-scale software locks), but it looks like there's no good alternative in the realtime kernel. -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, "Who's afraid of Wolf 359" <http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm> ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users