mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-17 15:31:50 +02:00
Fix previous commit...
true/false leftover from C++
This commit is contained in:
@@ -145,7 +145,7 @@ void* allocMemoryPages(size_t bytes) {
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(false);
|
||||
pthread_jit_write_protect_np(0);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -170,7 +170,7 @@ void setPagesRW(void* ptr, size_t bytes) {
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(false);
|
||||
pthread_jit_write_protect_np(0);
|
||||
} else {
|
||||
pageProtect(ptr, bytes, PAGE_READWRITE, &errfunc);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void setPagesRX(void* ptr, size_t bytes) {
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(true);
|
||||
pthread_jit_write_protect_np(1);
|
||||
} else {
|
||||
pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user