aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/pystate.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 2017b0276ff..cd1d7765be0 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -69,6 +69,7 @@ typedef struct _ts PyThreadState;
typedef struct _ts {
/* See Python/ceval.c for comments explaining most fields */
+ struct _ts *prev;
struct _ts *next;
PyInterpreterState *interp;
@@ -139,6 +140,7 @@ PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *);
PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *);
PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *);
PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *);
+PyAPI_FUNC(void) _PyThreadState_DeleteExcept(PyThreadState *tstate);
#ifdef WITH_THREAD
PyAPI_FUNC(void) PyThreadState_DeleteCurrent(void);
PyAPI_FUNC(void) _PyGILState_Reinit(void);
@@ -212,6 +214,11 @@ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE);
*/
PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
+/* Helper/diagnostic function - return 1 if the current thread
+ * currently holds the GIL, 0 otherwise
+ */
+PyAPI_FUNC(int) PyGILState_Check(void);
+
#endif /* #ifdef WITH_THREAD */
/* The implementation of sys._current_frames() Returns a dict mapping