mirror of
https://github.com/python/cpython
synced 2024-10-06 14:59:40 +00:00
gh-112535: Update _Py_ThreadId() to support s390/s390x (gh-112751)
This commit is contained in:
parent
e6ac25429f
commit
c744dbe9ac
|
@ -279,6 +279,10 @@ _Py_ThreadId(void)
|
|||
__asm__ ("" : "=r" (tp));
|
||||
tid = tp;
|
||||
#endif
|
||||
#elif defined(__s390__) && defined(__GNUC__)
|
||||
// Both GCC and Clang have supported __builtin_thread_pointer
|
||||
// for s390 from long time ago.
|
||||
tid = (uintptr_t)__builtin_thread_pointer();
|
||||
#else
|
||||
# error "define _Py_ThreadId for this platform"
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue