[compiler-rt] r351716 - [safestack] Remove unsupported platforms
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 20 18:21:59 PST 2019
Author: vitalybuka
Date: Sun Jan 20 18:21:59 2019
New Revision: 351716
URL: http://llvm.org/viewvc/llvm-project?rev=351716&view=rev
Log:
[safestack] Remove unsupported platforms
Modified:
compiler-rt/trunk/lib/safestack/safestack_platform.h
Modified: compiler-rt/trunk/lib/safestack/safestack_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/safestack/safestack_platform.h?rev=351716&r1=351715&r2=351716&view=diff
==============================================================================
--- compiler-rt/trunk/lib/safestack/safestack_platform.h (original)
+++ compiler-rt/trunk/lib/safestack/safestack_platform.h Sun Jan 20 18:21:59 2019
@@ -20,6 +20,10 @@
#include <sys/types.h>
#include <unistd.h>
+#if !(SANITIZER_NETBSD || SANITIZER_FREEBSD || SANITIZER_LINUX)
+#error "Support for your platform has not been implemented"
+#endif
+
#if SANITIZER_NETBSD
#include <lwp.h>
#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 ti
#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
}
More information about the llvm-commits
mailing list