Hi,
The changes that Andrew mentions below have in fact been carried to docs.epics-controls site; however, the corresponding section has not yet been included in the
navigation as this is a part of a larger set of modifications that is still WIP.
In the meantime, the updated text is available here:
https://docs.epics-controls.org/en/latest/appdevguide/lockScanProcess.html
I am slowly adding and updating the sections from the Application Developer’s Guide to the docs site. Unfortunately, my time available for this work is somewhat
limited.
Cheers,
Timo
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.
--
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?