Skip to content

Commit 9e2c762

Browse files
committed
Disable uffd for macos
Also for macos use an alternative function for sending signals to threads
1 parent f963de6 commit 9e2c762

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

framework/util/page_guard_manager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include <pthread.h>
4444
#endif
4545

46-
#if defined(WIN32)
46+
#if defined(WIN32) || defined(__APPLE__)
4747
#define USERFAULTFD_SUPPORTED 0
4848
#else
4949
#include <linux/userfaultfd.h>

framework/util/platform.h

+4
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ inline uint64_t GetCurrentThreadId()
280280

281281
inline int SendSignalToThread(pid_t tid, int signal)
282282
{
283+
#ifdef __APPLE__
284+
return pthread_kill(tid, signal);
285+
#else
283286
return syscall(SYS_tgkill, getpid(), tid, signal);
287+
#endif
284288
}
285289

286290
inline void TriggerDebugBreak()

0 commit comments

Comments
 (0)