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  <20122013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Proposed change in asyn - request for comments
From: Andrew Johnson <anj@aps.anl.gov>
To: Eric Norum <wenorum@lbl.gov>
Cc: tech-talk@aps.anl.gov
Date: Thu, 31 May 2012 11:17:06 -0500
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  <20122013  2014  2015  2016  2017 
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  <20122013  2014  2015  2016  2017 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·