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
dea8da4d
Commit
dea8da4d
authored
Jun 20, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-blocking lock macros injection in builtins
parent
021cf638
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+3
-0
No files found.
Cython/Compiler/Builtin.py
View file @
dea8da4d
...
...
@@ -427,6 +427,9 @@ def inject_cypclass_lock_macros():
blocking_macro_type
=
PyrexTypes
.
CFuncType
(
PyrexTypes
.
c_void_type
,
[
PyrexTypes
.
CFuncTypeArg
(
"obj"
,
PyrexTypes
.
cy_object_type
,
None
)],
nogil
=
1
)
for
macro
in
(
"Cy_RLOCK"
,
"Cy_WLOCK"
,
"Cy_UNLOCK"
):
builtin_scope
.
declare_builtin_cfunction
(
macro
,
blocking_macro_type
,
macro
)
nonblocking_macro_type
=
PyrexTypes
.
CFuncType
(
PyrexTypes
.
c_int_type
,
[
PyrexTypes
.
CFuncTypeArg
(
"obj"
,
PyrexTypes
.
cy_object_type
,
None
)],
nogil
=
1
)
for
macro
in
(
"Cy_TRYRLOCK"
,
"Cy_TRYWLOCK"
):
builtin_scope
.
declare_builtin_cfunction
(
macro
,
nonblocking_macro_type
,
macro
)
def
init_builtins
():
init_builtin_structs
()
...
...
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