EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: record to record ...
From: Ralph Lange <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Wed, 15 Jul 2015 14:21:49 +0200
On 15/07/2015 14:02, Benjamin Franksen wrote:
On Monday 13 July 2015 14:35:49 Kasemir, Kay wrote:
In principle, you can read include/link.h to get the 'record' pointer
of a link, cast that to the appropriate type, ...

But that's a bad idea because you'd directly access the memory of that
other record without it being locked.
It is possible to do this correctly, using the runtime database access
methods: in the init routine you call dbNameToAddr, store the address of
the dbAddr struct in the record's DPVT and in the subroutine place calls
to dbScanLock/Unlock around a call to dbPutField.

Note, though, that by doing this you are evading the lock-set mechanism, which might get you into trouble - depending on your database configuration.

Records interconnected by links are put into a common lock-set to avoid stack overflow situations with circular links. The described method effectively creates a link that will be undetected by the lock-set forming algorithm. Obviously, disabling safety functions will not affect you in safe situations, but...

Cheers,
~Ralph


Replies:
Re: record to record ... Ralph Lange
References:
record to record ... Stefen Paul
Re: record to record ... Kasemir, Kay
Re: record to record ... Benjamin Franksen

Navigate by Date:
Prev: Re: record to record ... Benjamin Franksen
Next: RE: using motor / steppermotor record for Trinamic TMCM-351 controller Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: record to record ... Benjamin Franksen
Next: Re: record to record ... Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·