[SystemZ][ZOS] Fix the usage of pthread_t within libc++
authorZbigniew Sarbinowski <zibi@ca.ibm.com>
Sat, 5 Dec 2020 00:13:23 +0000 (00:13 +0000)
committerZbigniew Sarbinowski <zibi@ca.ibm.com>
Sat, 5 Dec 2020 17:46:30 +0000 (17:46 +0000)
commite6c89a499d91b5d50ac556428dac995d07f0f6e5
tree79d84d15cd2065e69be8e7007776813a966aedfa
parent8668eae2adf23209e3f8d19477725eb7e73ba93c
[SystemZ][ZOS] Fix the usage of pthread_t within libc++

This is the the minimal change introduced in [[ https://reviews.llvm.org/D88599 | D88599 ]]  to unblock the controversial change and discussion of proper separation between thread from thread id which will continue in D88599.

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;

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D91875
libcxx/include/__config
libcxx/include/__threading_support