This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Provide thread annotations for shared_mutex
ClosedPublic

Authored by phosek on Nov 8 2018, 8:29 PM.

Details

Summary

shared_mutex was introduced in C++17 but its implementation currently
doesn't use Clang's thread annotations like regular mutex. This change
adds those.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Nov 8 2018, 8:29 PM
ldionne accepted this revision.Nov 9 2018, 8:41 AM
ldionne added inline comments.
libcxx/include/shared_mutex
164 ↗(On Diff #173265)

Just making sure; those are only needed on the declarations?

This revision is now accepted and ready to land.Nov 9 2018, 8:41 AM
phosek marked an inline comment as done.Nov 9 2018, 11:54 AM
phosek added inline comments.
libcxx/include/shared_mutex
164 ↗(On Diff #173265)

Yes

This revision was automatically updated to reflect the committed changes.
phosek marked an inline comment as done.

Shouldn't the attributes be on shared_mutex and shared_timed_mutex, respectively, instead of the internal __shared_mutex_base? Note that the analysis is strictly intraprocedural and doesn't do "inlining".

Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 1:39 PM