#include "Python.h"
#include "pycore_ceval.h"
#include "pycore_pystate.h"
#include "pycore_structseq.h"
#include "pycore_pythread.h"
#ifndef DONT_HAVE_STDIO_H
# include <stdio.h>
#endif
#include <stdlib.h>
#ifdef _POSIX_THREADS
#define PY_TIMEOUT_MAX_VALUE …
#elif defined (NT_THREADS)
# if 0xFFFFFFFELL < LLONG_MAX / 1000
#define PY_TIMEOUT_MAX_VALUE …
# else
#define PY_TIMEOUT_MAX_VALUE …
# endif
#else
#define PY_TIMEOUT_MAX_VALUE …
#endif
const long long PY_TIMEOUT_MAX = …;
static void PyThread__init_thread(void);
#define initialized …
void
PyThread_init_thread(void)
{ … }
#if defined(HAVE_PTHREAD_STUBS)
#define PYTHREAD_NAME …
# include "thread_pthread_stubs.h"
#elif defined(_USE_PTHREADS)
# if defined(__EMSCRIPTEN__) && !defined(__EMSCRIPTEN_PTHREADS__)
#define PYTHREAD_NAME …
# else
#define PYTHREAD_NAME …
# endif
# include "thread_pthread.h"
#elif defined(NT_THREADS)
#define PYTHREAD_NAME …
# include "thread_nt.h"
#else
# error "Require native threads. See https://bugs.python.org/issue31370"
#endif
size_t
PyThread_get_stacksize(void)
{ … }
int
PyThread_set_stacksize(size_t size)
{ … }
int
PyThread_ParseTimeoutArg(PyObject *arg, int blocking, PY_TIMEOUT_T *timeout_p)
{ … }
PyLockStatus
PyThread_acquire_lock_timed_with_retries(PyThread_type_lock lock,
PY_TIMEOUT_T timeout)
{ … }
Py_tss_t *
PyThread_tss_alloc(void)
{ … }
void
PyThread_tss_free(Py_tss_t *key)
{ … }
int
PyThread_tss_is_created(Py_tss_t *key)
{ … }
PyDoc_STRVAR(threadinfo__doc__,
"sys.thread_info\n\
\n\
A named tuple holding information about the thread implementation.");
static PyStructSequence_Field threadinfo_fields[] = …;
static PyStructSequence_Desc threadinfo_desc = …;
static PyTypeObject ThreadInfoType;
PyObject*
PyThread_GetInfo(void)
{ … }
void
_PyThread_FiniType(PyInterpreterState *interp)
{ … }