From 655cdf6cb78764fd5bd7796471acdd40f197c82b Mon Sep 17 00:00:00 2001 From: eeb Date: Wed, 21 Sep 2005 17:45:46 +0000 Subject: [PATCH] * Fixed LND registration / setting the_lnet.ln_init ordering --- lnet/lnet/api-ni.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 4353bd5..4d3e84c 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -932,16 +932,20 @@ LNetInit(void) portals_compatibility); return -1; } - - /* All LNDs apart from the LOLND are in separate modules. They - * register themselves when their module loads, and unregister - * themselves when their module is unloaded. */ #else pthread_mutex_init(&the_lnet.ln_mutex, NULL); pthread_cond_init(&the_lnet.ln_cond, NULL); pthread_mutex_init(&the_lnet.ln_lnd_mutex, NULL); pthread_mutex_init(&the_lnet.ln_api_mutex, NULL); +#endif + + the_lnet.ln_init = 1; +#ifdef __KERNEL__ + /* All LNDs apart from the LOLND are in separate modules. They + * register themselves when their module loads, and unregister + * themselves when their module is unloaded. */ +#else /* Register all LNDs that have been loaded * NB the order here determines default 'networks=' order */ LNET_REGISTER_LND_IF_PRESENT(the_ptllnd); @@ -949,7 +953,6 @@ LNetInit(void) #endif lnet_register_lnd(&the_lolnd); - the_lnet.ln_init = 1; return 0; } -- 1.8.3.1