mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-13 06:33:56 +00:00
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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2871
This commit is contained in:
@@ -1605,8 +1605,11 @@ void do__set_cancelpend ( ThreadId tid,
|
||||
|
||||
VG_(threads)[cee].cancel_pend = cancelpend_hdlr;
|
||||
|
||||
/* interrupt a pending syscall */
|
||||
VG_(proxy_abort_syscall)(cee);
|
||||
/* 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)) {
|
||||
VG_(sprintf)(msg_buf,
|
||||
|
||||
Reference in New Issue
Block a user