if (me == NULL)
return -ENOMEM;
- LNET_LOCK();
+ lnet_res_lock();
me->me_portal = portal;
me->me_match_id = match_id;
lnet_me2handle(handle, me);
- LNET_UNLOCK();
+ lnet_res_unlock();
return 0;
}
if (new_me == NULL)
return -ENOMEM;
- LNET_LOCK();
+ lnet_res_lock();
- current_me = lnet_handle2me(¤t_meh);
- if (current_me == NULL) {
+ current_me = lnet_handle2me(¤t_meh);
+ if (current_me == NULL) {
lnet_me_free_locked(new_me);
- LNET_UNLOCK();
- return -ENOENT;
- }
+ lnet_res_unlock();
+ return -ENOENT;
+ }
- LASSERT (current_me->me_portal < the_lnet.ln_nportals);
+ LASSERT(current_me->me_portal < the_lnet.ln_nportals);
ptl = the_lnet.ln_portals[current_me->me_portal];
if (lnet_ptl_is_unique(ptl)) {
/* nosense to insertion on unique portal */
lnet_me_free_locked(new_me);
- LNET_UNLOCK();
+ lnet_res_unlock();
return -EPERM;
}
lnet_me2handle(handle, new_me);
- LNET_UNLOCK();
+ lnet_res_unlock();
- return 0;
+ return 0;
}
/**
LASSERT (the_lnet.ln_init);
LASSERT (the_lnet.ln_refcount > 0);
- LNET_LOCK();
+ lnet_res_lock();
me = lnet_handle2me(&meh);
if (me == NULL) {
- LNET_UNLOCK();
+ lnet_res_unlock();
return -ENOENT;
}
lnet_me_unlink(me);
- LNET_UNLOCK();
+ lnet_res_unlock();
return 0;
}
-/* call with LNET_LOCK please */
+/* call with lnet_res_lock please */
void
lnet_me_unlink(lnet_me_t *me)
{