|
From: Tom H. <th...@cy...> - 2004-10-18 18:56:28
|
CVS commit by thughes:
Use tgkill instead of tkill if it is available. This is the newer and
safer kernel interface to signalling a particular thread and it ensures
you can only send a signal to one of your own threads.
M +6 -1 vg_mylibc.c 1.95
--- valgrind/coregrind/vg_mylibc.c #1.94:1.95
@@ -204,5 +204,10 @@ Int VG_(ktkill)( Int tid, Int signo )
Int ret = -VKI_ENOSYS;
+#ifdef __NR_tgkill
+ ret = VG_(do_syscall)(__NR_tgkill, VG_(main_pid), tid, signo);
+#endif /* __NR_tgkill */
+
#ifdef __NR_tkill
+ if (ret == -VKI_ENOSYS)
ret = VG_(do_syscall)(__NR_tkill, tid, signo);
#endif /* __NR_tkill */
|