@@ -99,15 +99,6 @@ extern "C" {
9999 _PyCriticalSection_End(&_cs); \
100100 }
101101
102- # define Py_XBEGIN_CRITICAL_SECTION (op ) \
103- { \
104- _PyCriticalSection _cs_opt = {0}; \
105- _PyCriticalSection_XBegin(&_cs_opt, _PyObject_CAST(op))
106-
107- # define Py_XEND_CRITICAL_SECTION () \
108- _PyCriticalSection_XEnd(&_cs_opt); \
109- }
110-
111102# define Py_BEGIN_CRITICAL_SECTION2 (a , b ) \
112103 { \
113104 _PyCriticalSection2 _cs2; \
@@ -144,8 +135,6 @@ extern "C" {
144135# define Py_BEGIN_CRITICAL_SECTION_MUT (mut )
145136# define Py_BEGIN_CRITICAL_SECTION (op )
146137# define Py_END_CRITICAL_SECTION ()
147- # define Py_XBEGIN_CRITICAL_SECTION (op )
148- # define Py_XEND_CRITICAL_SECTION ()
149138# define Py_BEGIN_CRITICAL_SECTION2 (a , b )
150139# define Py_END_CRITICAL_SECTION2 ()
151140# define _Py_CRITICAL_SECTION_ASSERT_MUTEX_LOCKED (mutex )
@@ -202,16 +191,6 @@ _PyCriticalSection_Begin(_PyCriticalSection *c, PyMutex *m)
202191 }
203192}
204193
205- static inline void
206- _PyCriticalSection_XBegin (_PyCriticalSection * c , PyObject * op )
207- {
208- #ifdef Py_GIL_DISABLED
209- if (op != NULL ) {
210- _PyCriticalSection_Begin (c , & _PyObject_CAST (op )-> ob_mutex );
211- }
212- #endif
213- }
214-
215194// Removes the top-most critical section from the thread's stack of critical
216195// sections. If the new top-most critical section is inactive, then it is
217196// resumed.
@@ -234,14 +213,6 @@ _PyCriticalSection_End(_PyCriticalSection *c)
234213 _PyCriticalSection_Pop (c );
235214}
236215
237- static inline void
238- _PyCriticalSection_XEnd (_PyCriticalSection * c )
239- {
240- if (c -> mutex ) {
241- _PyCriticalSection_End (c );
242- }
243- }
244-
245216static inline void
246217_PyCriticalSection2_Begin (_PyCriticalSection2 * c , PyMutex * m1 , PyMutex * m2 )
247218{
0 commit comments