This is an archive of the discontinued LLVM Phabricator instance.

tsan: simplify thread context setting
ClosedPublic

Authored by dvyukov on Sep 21 2021, 1:23 AM.

Details

Summary

Currently we set thr->tctx after OnStarted callback
taking thread registry mutex again and searching for the context.
But OnStarted already runs under the thread registry mutex
and has access to the context, so set it in the OnStarted.
This makes code simpler and faster.

Depends on D110132.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Sep 21 2021, 1:23 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2021, 1:23 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Sep 21 2021, 2:36 AM
This revision is now accepted and ready to land.Sep 21 2021, 2:36 AM
This revision was landed with ongoing or failed builds.Sep 21 2021, 4:26 AM
This revision was automatically updated to reflect the committed changes.