This is an archive of the discontinued LLVM Phabricator instance.

[libcxx][SystemZ][z/OS] Update libcxx/src/memory.cpp to accommodate POSIX(OFF)
AbandonedPublic

Authored by DanielMcIntosh-IBM on Nov 2 2021, 3:46 PM.

Details

Reviewers
jroelofs
bcraig
EricWF
Quuxplusone
ldionne
Group Reviewers
Restricted Project
Summary

Add an early return from __sp_mut::lock() and unlock when we're in a
single-threaded environment to prevent the shared_ptr std::atomic_... overloads
from calling mutex functions when the threading API is disabled.

Depends on D110349

Diff Detail

Event Timeline

DanielMcIntosh-IBM requested review of this revision.Nov 2 2021, 3:46 PM
DanielMcIntosh-IBM created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2021, 3:46 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jroelofs added inline comments.Nov 3 2021, 11:15 AM
libcxx/src/memory.cpp
152

I'd leave the 4-space indentation alone, since that seems to be the local style in the rest of libcxx.

195

micro-optimization: when threading is disabled, always return muts[0].

Update function names as a result of changes to D110349

libcxx/src/memory.cpp
152

arc actually won't let me not change the indentation

Rebase and update indentation to match the rest of the file

DanielMcIntosh-IBM marked an inline comment as done.Nov 8 2021, 11:54 AM
DanielMcIntosh-IBM added inline comments.
libcxx/src/memory.cpp
152

Never mind, just discovered arc's --nolint option