Skip to content

Commit

Permalink
GA
Browse files Browse the repository at this point in the history
  • Loading branch information
FI-Mihej committed Mar 31, 2024
1 parent 742d16c commit 1ab4b69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ ELIF (PYXD_UNAME_SYSNAME in ("Linux", "Darwin")) and (PYXD_UNAME_MACHINE in ("x8
void __sync_synchronize()


cdef extern from "stdlib.h" nogil:
void __clear_cache(char* beg, char* end)
# cdef extern from "stdlib.h" nogil:
# void __clear_cache(char* beg, char* end)


cpdef void mm_mfence():
Expand Down Expand Up @@ -202,9 +202,9 @@ ELIF (PYXD_UNAME_SYSNAME in ("Linux", "Darwin")) and (PYXD_UNAME_MACHINE in ("x8
__sync_synchronize()


# An alternative to mm_clflush() in GCC and Clang compilers
cpdef void clear_cache(int beg, int end):
__clear_cache(<char*>beg, <char*>end)
# # An alternative to mm_clflush() in GCC and Clang compilers
# cpdef void clear_cache(int beg, int end):
# __clear_cache(<char*>beg, <char*>end)


full_memory_barrier = mm_mfence
Expand Down Expand Up @@ -253,13 +253,13 @@ ELIF PYXD_UNAME_SYSNAME in ("Linux", "Darwin") and PYXD_UNAME_MACHINE.startswith
__sync_synchronize()


cdef extern from "stdlib.h" nogil:
void __clear_cache(char* beg, char* end)
# cdef extern from "stdlib.h" nogil:
# void __clear_cache(char* beg, char* end)


# An alternative to mm_clflush() for ARM in GCC and Clang compilers
cpdef void clear_cache(int beg, int end):
__clear_cache(<char*>beg, <char*>end)
# # An alternative to mm_clflush() for ARM in GCC and Clang compilers
# cpdef void clear_cache(int beg, int end):
# __clear_cache(<char*>beg, <char*>end)


full_memory_barrier = sync_synchronize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ from cengal_memory_barriers import full_memory_barrier, mm_pause
| mm_clflush(...) | + | | + | | | |
| iso_volatile_store16(...) | | | | + | | |
| py_emscripten_atomic_fence() | | | | | + | |
| clear_cache(...) | + | + | | | | |
| clear_cache(...) | +/- (Linux only) | +/- (Linux only) | | | | |
| py_atomic_thread_fence(...) | + | + | | | + | + |
| py_atomic_thread_fence__*() | + | + | | | + | + |

Expand Down

0 comments on commit 1ab4b69

Please sign in to comment.