[libcxx-commits] [PATCH] D88599: [SystemZ][ZOS] Porting pthread_t related functionality within libc++ to z/OS
Zbigniew Sarbinowski via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 21 08:55:50 PDT 2020
zibi added subscribers: espositofulvio, rmaprath.
zibi added a comment.
The `'pthread_equal()` was called as intended with `ptread_t` prior to D19412 <https://reviews.llvm.org/D19412> which introduced `__libcpp_thread_id` and used that type on the call to `'pthread_equal`. Unfortunately this change made the assumption that `__libcpp_pthread_t` is same as `__libcpp_pthread_id` which is not the case on z/OS and prompted this discussion and the need for another patch.
In regards to API break pointed by @mclow.lists `__thread_id` had only one member of type `pthread_t` which only after D19412 <https://reviews.llvm.org/D19412> became `__libcpp_pthread_id`. Same is true for `__id_` member of `recursive_timed_mutex`. To me the API was broken at that time and my proposal will revert that. However, I'm not sure if that is the route we want to take.
Up to now only `_LIBCPP_HAS_THREAD_API_EXTERNAL` implementation had different underlying types as follows:
typedef long __libcpp_thread_id;
typedef void* __libcpp_thread_t;
This implementation did not run into the issue we discussing here since it didn't need and did not provide `__libcpp_thread_id_equal`.
Let me ping the original authors @rmaprath, @espositofulvio for input how to proceed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88599/new/
https://reviews.llvm.org/D88599
More information about the libcxx-commits
mailing list