This is an archive of the discontinued LLVM Phabricator instance.

tsan: use pthread_equal instead of direct pthread_t comparison
ClosedPublic

Authored by dvyukov on Nov 15 2021, 10:47 AM.

Details

Summary

man pthread_equal:

The pthread_equal() function is necessary because thread IDs
should be considered opaque: there is no portable way for
applications to directly compare two pthread_t values.

Depends on D113916.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Nov 15 2021, 10:47 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2021, 10:47 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Nov 15 2021, 12:58 PM
This revision is now accepted and ready to land.Nov 15 2021, 12:58 PM