From 074e5ed974be65fbcfe75a4c0529dbc53f13446f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 10 Nov 2009 19:50:40 +0000 Subject: Merge in the new GIL. --- Include/ceval.h | 8 ++++---- Include/pystate.h | 2 ++ Include/sysmodule.h | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'Include') diff --git a/Include/ceval.h b/Include/ceval.h index 7bd8179e76..a48d23c143 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -112,10 +112,6 @@ PyAPI_FUNC(PyObject *) PyEval_GetCallStats(PyObject *); PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *); PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(struct _frame *f, int exc); -/* this used to be handled on a per-thread basis - now just two globals */ -PyAPI_DATA(volatile int) _Py_Ticker; -PyAPI_DATA(int) _Py_CheckInterval; - /* Interface for threads. A module that plans to do a blocking system call (or something else @@ -174,6 +170,9 @@ PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate); PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate); PyAPI_FUNC(void) PyEval_ReInitThreads(void); +PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); +PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); + #define Py_BEGIN_ALLOW_THREADS { \ PyThreadState *_save; \ _save = PyEval_SaveThread(); @@ -192,6 +191,7 @@ PyAPI_FUNC(void) PyEval_ReInitThreads(void); #endif /* !WITH_THREAD */ PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); +PyAPI_FUNC(void) _PyEval_SignalAsyncExc(void); #ifdef __cplusplus diff --git a/Include/pystate.h b/Include/pystate.h index e02df88f8c..c27e82735a 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -88,6 +88,8 @@ typedef struct _ts { PyObject *dict; /* Stores per-thread state */ + /* XXX doesn't mean anything anymore (the comment below is obsolete) + => deprecate or remove? */ /* tick_counter is incremented whenever the check_interval ticker * reaches zero. The purpose is to give a useful measure of the number * of interpreted bytecode instructions in a given thread. This diff --git a/Include/sysmodule.h b/Include/sysmodule.h index eeb8619df9..5078fe0d06 100644 --- a/Include/sysmodule.h +++ b/Include/sysmodule.h @@ -18,7 +18,6 @@ PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_DATA(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; -PyAPI_DATA(int) _PySys_CheckInterval; PyAPI_FUNC(void) PySys_ResetWarnOptions(void); PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); -- cgit v1.2.1