[openib-general] Re: [PATCH] uDAPL/uDAT autotools - Package for udat, udaplcma, udaplscm
James Lentini
jlentini at netapp.com
Fri Mar 17 09:52:40 PST 2006
On Thu, 16 Mar 2006, Arlin Davis wrote:
> > > Index: dapl/udapl/dapl_init.c
> > > ===================================================================
> > > --- dapl/udapl/dapl_init.c (revision 5854)
> > > +++ dapl/udapl/dapl_init.c (working copy)
> > > @@ -66,8 +66,7 @@
> > > *
> > > * Return Values:
> > > */
> > > -void -dapl_init ( void )
> > > +static void __attribute__((constructor)) dapl_init ( void )
> > > {
> > > DAT_RETURN dat_status;
> > >
> > > @@ -118,7 +117,6 @@ dapl_init ( void )
> > >
> > > bail:
> > > dapl_dbg_log (DAPL_DBG_TYPE_ERR, "ERROR: dapl_init failed\n");
> > > - dapl_fini ();
> > >
> >
> > Why is this call being removed?
>
> I moved away from the -init dapl_init and -fini dapl_init linker
> flags and redefined as constructor and destructor. dapl_fini will
> always be called. Which brings up a good point. There is no
> guarantee that the init will always succeed so should we have a
> check in the open call and the fini call?
The dapl_fini call is supposed to handle a partially successful
dapl_init call.
I don't think there needs to be anything in the open function. If
dapl_init fails, it should not register as a provider and therefore
open will not be called. If that is not the case, we should fix it.
More information about the general
mailing list