summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorGabriele N. Tornetta <P403n1x87@users.noreply.github.com>2021-05-26 14:40:14 (GMT)
committerGitHub <noreply@github.com>2021-05-26 14:40:14 (GMT)
commit90a6c07cb20114dda801f027a90df839225751cb (patch)
tree3ed985b2de44bd7bc7a75190a9e9a62e2ed0d7cb /Include/cpython
parent4f725261c6cf23d259e8fdc205e12b76ef4d2d31 (diff)
downloadcpython-90a6c07cb20114dda801f027a90df839225751cb.zip
cpython-90a6c07cb20114dda801f027a90df839225751cb.tar.gz
cpython-90a6c07cb20114dda801f027a90df839225751cb.tar.bz2
bpo-43879: Add native_thread_id field to PyThreadState (GH-25458)
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/pystate.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h
index 63ba600..1049eda 100644
--- a/Include/cpython/pystate.h
+++ b/Include/cpython/pystate.h
@@ -113,6 +113,12 @@ struct _ts {
PyObject *async_exc; /* Asynchronous exception to raise */
unsigned long thread_id; /* Thread id where this tstate was created */
+ /* Native thread id where this tstate was created. This will be 0 except on
+ * those platforms that have the notion of native thread id, for which the
+ * macro PY_HAVE_THREAD_NATIVE_ID is then defined.
+ */
+ unsigned long native_thread_id;
+
int trash_delete_nesting;
PyObject *trash_delete_later;