This is an archive of the discontinued LLVM Phabricator instance.

scudo-standalone: Add atomic_compare_exchange_weak
Needs RevisionPublic

Authored by 1c3t3a on Nov 21 2022, 1:22 AM.

Details

Summary

This commit adds an atomic_compare_exchange_weak method
to the atomic helpers in scudo standalone.

Diff Detail

Event Timeline

1c3t3a created this revision.Nov 21 2022, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 1:22 AM
1c3t3a requested review of this revision.Nov 21 2022, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 1:22 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

This extracts the changes around atomics from https://reviews.llvm.org/D126752?id=435038 and adds tests for it :)

The patch is LGTM, but I would prefer you avoid it, and use existing strong version, unless you can prove meaningful performance difference with weak

vitalybuka requested changes to this revision.Mar 8 2023, 2:23 PM

I assume we don't need this?

This revision now requires changes to proceed.Mar 8 2023, 2:23 PM