EPICS Controls 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  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Calling ca_context_create(1) too late
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Mon, 22 Apr 2013 07:36:02 +0000
From: [email protected] [mailto:tech-talk-
> On 2013-04-19 [email protected] wrote:
> > I've just discovered that calling ca_context_create(1) after
> > iocInit() appears to succeed (it returns ECA_NORMAL) ... but the
> > resulting context is not very healthy!  In my particular case I find that
> > ca_array_get_callback delivers zero length data, but I expect other deeper
> > problems are to be found.

I have just attempted to reproduce this problem in a standalone fragment of code (the problem was previously occurring in a complex and dynamic Python program) ... and so far have completely failed!  I'll post an update if I succeed in pinning the problem down more closely.

 
> Is your code running in the main thread, or its own private thread?

This is code all called from the main thread.

> You can use ca_current_context() to find out if there is context set for the
> current thread yet.  This returns a NULL pointer if no context has been
> created yet.  If the result is not NULL you may be able to use the
> undocumented (and mis-spelled) routine (with a prototype in cadef.h)
>     int ca_preemtive_callback_is_enabled(void);
> to find out whether that context is preemptive or not.

This was very helpful (yes, what a horrible typo, it threw me for a while, as it's somehow quite hard to spot).  Turns out I *am* the first create the CA context, and as I've noted above, I can't reproduce the problem in isolation yet ... will carry on digging and will report if I find anything.


References:
Calling ca_context_create(1) too late michael.abbott
Re: Calling ca_context_create(1) too late Andrew Johnson

Navigate by Date:
Prev: Andrew 周永年
Next: RE: Calling ca_context_create(1) too late michael.abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Calling ca_context_create(1) too late Andrew Johnson
Next: RE: Calling ca_context_create(1) too late michael.abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·