Skip to content

Commit

Permalink
fixup! Fix memory ordering guarantees and TSAN errors
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed Nov 4, 2024
1 parent 5313741 commit f8d215b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/internal/refcount.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static __inline int CRYPTO_DOWN_REF(CRYPTO_REF_COUNT *refcnt, int *ret)

static __inline int CRYPTO_GET_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
{
*ret = _InterlockedExchangeAdd((void *)&refcnt->val, 0);
*ret = _InterlockedExchangeAdd_acq((void *)&refcnt->val, 0);
return 1;
}

Expand Down

0 comments on commit f8d215b

Please sign in to comment.