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  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0
From: Andrew Johnson via Core-talk <[email protected]>
To: mdavidsaver <[email protected]>
Date: Fri, 28 Jun 2019 19:08:25 -0000
A working VxWorks 6.9+ implementation of epicsThreadMustJoin() is now included, and I added some more tests.

The changes made to asCaStop, dbCa and dbEvent mean the IOC now requires EPICS_THREAD_CAN_JOIN=1, so that macro is now obsolete and should be deleted. The minimum VxWorks version will also have to be bumped up to 6.9, which I documented in the Release Notes. The APS doesn't have a problem with that, although PSI might be unhappy.

On VxWorks a thread which sits waiting to be joined for longer than 60 seconds will log a warning message, as will a call to epicsThreadMustJoin(). The RTEMS and Windows implementations could probably do the same thing.

Could we replace the epicsThreadOptsDefaults() routine with a macro named EPICS_THREAD_OPTS_INIT which would be defined in osdThread.h (or even in epicsThread.h, see below). I'm looking to simplify this code:

    epicsThreadOpts opts;
    epicsThreadOptsDefaults(&opts);

into this:

    epicsThreadOpts opts = EPICS_THREAD_OPTS_INIT;

which removes the need for that epicsThreadOptsDefaults() routine. This name matches similar ones elsewhere in libCom (ELLLIST_INIT, EPICS_THREAD_ONCE_INIT etc.).

The only reason we need an OS-specific definition of those defaults is for the stack size parameter, which is an unsigned integer. Since we're making changes in this area, why don't we modify the epicsThreadCreateOpt() routines to check opts->stackSize and pass it through epicsThreadGetStackSize() if the value given matches any of the epicsThreadStackSizeClass values (none of which are legal stack sizes on any architecture)? Code could still pass in an arch-specific value, but this simplifies the API which I have always found very clunky.

-- 
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/361379
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.

Navigate by Date:
Prev: Build failed: epics-base base-integration-263 AppVeyor via Core-talk
Next: Crash in pvData Mark Rivers via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 Andrew Johnson via Core-talk
Next: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 mdavidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 30 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·