Hi Michael,
On 2012-06-07 Michael Davidsaver wrote:
>
> For the implementation of thread pool I would like to allow it to be
> used from interrupt context on RTEMS/vxworks. So it should need to use
> epicsInterruptLock(). I want to avoid using a global lock on
> Linux/Windows/etc.
>
> Now I could implement this internally for the thread pool only, but I
> thought I would float the possibility of creating a proper spin lock
> API. Initially RTEMS/vxworks would implement this using epicsInterrupt
> and the default implement would use epicsMutex.
Have you looked at the epicsAtomicLock() and epicsAtomicUnlock() routines that
Jeff uses in some of his epicsAtomic implementations? You might have to write
RTEMS-specific versions, but they do seem to be implementing the functionality
you're after; on vxWorks they use intLock(). This would mean promoting these
routines to an official API (and possibly moving or renaming them), but I
wouldn't have a problem with that.
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- Replies:
- Re: "spinlock" API Michael Davidsaver
- References:
- "spinlock" API Michael Davidsaver
- Navigate by Date:
- Prev:
Re: epicsTimer and rounding Andrew Johnson
- Next:
Re: "spinlock" API Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
"spinlock" API Michael Davidsaver
- Next:
Re: "spinlock" API Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|