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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: init function in device support |
From: | "Thomas, Patrick" <[email protected]> |
To: | Michael Davidsaver <[email protected]> |
Cc: | "[email protected] Talk" <[email protected]> |
Date: | Fri, 6 Oct 2017 20:16:50 +0000 |
Thank you, the init hook seems to work perfectly.
-Patrick From: Michael Davidsaver <[email protected]>
Sent: Friday, October 6, 2017 1:53 AM To: Thomas, Patrick Cc: [email protected] Talk Subject: Re: init function in device support On 10/06/2017 02:04 AM, Thomas, Patrick wrote:
> Hi, > > > I am trying to understand how to use the 'long init(int after)' function > in device support. Is it expected that I define a separate such function > for each record type (there is a pointer to it in the dset for each > record type)? I would like to define a single function that gets called > after all records of *all types* have been initialized. Is this > possible? If so, is there an example available? The device support init() function isn't required, and may be omitted. IMO it's not very useful. I've never had record type/DTYP specific initialization. What you want is best accomplished with an init hook (see initHooks.h). My usual starting point is to call initHookRegister() from a registrar function, then use the initHookAfterIocRunning event to start eg. driver specific worker threads. This happens near the end of iocInit(). |