Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git]
/
lustre
/
portals
/
portals
/
api-init.c
diff --git
a/lustre/portals/portals/api-init.c
b/lustre/portals/portals/api-init.c
index
9a98714
..
e41bad8
100644
(file)
--- a/
lustre/portals/portals/api-init.c
+++ b/
lustre/portals/portals/api-init.c
@@
-23,23
+23,43
@@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#define DEBUG_SUBSYSTEM S_PORTALS
#include <portals/api-support.h>
#include <portals/api-support.h>
+int ptl_init;
+
+int __p30_initialized;
+int __p30_myr_initialized;
+int __p30_ip_initialized;
+ptl_handle_ni_t __myr_ni_handle;
+ptl_handle_ni_t __ip_ni_handle;
+
int PtlInit(int *max_interfaces)
{
if (max_interfaces != NULL)
int PtlInit(int *max_interfaces)
{
if (max_interfaces != NULL)
- *max_interfaces = NAL_MAX_NR;
+ *max_interfaces = NAL_ENUM_END_MARKER;
+
+ if (ptl_init)
+ return PTL_OK;
LASSERT(!strcmp(ptl_err_str[PTL_MAX_ERRNO], "PTL_MAX_ERRNO"));
LASSERT(!strcmp(ptl_err_str[PTL_MAX_ERRNO], "PTL_MAX_ERRNO"));
- return ptl_ni_init();
+ ptl_ni_init();
+ ptl_me_init();
+ ptl_eq_init();
+ ptl_init = 1;
+
+ return PTL_OK;
}
void PtlFini(void)
{
}
void PtlFini(void)
{
+
+ /* Reverse order of initialization */
+ ptl_eq_fini();
+ ptl_me_fini();
ptl_ni_fini();
ptl_ni_fini();
+ ptl_init = 0;
}
}