EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS 7.0.1-pre1 (spinlock.hpp)
From: "Johnson, Andrew N." <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 23 Nov 2017 18:23:28 +0000
Hi Dirk,

The complete Boost version used in Base-7.0.1-pre1 can be found in the any version of the V4 dBCommonCPP application; the full source is huge though so I only pulled the files into 7.0.1 that I knew were needed. If you can keep track of and send me a list of all the additional Boost files that you need I will add them before the -rc1 release.

If you want EPICS to support VxWorks versions before 6.8 you do need to actively support it by doing builds , running tests and reporting problems (preferably as early in the development process as possible). APS doesn’t use or have either of these versions installed so we can’t do that for you.

- Andrew

-- 
Sent from my iPad

On Nov 23, 2017, at 9:34 AM, Dirk Zimoch <[email protected]> wrote:

On 22.11.2017 13:28, Dirk Zimoch wrote:
The vxWorks 6.2 and 6.3 builds failed here:
In file included from
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/detail/spinlock_pool.hpp:25,

                from
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/shared_ptr.hpp:38,

                from
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/shared_ptr.hpp:17,
                from
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/tr1/memory.hpp:56,
                from ../../src/misc/pv/sharedPtr.h:133,
                from ../pv/pvType.h:41,
                from ../pv/pvIntrospect.h:17,
                from ../pv/pvData.h:24,
                from ../../src/json/print.cpp:11:
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/detail/spinlock.hpp:47:52:
boost/smart_ptr/detail/spinlock_pt.hpp: No such file or directory

When comparing with vxWorks 6.6 and 6.7, I see the following includes:
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/detail/spinlock_pool.hpp \
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/detail/spinlock.hpp \
/usr/local/epics/base-7.0.1/include/os/vxWorks/boost/smart_ptr/detail/spinlock_sync.hpp \


That means in spinlock.hpp vxWorks 6.6 and 6.7 take the branch
#elif defined( BOOST_SP_HAS_SYNC )
#  include <boost/smart_ptr/detail/spinlock_sync.hpp>

But vxWorks 6.2 and 6.3 want to take the branch
#elif defined(BOOST_HAS_PTHREADS)
#  include <boost/smart_ptr/detail/spinlock_pt.hpp>

I checked that vxWorks 6 indeed defines _POSIX_THREADS as checked in posix_features.hpp:
     // POSIX defines _POSIX_THREADS > 0 for pthread support,
     // however some platforms define _POSIX_THREADS without
     // a value, hence the (_POSIX_THREADS+0 >= 0) check.
     // Strictly speaking this may catch platforms with a
     // non-functioning stub <pthreads.h>, but such occurrences should
     // occur very rarely if at all.
#     if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
#        define BOOST_HAS_PTHREADS
#     endif

But the file boost/smart_ptr/detail/spinlock_pt.hpp is missing. I copied it from another boost installation to see what happens.
VxWorks 6.2 has pthread_mutex_lock(). It implements it with semTake() but does some magic before to follow posix rules. Maybe it is better to use semTake directly in a vxWorks specific implementation?
Also I don't think that vxWorks 6.2 supports multi-core processors. Thus intLock() may be faster and still safe?


Now I get another error with vxWorks 6.2:

In file included from ../../src/misc/pvUnitTest.cpp:12:
../../src/misc/pv/pvUnitTest.h: In function `detail::testPassx
  testFieldEqual(const boost::shared_ptr<const epics::pvData::PVStructure>&,
  const char*, typename PVD::value_type)':
../../src/misc/pv/pvUnitTest.h:156: error: syntax error before `>' token
../../src/misc/pv/pvUnitTest.h:158: error: syntax error before `>' token
../../src/misc/pv/pvUnitTest.h:160: error: syntax error before `>' token
../../src/misc/pv/pvUnitTest.h: In function `detail::testPassx
  testFieldEqual(const boost::shared_ptr<const epics::pvData::PVStructure>&,
  const char*, typename PVD::const_svector)':
../../src/misc/pv/pvUnitTest.h:177: error: syntax error before `>' token

And with vxWorks 6.3:

/afs/psi.ch/project/vxworks/WindRiverGPP3.3/gnu/3.4.4-vxworks-6.3/x86-linux2/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../include/c++/3.4.4/xstring: In function `void testLogicException()':
/afs/psi.ch/project/vxworks/WindRiverGPP3.3/gnu/3.4.4-vxworks-6.3/x86-linux2/bin/../lib/gcc/powerpc-wrs-vxworks/3.4.4/../../../../include/c++/3.4.4/xstring:78: internal compiler error: in expand_expr_real, at expr.c:8417
Please submit a full bug report,
with preprocessed source if appropriate.
Contact [email protected] for instructions.


Replies:
Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch
References:
EPICS 7.0.1-pre1 Andrew Johnson
Re: EPICS 7.0.1-pre1 Dirk Zimoch
Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch

Navigate by Date:
Prev: Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 (spinlock.hpp) Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·