When you compile with +r the calls to your C functions are different. There are a couple of extra parameters passed.
Here's an example C function in .st file with option +r
static int waitMotors(SS_ID ssId, struct UserVar *pVar)
It is described in the documentation, but I can send examples if you need them.
Mark
________________________________
From: [email protected] on behalf of Szalata, Zenon M.
Sent: Mon 10/20/2008 4:06 PM
To: EPICS Techtalk
Subject: Difficulties with my Sequencer program
I am using seq-R2-0-11 and vxWorks 6.6.
I have written a simple sequencer program, which monitors a PV and when the epics record processes, it saves the data from the PV to a disk file. The data written to disk is an ascii coded string, which contains configuration data for a VME module. All of this works flawlessly with one module.
I have a few such modules and I want to keep the configuration data in separate files, so this is what I tried:
1. I have coded my sequencer program such that I pass to it information using a macro, which is used to select which PV to monitor and get data from and what file name to use.
2. I start a few instances of the same program, one for each module.
I realized that this does not work. Looking at the manual for clues I see that the program must be made reentrant. Hence, I added option +r; to my program, but now it does not compile. Here are some details:
In the program I have a few routines written in C coded as escaped to C. In the declaration part of the program I define a few variables, e.g. int update;. With the option +r; statement added, the C escaped routines no longer have access to the variables declared in the declaration part. I get a number of error messages like:
"../sncFFF.st:120: error: 'update' undeclared (first use in this function)"
When I examine the sncFFF.c code generated with the +r option and without, I do not see any significant difference.
I am stuck now and any help or suggestions will be greatly appreciated.
Zen
- References:
- Difficulties with my Sequencer program Szalata, Zenon M.
- Navigate by Date:
- Prev:
Difficulties with my Sequencer program Szalata, Zenon M.
- Next:
RE: Difficulties with my Sequencer program Erik Johansson
- 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:
Difficulties with my Sequencer program Szalata, Zenon M.
- Next:
RE: Difficulties with my Sequencer program Erik Johansson
- 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
|