diff --git a/LICENSE b/LICENSE index ff9597ccf..da661c55f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,14 @@ -Copyright (c) 1991-2007 UChicago Argonne LLC and The Regents of the -University of California. All rights reserved. +Copyright (c) 2007-2011 UChicago Argonne LLC. All rights reserved. + +Copyright (c) 2006-2011. Los Alamos National Security, LLC. Some of this +material was produced under U.S. Government contract DE-AC52-06NA25396 +for Los Alamos National Laboratory (LANL), which is operated by Los Alamos +National Security, LLC for the U.S. Department of Energy. + +Copyright (c) 1991-2007 the University of Chicago. All rights reserved. + +Copyright (c) 1991-2006 The Regents of the University of California. +All rights reserved. EPICS BASE is distributed subject to the following license conditions: 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 diff --git a/src/libCom/test/epicsAtomicPerform.cpp b/src/libCom/test/epicsAtomicPerform.cpp index 464c20afe..4a3a1bb19 100644 --- a/src/libCom/test/epicsAtomicPerform.cpp +++ b/src/libCom/test/epicsAtomicPerform.cpp @@ -424,8 +424,8 @@ void epicsAtomicIncrPerformance () void atomicCompareAndSetPerformance () { epicsTime begin = epicsTime::getCurrent (); - size_t target; - epicsAtomicSetSizeT ( & target, 0 ); + unsigned target; + epicsAtomicSetUIntT ( & target, 0 ); testOk1 ( ! target ); for ( unsigned i = 0; i < N; i++ ) { oneThousandAtomicTestAndSet ( target ); @@ -469,7 +469,7 @@ void ownershipPassRefPerformance () void epicsAtomicSetPerformance () { epicsTime begin = epicsTime::getCurrent (); - unsigned target; + size_t target; for ( unsigned i = 0; i < N; i++ ) { oneThousandAtomicSet ( target ); } @@ -480,7 +480,7 @@ void epicsAtomicSetPerformance () testDiag ( "epicsAtomicSet() takes %f microseconds", delay ); } -MAIN(osiAtomicTest) +MAIN(epicsAtomicPerform) { testPlan(5); // @@ -494,6 +494,6 @@ MAIN(osiAtomicTest) epicsAtomicIncrPerformance (); recursiveOwnershipRetPerformance (); ownershipPassRefPerformance (); - atomicCompareAndSetPerformance (); + atomicTestAndSetPerformance (); return testDone(); } 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 );