From 2b3d8b32860909efdeed21c7a7440c2d6d5e9e37 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 21 Jan 2019 02:21:59 +0000 Subject: [PATCH] [safestack] Remove unsupported platforms llvm-svn: 351716 --- compiler-rt/lib/safestack/safestack_platform.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/compiler-rt/lib/safestack/safestack_platform.h b/compiler-rt/lib/safestack/safestack_platform.h index 8801b20817e8..6b042f4b493c 100644 --- a/compiler-rt/lib/safestack/safestack_platform.h +++ b/compiler-rt/lib/safestack/safestack_platform.h @@ -20,6 +20,10 @@ #include #include +#if !(SANITIZER_NETBSD || SANITIZER_FREEBSD || SANITIZER_LINUX) +#error "Support for your platform has not been implemented" +#endif + #if SANITIZER_NETBSD #include #endif @@ -39,10 +43,6 @@ inline ThreadId GetTid() { long Tid; thr_self(&Tid); return Tid; -#elif SANITIZER_OPENBSD - return syscall(SYS_getthrid); -#elif SANITIZER_SOLARIS - return thr_self(); #else return syscall(SYS_gettid); #endif @@ -52,16 +52,10 @@ inline int TgKill(pid_t pid, ThreadId tid, int sig) { #if SANITIZER_NETBSD (void)pid; return _lwp_kill(tid, sig); -#elif SANITIZER_LINUX - return syscall(SYS_tgkill, pid, tid, sig); #elif SANITIZER_FREEBSD return syscall(SYS_thr_kill2, pid, tid, sig); -#elif SANITIZER_OPENBSD - (void)pid; - return syscall(SYSCALL(thrkill), tid, sig, nullptr); -#elif SANITIZER_SOLARIS - (void)pid; - return thr_kill(tid, sig); +#else + return syscall(SYS_tgkill, pid, tid, sig); #endif }