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  <20112012  2013  2014  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Does EPICS Base support multi-thread on vxWorks 6.3?
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Fri, 15 Apr 2011 10:07:26 -0500
Hi Lorna,

On Friday 15 April 2011 02:34:53 [email protected] wrote:
> 
> We developed a client based on libca (EPICS Base 3.14.9), which will
> create it's own worker thread on construction. But we found it working
> strangely on vxWorks (ppc-603). Whenever a second EPICS client is created
> (meaning there are now 2 EPICS worker threads on vxWorks), the CPU usage
> became 100%.
> 
> From the profile, we found the ca_pend_event is consuming lots of the CPU.
> 
> Meanwhile, it seems epicsMutex is failing to do the lock for the second
> EPICS client??

EPICS should work fine on your hardware and OS combination, this is probably 
an application programming issue.

Are these two threads sharing a single CA client context?  Hopefully Jeff Hill 
will respond here too, but you might want to read this and the following 
sections of the CA Reference Manual for some ideas:
  http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html#Thread
In particular if you're experienced in writing multi-threaded code you might 
want to use ca_enable_preemptive_callback mode and completely avoid having to 
call ca_pend_event() in your code.

- Andrew
-- 
An error is only a mistake if you don't learn from it.
When you learn something from it, it becomes a lesson.

Replies:
Re: Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang
References:
Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang

Navigate by Date:
Prev: Support for Highland V344/V346 waveform generators? Ralph Lange
Next: EPICS Device Support for the Sis3302 Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang
Next: Re: Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·