Unverified Kaydet (Commit) 31368a4f authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-35081: Move Include/pyatomic.c to Include/internal/ (GH-10239)

Add pyatomic.h to the VS project (it wasn't referenced).
üst 9204fb86
...@@ -53,8 +53,6 @@ ...@@ -53,8 +53,6 @@
#include "pyport.h" #include "pyport.h"
#include "pymacro.h" #include "pymacro.h"
#include "pyatomic.h"
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG. /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
* PYMALLOC_DEBUG is in error if pymalloc is not in use. * PYMALLOC_DEBUG is in error if pymalloc is not in use.
*/ */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
extern "C" { extern "C" {
#endif #endif
#include "pyatomic.h" #include "internal/pyatomic.h"
#include "pythread.h" #include "pythread.h"
struct _pending_calls { struct _pending_calls {
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
extern "C" { extern "C" {
#endif #endif
#include "pyatomic.h"
#include "internal/condvar.h" #include "internal/condvar.h"
#include "internal/pyatomic.h"
#ifndef Py_HAVE_CONDVAR #ifndef Py_HAVE_CONDVAR
#error You need either a POSIX-compatible or a Windows system! # error You need either a POSIX-compatible or a Windows system!
#endif #endif
/* Enable if you want to force the switching of threads at least /* Enable if you want to force the switching of threads at least
......
#ifndef Py_ATOMIC_H #ifndef Py_ATOMIC_H
#define Py_ATOMIC_H #define Py_ATOMIC_H
#ifdef Py_BUILD_CORE #ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "Py_BUILD_CORE must be defined to include this header"
#endif
#include "dynamic_annotations.h" #include "dynamic_annotations.h"
...@@ -531,5 +537,8 @@ typedef struct _Py_atomic_int { ...@@ -531,5 +537,8 @@ typedef struct _Py_atomic_int {
_Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, _Py_memory_order_relaxed) _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, _Py_memory_order_relaxed)
#define _Py_atomic_load_relaxed(ATOMIC_VAL) \ #define _Py_atomic_load_relaxed(ATOMIC_VAL) \
_Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed) _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
#endif /* Py_BUILD_CORE */
#ifdef __cplusplus
}
#endif
#endif /* Py_ATOMIC_H */ #endif /* Py_ATOMIC_H */
...@@ -5,7 +5,6 @@ extern "C" { ...@@ -5,7 +5,6 @@ extern "C" {
#endif #endif
#include "pystate.h" #include "pystate.h"
#include "pyatomic.h"
#include "pythread.h" #include "pythread.h"
#include "internal/mem.h" #include "internal/mem.h"
......
...@@ -988,7 +988,6 @@ PYTHON_HEADERS= \ ...@@ -988,7 +988,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pgen.h \ $(srcdir)/Include/pgen.h \
$(srcdir)/Include/pgenheaders.h \ $(srcdir)/Include/pgenheaders.h \
$(srcdir)/Include/pyarena.h \ $(srcdir)/Include/pyarena.h \
$(srcdir)/Include/pyatomic.h \
$(srcdir)/Include/pycapsule.h \ $(srcdir)/Include/pycapsule.h \
$(srcdir)/Include/pyctype.h \ $(srcdir)/Include/pyctype.h \
$(srcdir)/Include/pydebug.h \ $(srcdir)/Include/pydebug.h \
...@@ -1029,6 +1028,7 @@ PYTHON_HEADERS= \ ...@@ -1029,6 +1028,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/ceval.h \ $(srcdir)/Include/internal/ceval.h \
$(srcdir)/Include/internal/gil.h \ $(srcdir)/Include/internal/gil.h \
$(srcdir)/Include/internal/mem.h \ $(srcdir)/Include/internal/mem.h \
$(srcdir)/Include/internal/pyatomic.h \
$(srcdir)/Include/internal/pygetopt.h \ $(srcdir)/Include/internal/pygetopt.h \
$(srcdir)/Include/internal/pystate.h \ $(srcdir)/Include/internal/pystate.h \
$(srcdir)/Include/internal/context.h \ $(srcdir)/Include/internal/context.h \
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
/* XXX Signals should be recorded per thread, now we have thread state. */ /* XXX Signals should be recorded per thread, now we have thread state. */
#include "Python.h" #include "Python.h"
#include "internal/pyatomic.h"
#ifndef MS_WINDOWS #ifndef MS_WINDOWS
#include "posixmodule.h" #include "posixmodule.h"
#endif #endif
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<ClInclude Include="..\Include\internal\gil.h" /> <ClInclude Include="..\Include\internal\gil.h" />
<ClInclude Include="..\Include\internal\hamt.h" /> <ClInclude Include="..\Include\internal\hamt.h" />
<ClInclude Include="..\Include\internal\mem.h" /> <ClInclude Include="..\Include\internal\mem.h" />
<ClInclude Include="..\Include\internal\pyatomic.h" />
<ClInclude Include="..\Include\internal\pystate.h" /> <ClInclude Include="..\Include\internal\pystate.h" />
<ClInclude Include="..\Include\internal\warnings.h" /> <ClInclude Include="..\Include\internal\warnings.h" />
<ClInclude Include="..\Include\intrcheck.h" /> <ClInclude Include="..\Include\intrcheck.h" />
......
...@@ -153,6 +153,9 @@ ...@@ -153,6 +153,9 @@
<ClInclude Include="..\Include\internal\mem.h"> <ClInclude Include="..\Include\internal\mem.h">
<Filter>Include</Filter> <Filter>Include</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\internal\pyatomic.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pystate.h"> <ClInclude Include="..\Include\internal\pystate.h">
<Filter>Include</Filter> <Filter>Include</Filter>
</ClInclude> </ClInclude>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "internal/pyatomic.h"
/* First some general settings */ /* First some general settings */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment