On 09/09/2018 06:26 PM, Mark Rivers wrote:
> So it copies the initial value to plink->text, rather than plink->value.constantStr, where the soft motor device support was expecting to find it. In both cases it sets plink->type to CONSTANT. Presumably the link type may get changed later to PV_LINK, CA_LINK, or DB_LINK when it is parsed.
cf. dbInitRecordLinks(). If you want to be notified after this happens use initHookAfterInitDatabase.
This comes after initHookAfterCaLinkInit so the dbCa worker has been started as well.
Were it me, I would defer all of this until initHookAfterIocRunning as I don't think there is any
reason it has to happen earlier, when the state of the IOC is less well defined.
From what I can see, the use of a worker thread here is to avoid having to deal with
swapping around libca contexts. Complications arise because this worker is allowed to
run concurrently with parts of iocInit() which don't expect concurrency.
If you won't/can't wait for initHookAfterIocRunning, then imo. either get rid of
the worker, or have the main thread wait for the worker to finish processing
the soft_motor_list list.
> I understand that plink->value.constantStr should only be used if plink->type==CONSTANT, but is there a chance that this change is going to break other code that was relying on the previous behavior?
Historically Base has exposed a lot of structures and functions which
were not really intended/expected to be public APIs. This makes
maintaining or using Base all the more difficult as it isn't clear what
was intended to be public API vs. what has become defacto public over
the years. Some breakage is inevitable when attempting to bring some
order to this chaos.
- References:
- Problems with soft motors Mark Rivers
- Re: Problems with soft motors Mooney, Tim M.
- Re: Problems with soft motors Andrew Johnson
- Re: Problems with soft motors Michael Davidsaver
- RE: Problems with soft motors Mark Rivers
- Navigate by Date:
- Prev:
RE: Problems with soft motors Mark Rivers
- Next:
Problem with 7.0.1.1 static built pvget Phillip Sorensen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Problems with soft motors Mark Rivers
- Next:
RE: Problems with soft motors Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
|