>why don't you just do > > if (cma_disable_callback(id_priv, CMA_ADDR_BOUND) && > cma_disable_callback(id_priv, CMA_ADDR_RESOLVED)) > >instead of open-coding here? (&& is specified to have short-circuit >semantics, so if the first call takes the mutex, the second call won't >be made) > >It seems your change is a subtle change in semantics and breaks the >encapsulation of this callback disabling here.
Personally, I'm fine either way. This method can acquire/release the mutex twice, though that's not a big deal. If we want better encapsulation, we could also add a cma_enable_callback wrapper around the mutex_unlock. - Sean _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
