This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS] Add OPEN_THREAD version of pthread function call
Needs RevisionPublic

Authored by abhina.sreeskantharajan on Feb 16 2022, 12:07 PM.

Details

Reviewers
zibi
muiez
fanbo-meng
ldionne
Mordante
Group Reviewers
Restricted Project
Summary

Enable OPEN_THREAD version of pthread functions on z/OS.

Diff Detail

Event Timeline

abhina.sreeskantharajan requested review of this revision.Feb 16 2022, 12:07 PM
abhina.sreeskantharajan created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2022, 12:07 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
abhina.sreeskantharajan retitled this revision from formatting to [SystemZ][z/OS] Add OPEN_THREAD version of pthread function call.Feb 16 2022, 12:09 PM
abhina.sreeskantharajan edited the summary of this revision. (Show Details)
zibi accepted this revision.Feb 16 2022, 6:54 PM
zibi added a subscriber: zibi.

LGTM, with format suggestion.

libcxx/include/__threading_support
426
abhina.sreeskantharajan marked an inline comment as done.Feb 17 2022, 4:25 AM
zibi accepted this revision.Feb 17 2022, 5:22 AM

LGTM

Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2022, 6:41 AM
philnik added inline comments.
libcxx/include/__threading_support
423

When are __MVS__, __SUSV3_THR and _OPEN_THREADS set? Are they z/OS-specific flags? If not, are they changing the behaviour for other platforms libc++ supports?

ldionne requested changes to this revision.Sep 15 2022, 12:58 PM

Let's try not add obscure platform-specific #ifdefs like that. pthread_getspecific_d8_np doesn't even return something on Google, so this is pretty obscure as far as this open source project is concerned.

This whole code block is under _LIBCPP_HAS_THREAD_API_PTHREAD, and z/OS doesn't seem to support pthread since it's missing these functions. Instead, z/OS should either provide that API, or you can introduce another "threading back-end" other than the pthread or C11 one.

This revision now requires changes to proceed.Sep 15 2022, 12:58 PM