Hi Scott,
I suggest you look at the latest dbPutFieldLink() routine in the modules/database/src/ioc/db/dbAccess.c file, which does exactly this
including taking and releasing the necessary locks. It gets called by dbPutField() when a client writes to any INP/OUT/FWD link
field.
The global lock as been removed. The new API
allows locks to be taken on
multiple records at once even if they currently belong
to different lock-sets, allowing other threads to continue processing records while this thread combines or splits existing lock-sets as needed by the change requested. The locking changes were merged into 3.16 back in 2015 from
this launchpad merge request, but there have likely been additional code changes since then. There is documentation to be found in section 5.4 of the
3.16 version of the appDevGuide; those changes were added in
this appDevGuide merge but the details haven’t obviously been carried forward into the new documents on the docs.epics-controls.org website.
HTH,
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
I’m attempting to update the redundant IOC software to build with EPICS 7. The API for record locking has been changed completely. One component of the software needs to have the ability to change database links. With EPICS 3.15
this means calling a global lock function and some Add/remove link functions as well as dbLockSetSplit and dbLockSetMerge. Many of these no longer exist, the new interface to lock a record or multiple records is much simpler, but what functions need to be
called when modifying database links? Is there any documentation or examples I can look at?
Are the split and merge calls no longer needed? Do I need to lock and unlock one or both records before adding or removing links, or do the epics 7 versions of dbAddLink and dbRemoveLink take care of the locking and lockset management?
- Replies:
- Re: documentation for new epics 7 dbLock usage and Redundant IOC software Michael Davidsaver via Tech-talk
- Re: documentation for new epics 7 dbLock usage and Redundant IOC software Timo Korhonen via Tech-talk
- References:
- documentation for new epics 7 dbLock usage and Redundant IOC software Baily, Scott A via Tech-talk
- Navigate by Date:
- Prev:
documentation for new epics 7 dbLock usage and Redundant IOC software Baily, Scott A via Tech-talk
- Next:
Re: documentation for new epics 7 dbLock usage and Redundant IOC software Michael Davidsaver 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
<2025>
2026
- Navigate by Thread:
- Prev:
documentation for new epics 7 dbLock usage and Redundant IOC software Baily, Scott A via Tech-talk
- Next:
Re: documentation for new epics 7 dbLock usage and Redundant IOC software Michael Davidsaver 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
<2025>
2026
|