On July 15, 2015 2:21:49 PM GMT+02:00, Ralph Lange <[email protected]> wrote:
>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
Ehhhhh ... wrong.
Lock-sets prevent multiple threads from processing records of the same interconnected set at the same time. The PACT field mechanism protects against circular links.
I should know that.
Sorry for creating confusion,
~Ralph
- References:
- record to record ... Stefen Paul
- Re: record to record ... Kasemir, Kay
- Re: record to record ... Benjamin Franksen
- Re: record to record ... Ralph Lange
- Navigate by Date:
- Prev:
Re: using motor / steppermotor record for Trinamic TMCM-351 controller Ron Sluiter
- Next:
Re: Linux vs. RTOS: cost and security; was: Stepper Motor Controllers Benjamin Franksen
- 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: record to record ... Ralph Lange
- Next:
RE: record to record ... Mooney, Tim M.
- 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
|