EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: "spinlock" API
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Mon, 11 Jun 2012 16:16:19 -0500
Hi Michael,

On 2012-06-11 Michael Davidsaver wrote:
> A better thing to do might be
> 
> #if defined(vxWorks) || defined(__rtems__)
> typedef void* epicsSpinId
> #else
> typedef epicsMutexID* epicsSpinId
> #endif

Can we design the default implementation to use atomic variables instead of 
mutexes, unless there really is no alternative?  On a workstation OS the act 
of taking or releasing a mutex always requires a context switch, whereas an 
atomic operation does not.  Spin-lock operations are supposed to be lighter 
than a mutex ones on SMP, and that aspect of your suggestion is bothering me.

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

Replies:
Re: "spinlock" API Michael Davidsaver
References:
"spinlock" API Michael Davidsaver
Re: "spinlock" API Andrew Johnson
Re: "spinlock" API Michael Davidsaver

Navigate by Date:
Prev: Re: "spinlock" API Michael Davidsaver
Next: Re: "spinlock" API Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: "spinlock" API Michael Davidsaver
Next: Re: "spinlock" API Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 26 Nov 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·