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> 2025 | 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> 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Asyn connection/communication management with asynPortDriver |
From: | "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Yann Mandza <yann.mandza at ess.eu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Wed, 21 Feb 2024 16:54:06 +0000 |
Hi Yann, I'm not sure that I completely understand what you're asking or trying to do, but the initialization of EPICS records and device support cannot happen in the Asyn port thread. You should still be able to structure your port driver though
so that it is the only place where API calls are made to the external device library. The thread protection that you need for that driver doesn't necessarily mean the driver API calls all have to happen within the context of the port thread though, you may just have to create an epicsMutex for the driver and ensure that
the API routines are only ever called by code that has successfully taken that mutex and releases it afterwards. That could get more complicated and my advice might be wrong if the driver is written in C++ or is multi-threaded, but the latter at least seems
unlikely. I'm not an expert on Asyn port threads but there are several people here who are, so please use the tech-talk list for any follow-up questions. - Andrew |