Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
07115e3f
Commit
07115e3f
authored
Oct 16, 2017
by
sonots
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TSS (Thread Specific Storage) API in CPython 3.7+
parent
0331c8d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Cython/Includes/cpython/pythread.pxd
Cython/Includes/cpython/pythread.pxd
+13
-1
No files found.
Cython/Includes/cpython/pythread.pxd
View file @
07115e3f
...
@@ -29,7 +29,7 @@ cdef extern from "pythread.h":
...
@@ -29,7 +29,7 @@ cdef extern from "pythread.h":
size_t
PyThread_get_stacksize
()
size_t
PyThread_get_stacksize
()
int
PyThread_set_stacksize
(
size_t
)
int
PyThread_set_stacksize
(
size_t
)
# Thread Local Storage (TLS) API
# Thread Local Storage (TLS) API
deprecated in CPython 3.7+
int
PyThread_create_key
()
int
PyThread_create_key
()
void
PyThread_delete_key
(
int
)
void
PyThread_delete_key
(
int
)
int
PyThread_set_key_value
(
int
,
void
*
)
int
PyThread_set_key_value
(
int
,
void
*
)
...
@@ -38,3 +38,15 @@ cdef extern from "pythread.h":
...
@@ -38,3 +38,15 @@ cdef extern from "pythread.h":
# Cleanup after a fork
# Cleanup after a fork
void
PyThread_ReInitTLS
()
void
PyThread_ReInitTLS
()
# Thread Specific Storage (TSS) API in CPython 3.7+
ctypedef
struct
Py_tss_t
:
pass
Py_tss_t
Py_tss_NEEDS_INIT
Py_tss_t
*
PyThread_tss_alloc
()
void
PyThread_tss_free
(
Py_tss_t
*
key
)
int
PyThread_tss_is_created
(
Py_tss_t
*
key
)
int
PyThread_tss_create
(
Py_tss_t
*
key
)
void
PyThread_tss_delete
(
Py_tss_t
*
key
)
int
PyThread_tss_set
(
Py_tss_t
*
key
,
void
*
value
)
void
*
PyThread_tss_get
(
Py_tss_t
*
key
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment