FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-35081: Move Include/pyatomic.c to Include/internal/ by vstinner · Pull Request #10239 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .filters  (1) .h  (6) .in  (1) .vcxproj  (1) All 5 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 0 additions & 2 deletions Include/Python.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
#include "pyport.h"
#include "pymacro.h"

#include "pyatomic.h"

/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
* PYMALLOC_DEBUG is in error if pymalloc is not in use.
*/
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/ceval.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
extern "C" {
#endif

#include "pyatomic.h"
#include "internal/pyatomic.h"
#include "pythread.h"

struct _pending_calls {
Expand Down
6 changes: 3 additions & 3 deletions Include/internal/gil.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
extern "C" {
#endif

#include "pyatomic.h"

#include "internal/condvar.h"
#include "internal/pyatomic.h"

#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

/* Enable if you want to force the switching of threads at least
Expand Down
13 changes: 11 additions & 2 deletions Include/pyatomic.h → Include/internal/pyatomic.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef 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"

Expand Down Expand Up @@ -531,5 +537,8 @@ typedef struct _Py_atomic_int {
_Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, _Py_memory_order_relaxed)
#define _Py_atomic_load_relaxed(ATOMIC_VAL) \
_Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
#endif /* Py_BUILD_CORE */

#ifdef __cplusplus
}
#endif
#endif /* Py_ATOMIC_H */
1 change: 0 additions & 1 deletion Include/internal/pystate.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ extern "C" {
#endif

#include "pystate.h"
#include "pyatomic.h"
#include "pythread.h"

#include "internal/mem.h"
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pgen.h \
$(srcdir)/Include/pgenheaders.h \
$(srcdir)/Include/pyarena.h \
$(srcdir)/Include/pyatomic.h \
$(srcdir)/Include/pycapsule.h \
$(srcdir)/Include/pyctype.h \
$(srcdir)/Include/pydebug.h \
Expand Down Expand Up @@ -1029,6 +1028,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/ceval.h \
$(srcdir)/Include/internal/gil.h \
$(srcdir)/Include/internal/mem.h \
$(srcdir)/Include/internal/pyatomic.h \
$(srcdir)/Include/internal/pygetopt.h \
$(srcdir)/Include/internal/pystate.h \
$(srcdir)/Include/internal/context.h \
Expand Down
2 changes: 2 additions & 0 deletions Modules/signalmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/* XXX Signals should be recorded per thread, now we have thread state. */

#include "Python.h"
#include "internal/pyatomic.h"

#ifndef MS_WINDOWS
#include "posixmodule.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions PCbuild/pythoncore.vcxproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<ClInclude Include="..\Include\internal\gil.h" />
<ClInclude Include="..\Include\internal\hamt.h" />
<ClInclude Include="..\Include\internal\mem.h" />
<ClInclude Include="..\Include\internal\pyatomic.h" />
<ClInclude Include="..\Include\internal\pystate.h" />
<ClInclude Include="..\Include\internal\warnings.h" />
<ClInclude Include="..\Include\intrcheck.h" />
Expand Down
3 changes: 3 additions & 0 deletions PCbuild/pythoncore.vcxproj.filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@
<ClInclude Include="..\Include\internal\mem.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pyatomic.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pystate.h">
<Filter>Include</Filter>
</ClInclude>
Expand Down
1 change: 1 addition & 0 deletions Python/ceval_gil.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdlib.h>
#include <errno.h>

#include "internal/pyatomic.h"

/* First some general settings */

Expand Down

Back | FazBrowse Home | New Git URL