Thank you Andrew! That explains a lot.
On 2/4/19 12:59 PM, Johnson, Andrew N. via Tech-talk wrote:
Hi Klemen,
On 2/4/19 9:03 AM, Klemen Vodopivec via Tech-talk wrote:
Question is, is PACT=1 enough to ensure exclusive access to record
fields? I know record won't process again but is there any EPICS db
internals that will poke record while it's being processed?
No, before accessing /any/ record field from your own thread (i.e. from
a routine that is not called by an IOC scan thread) you must call
dbScanLock(precord) first and dbScanUnlock(precord) afterwards. Other
threads such as those belonging to RSRV or QSRV may also want to access
your record at the same time — say if someone does a caget/put or a
pvget/put these servers don't wait for PACT to be cleared before
accessing the fields, but they do take the above lock.
If you have multiple records that you want to update atomically there is
also now an API that lets you safely lock a series of records that might
belong to different locksets, but the new API is only available in 3.16
or later releases of Base.
HTH,
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- Changing record fields while PACT=1 Klemen Vodopivec via Tech-talk
- Re: Changing record fields while PACT=1 Johnson, Andrew N. via Tech-talk
- Navigate by Date:
- Prev:
Re: AsynDriver with delayed and async communication Johnson, Andrew N. via Tech-talk
- Next:
RE: AsynDriver with delayed and async communication Mark Rivers via Tech-talk
- 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: Changing record fields while PACT=1 Johnson, Andrew N. via Tech-talk
- Next:
EPICS7.0.2 "make distclean" in a model deletes top level configure dir Shen, Guobao via Tech-talk
- 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
|