This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add GNU extension functions pthread_setname_np and pthread_getname_np.
ClosedPublic

Authored by sivachandra on Aug 1 2022, 12:39 AM.

Diff Detail

Event Timeline

sivachandra created this revision.Aug 1 2022, 12:39 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 1 2022, 12:39 AM
sivachandra requested review of this revision.Aug 1 2022, 12:39 AM
michaelrj added inline comments.Aug 1 2022, 1:50 PM
libc/spec/spec.td
110

would it be reasonable to make the gnu extensions depend on the posix extensions instead of moving this to the global types?

sivachandra added inline comments.Aug 1 2022, 4:05 PM
libc/spec/spec.td
110

I suppose you mean that we should include posix.td in gnu.td? I think that is a fair concern in this particular case as this particular GNU extension is actually an extension of the POSIX standard. But, that is not the case in general. Also, the .td files are like the header files. So, say posix.td includes stdc.td and gnu_ext.td also includes stdc.td, then a config including posix,td, gnu_ext.td and stdc.td will get duplicate/triplicate definitions. Even if we have something like a header-guard to avoid such duplicates, what will happen is that a config wanting, say only the GNU extensions, will also see the POSIX extensions.

michaelrj accepted this revision.Aug 1 2022, 4:12 PM

LGTM

libc/spec/spec.td
110

I see, in that case this is fine.

This revision is now accepted and ready to land.Aug 1 2022, 4:12 PM
lntue accepted this revision.Aug 1 2022, 6:24 PM