Experimental Physics and Industrial Control System
Hi Eric,
On 2012-05-31 Eric Norum wrote:
> On May 31, 2012, at 8:08 AM, Andrew Johnson wrote:
> > On 2012-05-30 Eric Norum wrote:
> >> Actually the asyn devEpics layer is simpler than described above.
> >> - It always sets the record TIME field from the pasynUser->timestamp in
> >> the device support interrupt callback or read method then returns to
> >> higher level record processing code.
> >> - The record processing code then
> >> overwrites the TIME field unless the TSE field is -2.
> Who said that we were doing this from an ISR?
> I guess that I wasn't clear enough. The devEPICS code that's writing to
> the .TIME field is actually in an interrupt callback thread -- at
> task-level. This is acceptable isn't it?
You wrote "device support interrupt callback or read method", which I
originally read as the ISR, but it would be just as bad to set the TIME field
in the port thread or a callback routine without first locking the lockset.
If you meant that TIME gets set by the dset->read_xxx() routine then that's
fine, because it gets called by the record's process routine with the lockset
locked. I wasn't really thinking about the limitations of interrupt context,
it's that accessing a record's fields from any thread that has not first
locked the record's lockset is not safe.
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- Replies:
- Re: Proposed change in asyn - request for comments Eric Norum
- References:
- Proposed change in asyn - request for comments Mark Rivers
- Re: Proposed change in asyn - request for comments Andrew Johnson
- Re: Proposed change in asyn - request for comments Eric Norum
- Navigate by Date:
- Prev:
Re: [StreamDevice] parsing rapid inputs Dirk Zimoch
- Next:
Re: Proposed change in asyn - request for comments Eric Norum
- 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: Proposed change in asyn - request for comments Eric Norum
- Next:
Re: Proposed change in asyn - request for comments Eric Norum
- 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