Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base
From: Andrew Johnson <anj@aps.anl.gov>
To: Andrew Johnson <anj@aps.anl.gov>
Date: Fri, 02 Sep 2011 23:12:22 -0000
Review: Needs Fixing
Hi Jeff,

I get this build failure on solaris-sparc:

/opt/SUNWspro/bin/CC -c -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -DUNIX -DSOLARIS=10 -mt -D__EXTENSIONS__ -O +w -xcode=pic32 -I. -I../O.Common -I. -I../../../src/libCom/osi/compiler/solStudio -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/os/solaris -I../../../src/libCom/osi/os/posix -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../../../src/libCom/bucketLib -I../../../src/libCom/calc -I../../../src/libCom/cvtFast -I../../../src/libCom/cppStd -I../../../src/libCom/cxxTemplates -I../../../src/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../../../src/libCom/error -I../../../src/libCom/fdmgr -I../../../src/libCom/flex -I../../../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../src/libCom/misc -I../../../src/libCom/osi -I../../../src/libCom/ring -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../!
 ../src/libCom/tsDefs -I../../../src/libCom/yacc -I../../../include/compiler/solStudio -I../../../include/os/solaris -I../../../include        ../../../src/libCom/osi/epicsAtomicLocked.cpp 
"../../../src/libCom/osi/os/solaris/epicsAtomicOSD.h", line 99: Error: The function "atomic_inc_ptr_nv" must have a prototype.
"../../../src/libCom/osi/os/solaris/epicsAtomicOSD.h", line 119: Error: The function "atomic_dec_ptr_nv" must have a prototype.
"../../../src/libCom/osi/epicsAtomicLocked.cpp", line 69: Warning (Anachronism): Formal argument 2 of type extern "C" void(*)(void*) in call to epicsThreadOnce(epicsThreadOSD**, extern "C" void(*)(void*), void*) is being passed void(*)(void*).
2 Error(s) and 1 Warning(s) detected.
make[3]: *** [epicsAtomicLocked.o] Error 2


The sys/atomic.h file on solaris-sparc only contains the atomic_inc_* functions below.  I'm also including a comment that appears about using the _nv versions:

/*
 * As above, but return the new value.  Note that these _nv() variants are
 * substantially more expensive on some platforms than the no-return-value
 * versions above, so don't use them unless you really need to know the
 * new value *atomically* (e.g. when decrementing a reference count and
 * checking whether it went to zero).
 */

/*
 * Increment target and return new value.
 */
extern uint8_t atomic_inc_8_nv(volatile uint8_t *);
extern uchar_t atomic_inc_uchar_nv(volatile uchar_t *);
extern uint16_t atomic_inc_16_nv(volatile uint16_t *);
extern ushort_t atomic_inc_ushort_nv(volatile ushort_t *);
extern uint32_t atomic_inc_32_nv(volatile uint32_t *);
extern uint_t atomic_inc_uint_nv(volatile uint_t *);
extern ulong_t atomic_inc_ulong_nv(volatile ulong_t *);
#if defined(_KERNEL) || defined(_INT64_TYPE)
extern uint64_t atomic_inc_64_nv(volatile uint64_t *);
#endif


- Andrew

-- 
https://code.launchpad.net/~epics-core/epics-base/rebased-atomics/+merge/73915
Your team EPICS Core Developers is subscribed to branch lp:epics-base.


References:
[Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base Andrew Johnson

Navigate by Date:
Prev: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base Andrew Johnson
Next: Re: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base Andrew Johnson
Next: Re: [Merge] lp:~epics-core/epics-base/rebased-atomics into lp:epics-base Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·