diff options
author | Sam Gross <colesbury@gmail.com> | 2024-06-21 20:20:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-21 20:20:41 (GMT) |
commit | 4dc27bc0b76aa5985ccef2901f7a4f5d36b97995 (patch) | |
tree | 3219748fd1c47dec959096aed7457cf1fad5d43a /PCbuild | |
parent | e748805f2a0f783723ef02809f86cd3d8fb8bf2e (diff) | |
download | cpython-4dc27bc0b76aa5985ccef2901f7a4f5d36b97995.zip cpython-4dc27bc0b76aa5985ccef2901f7a4f5d36b97995.tar.gz cpython-4dc27bc0b76aa5985ccef2901f7a4f5d36b97995.tar.bz2 |
[3.13] gh-119344: Make critical section API public (GH-119353) (#120856)
This makes the following macros public as part of the non-limited C-API for
locking a single object or two objects at once.
* `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()`
* `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()`
The supporting functions and structs used by the macros are also exposed for
cases where C macros are not available.
(cherry picked from commit 8f17d69b7bc906e8407095317842cc0fd52cd84a)
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pythoncore.vcxproj | 2 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj.filters | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index a415d45..6edcef7 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -135,6 +135,7 @@ <ClInclude Include="..\Include\codecs.h" /> <ClInclude Include="..\Include\compile.h" /> <ClInclude Include="..\Include\complexobject.h" /> + <ClInclude Include="..\Include\critical_section.h" /> <ClInclude Include="..\Include\cpython\abstract.h" /> <ClInclude Include="..\Include\cpython\bytearrayobject.h" /> <ClInclude Include="..\Include\cpython\bytesobject.h" /> @@ -145,6 +146,7 @@ <ClInclude Include="..\Include\cpython\compile.h" /> <ClInclude Include="..\Include\cpython\complexobject.h" /> <ClInclude Include="..\Include\cpython\context.h" /> + <ClInclude Include="..\Include\cpython\critical_section.h" /> <ClInclude Include="..\Include\cpython\descrobject.h" /> <ClInclude Include="..\Include\cpython\dictobject.h" /> <ClInclude Include="..\Include\cpython\fileobject.h" /> diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 2048d9a..824648e 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -72,6 +72,9 @@ <ClInclude Include="..\Include\complexobject.h"> <Filter>Include</Filter> </ClInclude> + <ClInclude Include="..\Include\critical_section.h"> + <Filter>Include</Filter> + </ClInclude> <ClInclude Include="..\Include\datetime.h"> <Filter>Include</Filter> </ClInclude> @@ -375,6 +378,9 @@ <ClInclude Include="..\Include\cpython\context.h"> <Filter>Include\cpython</Filter> </ClInclude> + <ClInclude Include="..\Include\cpython\critical_section.h"> + <Filter>Include\cpython</Filter> + </ClInclude> <ClInclude Include="..\Include\cpython\descrobject.h"> <Filter>Include\cpython</Filter> </ClInclude> |