From ed6ad62cf780facaf9de6c59198d9bf2102d4645 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 5 Aug 2011 17:11:29 -0600 Subject: [PATCH 1/2] fixed test names --- src/libCom/test/epicsAtomicPerform.cpp | 2 +- src/libCom/test/epicsAtomicTest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libCom/test/epicsAtomicPerform.cpp b/src/libCom/test/epicsAtomicPerform.cpp index 464c20afe..0b47dd900 100644 --- a/src/libCom/test/epicsAtomicPerform.cpp +++ b/src/libCom/test/epicsAtomicPerform.cpp @@ -480,7 +480,7 @@ void epicsAtomicSetPerformance () testDiag ( "epicsAtomicSet() takes %f microseconds", delay ); } -MAIN(osiAtomicTest) +MAIN(epicsAtomicPerform) { testPlan(5); // diff --git a/src/libCom/test/epicsAtomicTest.c b/src/libCom/test/epicsAtomicTest.c index d668936b2..bf5d2cbd2 100644 --- a/src/libCom/test/epicsAtomicTest.c +++ b/src/libCom/test/epicsAtomicTest.c @@ -53,7 +53,7 @@ static void tns ( void *arg ) epicsAtomicIncrSizeT ( & pTestData->m_testIterationsSet ); } -MAIN(osiAtomicTest) +MAIN(epicsAtomicTest) { const unsigned int stackSize = epicsThreadGetStackSize ( epicsThreadStackSmall ); From 094072a93e5b8c7d09b23c6b2a050235d698db22 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 5 Aug 2011 17:12:33 -0600 Subject: [PATCH 2/2] fixed modern vxWorks atomics --- src/libCom/osi/os/vxWorks/epicsAtomicOSD.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libCom/osi/os/vxWorks/epicsAtomicOSD.h b/src/libCom/osi/os/vxWorks/epicsAtomicOSD.h index f3e4edaa6..0230d1b24 100644 --- a/src/libCom/osi/os/vxWorks/epicsAtomicOSD.h +++ b/src/libCom/osi/os/vxWorks/epicsAtomicOSD.h @@ -26,9 +26,6 @@ */ #if _WRS_VXWORKS_MAJOR * 100 + _WRS_VXWORKS_MINOR >= 606 -#define __STDC_LIMIT_MACROS /* define SIZE_MAX for c++ */ -#include - #include #include @@ -37,16 +34,16 @@ extern "C" { #endif /* __cplusplus */ /* - * we make the probably correct guess that if SIZE_MAX + * we make the probably correct guess that if ULONG_MAX * is the same as UINT_MAX then sizeof ( atomic_t ) * will be the same as sizeof ( size_t ) * - * if SIZE_MAX != UINT_MAX then its 64 bit vxWorks and + * if ULONG_MAX != UINT_MAX then its 64 bit vxWorks and * WRS doesnt not supply at this time the atomic interface * for 8 byte integers that is needed - so that architecture * receives the lock synchronized version */ -#if SIZE_MAX == UINT_MAX +#if ULONG_MAX == UINT_MAX STATIC_ASSERT ( sizeof ( atomic_t ) == sizeof ( size_t ) ); @@ -126,7 +123,7 @@ OSD_ATOMIC_INLINE unsigned epicsAtomicTestAndSetUIntT ( unsigned * pTarget ) { STATIC_ASSERT ( sizeof ( atomic_t ) == sizeof ( unsigned ) ); atomic_t * const pTarg = ( atomic_t * ) ( pTarget ); - return vxCas ( pTarget, 0, 1 ) != 0; + return vxCas ( pTarg, 0, 1 ) != 0; } #ifdef __cplusplus