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: threading in asyn device support
From: Vikram Bhagat <[email protected]>
To: Ralph Lange <[email protected]>, EPICS Tech-Talk <[email protected]>
Date: Thu, 19 Sep 2013 08:32:55 -0700 (PDT)
Hi Ralph,
    Thanks for explanation.  One more question.
after completion of task how to delete Thread in EPICS (epicsThread), or it is not required in EPICS?

WR
-Vikram


From: Ralph Lange <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Sent: Thursday, September 19, 2013 11:21 AM
Subject: Re: threading in asyn device support

On 19.09.2013 10:57, Vikram Bhagat wrote:
Hello,
    I am not clear under standing the difference between epicsThreads and pthread. In developing asyn based device support, What i should be used?
  For example i make some calculation in separate thread, which was talking long time and i want to do other work in parallel.  Should i use pthread or epicsThread?

Hi Vikram,

The epicsThread API is part of the OSI layer, which adds a common EPICS API to operating system services. (E.g., threads, timers, semaphores, ...)
This ensures portability of code across all systems and architectures supported by EPICS.

For things in the OSI layer, there is usually a POSIX implementation, which is used on POSIX compliant platforms. In many cases vxWorks, RTEMS, or Windows use a different implementation for the same feature.

So:
If you use epicsThread, your code will run on all EPICS systems.
If you use pthread, your code will only run on POSIX compliant systems.

Please use the OSI APIs whenever possible, to allow as many people as possible to use your code.

HTH,
~Ralph



Replies:
Re: threading in asyn device support Ralph Lange
References:
threading in asyn device support Vikram Bhagat
Re: threading in asyn device support Ralph Lange

Navigate by Date:
Prev: Re: Makefile definition for .hpp include files Andrew Johnson
Next: Re: threading in asyn device support Ralph Lange
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: threading in asyn device support Ralph Lange
Next: Re: threading in asyn device support Ralph Lange
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 ·