Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Johnson
24e2452bd4 libCom/test: epicsAtomic tests
Added C++ template instances, so this code loads on
a vxWorks 5.5.2 system.
2012-06-07 13:38:11 -05:00
unknown
f0afcef02e o changed to more generic implementation to reduce the code size
o changed name, OSD_ATOMIC_INLINE to EPICS_ATOMIC_INLINE
o changed supported data types, unsigned removed and int added (per reveiw at codeathon)
o added add/subtract functions (per reveiw at codeathon)
o now presuming that __sync_synchronize available all gcc 4  mingw does not provide windows mem barrier)
o consolodated on one implemention for Microsoft invarient of cmplr intrinisic or win32 by using macros to config a shared header file
o improved doc in epicsAtomic.h
o added overloaded c++ interface in namespace epics :: atomic to epicsAtomic.h
o added epicsAtomicReadMemoryBarrier and epicsAtomicWriteMemoryBarrier interface to epicsAtomic.h
o changed the implementation so that each of the functions can be individually specified for a particular compiler, os, or in the generic implementation (this is accomplished with macros)
o modified the functional and performance test so that they are based on templates so we can easily support new data types
o modified performance tests to repeat function calls and measure performance using a template
2011-08-29 19:02:41 -06:00
Jeff Hill
bd1b1479f4 o no longer need to define OSD_ATOMIC_GCC
o removed function
epicsAtomicTestAndSetUIntT
o added new functions
epicsAtomicSetPtrT
epicsAtomicGetPtrT
epicsAtomicCmpAndSwapUIntT
epicsAtomicCmpAndSwapPtrT
o changed msvc intrinsics to define memory fence
o fixed mutex synchronized version so that its slow, but correct if the c++ compiler doesnt synchronized local scope static initialization
o changed most of the set/get methods to use memory barriers instead of some other primitive
o added additional tests
2011-08-15 17:00:01 -06:00
Jeff Hill
9e60e923e7 redo change reversed by merge 2011-08-08 18:38:39 -06:00
Jeff Hill
092e161485 o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris to test)
o fixed darwin compile errors (I dont have access to darwin)
2011-08-08 17:54:43 -06:00
Jeff Hill
747a59fd7f o added epicsAtomic implementation including compiler and os specific files
o added functionality and performance testing
2011-08-05 09:13:38 -06:00