Whamcloud - gitweb
d78cad417f3288263f8289f06a2bfa4a95a8e079
[fs/lustre-release.git] / lnet / include / lnet / internal.h
1 /*
2 */
3 #ifndef _P30_INTERNAL_H_
4 #define _P30_INTERNAL_H_
5
6 /*
7  * p30/internal.h
8  *
9  * Internals for the API level library that are not needed
10  * by the user application
11  */
12
13 #include <portals/p30.h>
14
15 extern int ptl_init;            /* Has the library be initialized */
16
17 extern int ptl_ni_init(void);
18 extern int ptl_me_init(void);
19 extern int ptl_md_init(void);
20 extern int ptl_eq_init(void);
21
22 extern int ptl_me_ni_init(nal_t * nal);
23 extern int ptl_md_ni_init(nal_t * nal);
24 extern int ptl_eq_ni_init(nal_t * nal);
25
26 extern void ptl_ni_fini(void);
27 extern void ptl_me_fini(void);
28 extern void ptl_md_fini(void);
29 extern void ptl_eq_fini(void);
30
31 extern void ptl_me_ni_fini(nal_t * nal);
32 extern void ptl_md_ni_fini(nal_t * nal);
33 extern void ptl_eq_ni_fini(nal_t * nal);
34
35 static inline ptl_eq_t *
36 ptl_handle2usereq (ptl_handle_eq_t *handle)
37 {
38         /* EQ handles are a little wierd.  On the "user" side, the cookie
39          * is just a pointer to a queue of events in shared memory.  It's
40          * cb_eq_handle is the "real" handle which we pass when we
41          * call do_forward(). */
42         return (ptl_eq_t *)((unsigned long)handle->cookie);
43 }
44
45 #endif