@@ -2341,20 +2341,20 @@ void
23412341PyEval_SetProfileAllThreads (Py_tracefunc func , PyObject * arg )
23422342{
23432343 PyThreadState * this_tstate = _PyThreadState_GET ();
2344- PyInterpreterState * interp = this_tstate -> interp ;
2344+ PyInterpreterState * interp = this_tstate -> interp ;
23452345
23462346 _PyRuntimeState * runtime = & _PyRuntime ;
2347- HEAD_LOCK ( runtime );
2347+ INTERP_THREAD_LOCK ( interp );
23482348 PyThreadState * ts = PyInterpreterState_ThreadHead (interp );
2349- HEAD_UNLOCK ( runtime );
2349+ INTERP_THREAD_UNLOCK ( interp );
23502350
23512351 while (ts ) {
23522352 if (_PyEval_SetProfile (ts , func , arg ) < 0 ) {
23532353 PyErr_FormatUnraisable ("Exception ignored in PyEval_SetProfileAllThreads" );
23542354 }
2355- HEAD_LOCK ( runtime );
2355+ INTERP_THREAD_LOCK ( interp );
23562356 ts = PyThreadState_Next (ts );
2357- HEAD_UNLOCK ( runtime );
2357+ INTERP_THREAD_UNLOCK ( interp );
23582358 }
23592359}
23602360
@@ -2372,20 +2372,20 @@ void
23722372PyEval_SetTraceAllThreads (Py_tracefunc func , PyObject * arg )
23732373{
23742374 PyThreadState * this_tstate = _PyThreadState_GET ();
2375- PyInterpreterState * interp = this_tstate -> interp ;
2375+ PyInterpreterState * interp = this_tstate -> interp ;
23762376
23772377 _PyRuntimeState * runtime = & _PyRuntime ;
2378- HEAD_LOCK ( runtime );
2378+ INTERP_THREAD_LOCK ( interp );
23792379 PyThreadState * ts = PyInterpreterState_ThreadHead (interp );
2380- HEAD_UNLOCK ( runtime );
2380+ INTERP_THREAD_UNLOCK ( interp );
23812381
23822382 while (ts ) {
23832383 if (_PyEval_SetTrace (ts , func , arg ) < 0 ) {
23842384 PyErr_FormatUnraisable ("Exception ignored in PyEval_SetTraceAllThreads" );
23852385 }
2386- HEAD_LOCK ( runtime );
2386+ INTERP_THREAD_LOCK ( interp );
23872387 ts = PyThreadState_Next (ts );
2388- HEAD_UNLOCK ( runtime );
2388+ INTERP_THREAD_UNLOCK ( interp );
23892389 }
23902390}
23912391
0 commit comments