Page MenuHomePhabricator

Do not use pthread_{get,set}name_np() if we don't have GLIBC.
ClosedPublic

Authored by vkalintiris on Sep 21 2015, 6:30 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

vkalintiris retitled this revision from to Do not use pthread_{get,set}name_np() if we don't have GLIBC..
vkalintiris updated this object.
vkalintiris added reviewers: clayborg, ovyalov.
vkalintiris added a subscriber: lldb-commits.
brucem added a subscriber: brucem.Sep 21 2015, 8:56 AM

This would break this feature on Android, no?

labath added a subscriber: labath.Sep 21 2015, 9:04 AM
labath added inline comments.
source/Host/linux/HostThreadLinux.cpp
44 ↗(On Diff #35248)

While the pthread functions is a glibc extension, the presence of the comm file under /proc definitely does not depend on the C library used. This does not need to be ifdef-ed out.

If you're feeling adventurous, you could reimplement SetName to write to this file and have this functionality regardless of the shared library. If not then ifdef-out the first part only.

vkalintiris updated this revision to Diff 35357.EditedSep 22 2015, 4:01 AM

Addressed reviewers comments. With the updated version we shouldn't break Android.

labath accepted this revision.Sep 22 2015, 4:14 AM
labath added a reviewer: labath.

looks good

This revision is now accepted and ready to land.Sep 22 2015, 4:14 AM
This revision was automatically updated to reflect the committed changes.