Skip to content

Commit

Permalink
Rename stop-the-world functions
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Dec 18, 2023
1 parent 470298f commit 4f7b6ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Include/internal/pycore_pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ extern void _PyThreadState_Suspend(PyThreadState *tstate);
// them from reattaching until the stop-the-world pause is complete.
//
// NOTE: This is a no-op outside of Py_GIL_DISABLED builds.
extern void _PyRuntimeState_StopTheWorld(_PyRuntimeState *runtime);
extern void _PyRuntimeState_StartTheWorld(_PyRuntimeState *runtime);
extern void _PyEval_StopTheWorldAll(_PyRuntimeState *runtime);
extern void _PyEval_StartTheWorldAll(_PyRuntimeState *runtime);

// Perform a stop-the-world pause for threads in the specified interpreter.
//
// NOTE: This is a no-op outside of Py_GIL_DISABLED builds.
extern void _PyInterpreterState_StopTheWorld(PyInterpreterState *interp);
extern void _PyInterpreterState_StartTheWorld(PyInterpreterState *interp);
extern void _PyEval_StopTheWorld(PyInterpreterState *interp);
extern void _PyEval_StartTheWorld(PyInterpreterState *interp);


static inline void
Expand Down
8 changes: 4 additions & 4 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2055,31 +2055,31 @@ start_the_world(struct _stoptheworld_state *stw)
#endif // Py_GIL_DISABLED

void
_PyRuntimeState_StopTheWorld(_PyRuntimeState *runtime)
_PyEval_StopTheWorldAll(_PyRuntimeState *runtime)
{
#ifdef Py_GIL_DISABLED
stop_the_world(&runtime->stoptheworld);
#endif
}

void
_PyRuntimeState_StartTheWorld(_PyRuntimeState *runtime)
_PyEval_StartTheWorldAll(_PyRuntimeState *runtime)
{
#ifdef Py_GIL_DISABLED
start_the_world(&runtime->stoptheworld);
#endif
}

void
_PyInterpreterState_StopTheWorld(PyInterpreterState *interp)
_PyEval_StopTheWorld(PyInterpreterState *interp)
{
#ifdef Py_GIL_DISABLED
stop_the_world(&interp->stoptheworld);
#endif
}

void
_PyInterpreterState_StartTheWorld(PyInterpreterState *interp)
_PyEval_StartTheWorld(PyInterpreterState *interp)
{
#ifdef Py_GIL_DISABLED
start_the_world(&interp->stoptheworld);
Expand Down

0 comments on commit 4f7b6ce

Please sign in to comment.