|
From: Tom H. <th...@cy...> - 2004-10-28 15:57:01
|
CVS commit by thughes:
When a thread is cancelled only abort pending system calls if
the thread is set for asynchronous cancellation and cancellation
is enabled. This fixes a long standing occasional failure in
the pth_cancel2 test.
M +5 -2 vg_scheduler.c 1.193
--- valgrind/coregrind/vg_scheduler.c #1.192:1.193
@@ -1606,6 +1606,9 @@ void do__set_cancelpend ( ThreadId tid,
VG_(threads)[cee].cancel_pend = cancelpend_hdlr;
- /* interrupt a pending syscall */
+ /* interrupt a pending syscall if asynchronous cancellation
+ is enabled for the target thread */
+ if (VG_(threads)[cee].cancel_st && !VG_(threads)[cee].cancel_ty) {
VG_(proxy_abort_syscall)(cee);
+ }
if (VG_(clo_trace_sched)) {
|