This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Introduce LazyAtomicPointer
ClosedPublic

Authored by steven_wu on Sep 12 2022, 10:41 AM.

Details

Summary

LazyAtomicPointer is a lock-free pointer that can coordinate concurrent
writes to a pointer using a generator.

Diff Detail

Event Timeline

steven_wu created this revision.Sep 12 2022, 10:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2022, 10:41 AM
steven_wu requested review of this revision.Sep 12 2022, 10:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2022, 10:41 AM
benlangmuir accepted this revision.Sep 15 2022, 12:05 PM
benlangmuir added inline comments.
llvm/include/llvm/ADT/LazyAtomicPointer.h
2

Looks like "h " got dropped.

This revision is now accepted and ready to land.Sep 15 2022, 12:05 PM
steven_wu updated this revision to Diff 460526.Sep 15 2022, 3:55 PM

Fix the busy state test on windows by avoid lock ownership issues

steven_wu updated this revision to Diff 460528.Sep 15 2022, 3:57 PM

Address review feedback

steven_wu marked an inline comment as done.Sep 15 2022, 3:57 PM
steven_wu updated this revision to Diff 461387.Sep 19 2022, 3:20 PM

Use conditional variable to coordinate to avoid spinning on atomics

steven_wu updated this revision to Diff 486933.Jan 6 2023, 10:43 AM

Minor format and test update

This revision was landed with ongoing or failed builds.Oct 6 2023, 1:55 PM
This revision was automatically updated to reflect the committed changes.