[openib-general] [DAPL] Provider initialialization

James Lentini jlentini at netapp.com
Mon Apr 3 11:05:48 PDT 2006


Arlin,

As part of the uDAPL autotools patch, we changed the mechanism by 
which the uDAPL provider library's init and fini functions were 
specified.

I've seen (and received reports) of systems on which the init and fini 
functions are not being called. I'd like to move back to the old 
mechanism (see patch below). Do you see any problems with this?

Index: dapl/udapl/dapl_init.c
===================================================================
--- dapl/udapl/dapl_init.c	(revision 6180)
+++ dapl/udapl/dapl_init.c	(working copy)
@@ -66,7 +66,7 @@
  *
  * Return Values:
  */
-static void __attribute__((constructor)) dapl_init ( void )
+void dapl_init ( void )
 {
     DAT_RETURN		dat_status;
 
@@ -138,7 +138,7 @@
  *
  * Return Values:
  */
-static void __attribute__((destructor)) dapl_fini ( void )
+void dapl_fini ( void )
 {
     DAT_RETURN		dat_status;
 
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 6180)
+++ Makefile.am	(working copy)
@@ -173,7 +173,8 @@
         dapl/openib_cma/dapl_ib_mem.c               
 
 dapl_udapl_libdaplcma_la_LDFLAGS = -version-info 1:2:0 $(daplcma_version_script) \
-				   -lpthread -libverbs -lrdmacm   
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+				   -lpthread -libverbs -lrdmacm 
 				
 
 #        
@@ -282,6 +283,7 @@
         dapl/openib_scm/dapl_ib_mem.c               
 
 dapl_udapl_libdaplscm_la_LDFLAGS = -version-info 1:2:0 $(daplscm_version_script) \
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
 				   -lpthread -libverbs
 				    
 libdatincludedir = $(includedir)/dat



More information about the general mailing list