1
1

* OBJ_RELEASE is probably going to call free() in the way we're using it in

this function, and the lock will still be held, so we'd have deadlock.
  Instead, unlock, then release.  We don't need the lock for calling the
  release - we're not modifying any shared variables my that point.

  This should probbaly go onto the 1.0 branch, although it would be nearly
  impossible to trigger the deadlock with the way we use the free handlers
  at present.

This commit was SVN r8057.
Этот коммит содержится в:
Brian Barrett 2005-11-09 17:58:41 +00:00
родитель a6fdc2b2b4
Коммит 05f8785e4f

Просмотреть файл

@ -196,11 +196,12 @@ opal_mem_free_register_handler(opal_mem_free_unpin_fn_t *func, void *cbdata)
opal_list_append(&callback_list, (opal_list_item_t*) new_cbitem);
done:
opal_atomic_unlock(&callback_lock);
if (OMPI_EXISTS == ret && NULL != new_cbitem) {
OBJ_RELEASE(new_cbitem);
}
opal_atomic_unlock(&callback_lock);
return ret;
}