This patch will address the differences of definition of pthread_t on z/OS vs. Linux and other OS. Main trick to make the code work on z/OS relies on redefining libcpp_thread_id type and _LIBCPP_NULL_THREAD macro. This is necessary to separate initialization of libcxx_thread_id from the one of __libcxx_thread_t;
- Group Reviewers
- rGe6c89a499d91: [SystemZ][ZOS] Fix the usage of pthread_t within libc++
Properly separating __libcpp_thread_t from __libcpp_thread_id seems like a conceptual "bugfix" to me, so I like it.
However, POSIX says of pthread_t:
Used to identify a thread.
It's not much, but I would expect pthread_t to look like a thread ID of some sort, like something you can compare. Are you sure the pthread_t on zOS is conforming?