[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    valgrind/coregrind
From:       Tom Hughes <thh () cyberscience ! com>
Date:       2004-10-18 18:56:26
Message-ID: 20041018185626.25C4316C15 () office ! kde ! org
[Download RAW message or body]

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 */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic