diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2013-03-23 10:36:16 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <sweskman@gmail.com> | 2013-03-23 10:36:16 (GMT) |
commit | 684cd0e64311faafba989457e28fbf2e84faa62e (patch) | |
tree | c5d7122fb92223ede065f704ac6cffea0ceebd71 /Include/pystate.h | |
parent | d4296fc19c20525215a26ad639be33e7fb53a898 (diff) | |
download | cpython-684cd0e64311faafba989457e28fbf2e84faa62e.zip cpython-684cd0e64311faafba989457e28fbf2e84faa62e.tar.gz cpython-684cd0e64311faafba989457e28fbf2e84faa62e.tar.bz2 |
Issue #17522: Add the PyGILState_Check() API.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r-- | Include/pystate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index 2017b02..b29ce2a 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -212,6 +212,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 |