Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: File I/O from genSub Process function
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Mon, 2 Nov 2009 18:45:20 -0500
Hi Bruce,

On Friday 30 October 2009 18:41:33 Bruce Hill wrote:
> I have a genSub I've setup to run test code on my IOC, and I'm getting
> errors when I try to read the test set data files.    This is an RTEMS
> 4.7.1 based
> IOC accessing an NFS mounted filesystem.     I'm able to read the same
> files from a genSub Init function, but not from the Process function.
> I can also read these files if I initiate the test from the Cexp shell
> on the RTEMS console.
>
> Is there something about how the Process functions are called that would
> preclude file I/O?

No, although file I/O is blocking and as such will cause whatever scan thread 
is processing that record to be delayed and could affect whatever control 
algorithms the IOC is running at the time.  We usually suggest that the best 
way to do file I/O inside the IOC is in a SNL program which can block whenever 
it likes and talk to the PVs using CA, or even global variables (provided you 
understand the need to lock them).

I suspect the issue might be due to the fact that NFS can take up quite a lot 
of stack space - can you check whether the relevent thread has gone over its 
allotted stack?

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


Replies:
Re: File I/O from genSub Process function Bruce Hill
References:
File I/O from genSub Process function Bruce Hill

Navigate by Date:
Prev: RE: File I/O from genSub Process function Erik Johansson
Next: Re: File I/O from genSub Process function Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: RE: File I/O from genSub Process function Erik Johansson
Next: Re: File I/O from genSub Process function Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·