File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ extern int _PyEval_ThreadsInitialized(void);
100
100
extern PyStatus _PyEval_InitGIL (PyThreadState * tstate , int own_gil );
101
101
extern void _PyEval_FiniGIL (PyInterpreterState * interp );
102
102
103
+ extern void _PyEval_AcquireLock (PyThreadState * tstate );
103
104
extern void _PyEval_ReleaseLock (PyThreadState * tstate );
104
105
105
106
extern void _PyEval_DeactivateOpCache (void );
Original file line number Diff line number Diff line change @@ -609,9 +609,17 @@ PyEval_ReleaseLock(void)
609
609
drop_gil (ceval , tstate );
610
610
}
611
611
612
+ void
613
+ _PyEval_AcquireLock (PyThreadState * tstate )
614
+ {
615
+ _Py_EnsureTstateNotNULL (tstate );
616
+ take_gil (tstate );
617
+ }
618
+
612
619
void
613
620
_PyEval_ReleaseLock (PyThreadState * tstate )
614
621
{
622
+ _Py_EnsureTstateNotNULL (tstate );
615
623
struct _ceval_state * ceval = & tstate -> interp -> ceval ;
616
624
drop_gil (ceval , tstate );
617
625
}
You can’t perform that action at this time.
0 commit comments