Subject: |
Re: [Merge] lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base |
From: |
mdavidsaver <[email protected]> |
To: |
Jeff Hill <[email protected]> |
Date: |
Thu, 18 Aug 2011 16:04:22 -0000 |
I like that compare+swap and void* operations are now implemented.
1) How about add and subtract? For instructions sets which don't
support this directly it can be implemented in terms of compare+swap.*
So operations would be: Get, Set, Inc., Dec., Add, Subtract, and
Compare+Swap. This is 7 functions.
For three types: unsigned int, size_t, and void*. So a total of 21
functions.
2) I would suggest not making the locked functions part of the public
API. I don't see one piece of code needing to use both
epicsLockedIncrSizeT and epicsAtomicIncrSizeT. Perhaps instead have a
macro to force a fallback to the default implementation?
3) As a thought, how about signed instead of unsigned integers? This
would differentiate 'int' from 'size_t' operations even on 32-bit machines.
* http://lists.debian.org/debian-68k/2008/09/msg00064.html
From OpenJDK. An implementation of atomic add for m68k (works on >= 68020)
http://68k.hax.com/CAS
--
https://code.launchpad.net/~epics-core/epics-base/epicsR3.15-atomics/+merge/70642
Your team EPICS Core Developers is requested to review the proposed merge of lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base.
- References:
- Re: [Merge] lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base Jeff Hill
- Navigate by Date:
- Prev:
Re: [Merge] lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base mdavidsaver
- Next:
Re: [Merge] lp:~anj/epics-base/epicsEvent-api into lp:epics-base Andrew Johnson
- 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:
Re: [Merge] lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base Jeff Hill
- Next:
Re: [Merge] lp:~epics-core/epics-base/epicsR3.15-atomics into lp:epics-base Jeff Hill
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|