Skip to content

Commit

Permalink
prov/util: Fix revert PR #9377
Browse files Browse the repository at this point in the history
I mistakenly reverted ep->lock to always be an ofi_mutex.
Restore ep->lock to depend on domain threading model

Signed-off-by: Seth Zegelstein <szegel@amazon.com>
  • Loading branch information
a-szegel authored and j-xiong committed Oct 26, 2023
1 parent ef5a04d commit b65701a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions prov/util/src/util_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ int ofi_endpoint_init(struct fid_domain *domain, const struct util_prov *util_pr
if (util_domain->eq)
ofi_ep_bind_eq(ep, util_domain->eq);

/* TODO Figure out how to optimize this lock for rdm and msg endpoints */
ret = ofi_genlock_init(&ep->lock, OFI_LOCK_MUTEX);
ret = ofi_genlock_init(&ep->lock,
ep->domain->threading != FI_THREAD_SAFE ?
OFI_LOCK_NOOP : OFI_LOCK_MUTEX);
if (ret)
return ret;

Expand Down

0 comments on commit b65701a

Please sign in to comment.