mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
GH-131238: More refactoring of core header files (GH-131351)
Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.
This commit is contained in:
parent
bb0268f60d
commit
a45f25361d
51 changed files with 264 additions and 187 deletions
|
@ -100,9 +100,6 @@ extern void _PyInterpreterState_SetWhence(
|
|||
PyInterpreterState *interp,
|
||||
long whence);
|
||||
|
||||
extern const PyConfig* _PyInterpreterState_GetConfig(PyInterpreterState *interp);
|
||||
|
||||
|
||||
/*
|
||||
Runtime Feature Flags
|
||||
|
||||
|
@ -137,23 +134,6 @@ PyAPI_FUNC(PyStatus) _PyInterpreterState_New(
|
|||
PyThreadState *tstate,
|
||||
PyInterpreterState **pinterp);
|
||||
|
||||
|
||||
#define RARE_EVENT_INTERP_INC(interp, name) \
|
||||
do { \
|
||||
/* saturating add */ \
|
||||
int val = FT_ATOMIC_LOAD_UINT8_RELAXED(interp->rare_events.name); \
|
||||
if (val < UINT8_MAX) { \
|
||||
FT_ATOMIC_STORE_UINT8(interp->rare_events.name, val + 1); \
|
||||
} \
|
||||
RARE_EVENT_STAT_INC(name); \
|
||||
} while (0); \
|
||||
|
||||
#define RARE_EVENT_INC(name) \
|
||||
do { \
|
||||
PyInterpreterState *interp = PyInterpreterState_Get(); \
|
||||
RARE_EVENT_INTERP_INC(interp, name); \
|
||||
} while (0); \
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue