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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Lock/Mutex to prevent "caget" from cutting in between updating multiple fields |
From: | bob dalesio <[email protected]> |
To: | "Zhang, Dehong" <[email protected]> |
Cc: | EPICS tech-talk <[email protected]> |
Date: | Sat, 30 Apr 2016 09:01:44 -0400 |
Pvaccess has atomic get/put from multiple records. This work was supported by RAON along with the first cut of pvaccess gateway and done by Matej Sekoranja and Michael Daividsaver. It requires the modified record locking. This does not work across IOCs. Michael should speak more directly to this.
Hi,
In my custom record, I need to update multiple fields atomically so they stay
synchronized -- all updated, or none updated; not a few updated, but a few with the
old data. If I use my own mutex, I suspect that "caget" can cut in between the
updating and gets, for example, new data with old time stamp, or old data with
new time stamp depending on the order of updating.
And I guess "camonitor" would not have this problem because it would be the server
pushing the whole set (field itself and time stamp for instance). Is this right?
So to close this hole with "caget", which global lock should I use? dbScanLock?
Thank you, best regards,
Dehong