From: <sv...@va...> - 2009-03-20 17:56:52
|
Author: sewardj Date: 2009-03-20 17:56:34 +0000 (Fri, 20 Mar 2009) New Revision: 9473 Log: * handle sys___pthread_canceled (perhaps wrongly) * add a comment to PRE(sys___pthread_sigmask) Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c =================================================================== --- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-03-20 17:54:36 UTC (rev 9472) +++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-03-20 17:56:34 UTC (rev 9473) @@ -1547,6 +1547,8 @@ PRE(sys___pthread_sigmask) { // GrP fixme + // JRS: arguments are identical to sigprocmask + // (how, sigset_t*, sigset_t*). Perhaps behave identically? static Bool warned; if (!warned && VG_(clo_trace_unknown_syscalls)) { VG_(printf)("UNKNOWN __pthread_sigmask is unsupported. " @@ -1557,6 +1559,16 @@ } +PRE(sys___pthread_canceled) +{ + *flags |= SfMayBlock; /* might kill this thread??? */ + /* I don't think so -- I think it just changes the cancellation + state. But taking no chances. */ + PRINT("__pthread_canceled ( %ld )", ARG1); + PRE_REG_READ1(long, "__pthread_canceled", void*, arg1); +} + + PRE(sys___pthread_markcancel) { *flags |= SfMayBlock; /* might kill this thread??? */ @@ -7126,7 +7138,7 @@ // _____(__NR___sigwait), MACX_(__NR___disable_threadsignal, sys___disable_threadsignal), MACX_(__NR___pthread_markcancel, sys___pthread_markcancel), -// (__NR___pthread_canceled), + MACX_(__NR___pthread_canceled, sys___pthread_canceled), MACX_(__NR___semwait_signal, sys___semwait_signal), _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(335)), // old utrace // _____(__NR_proc_info), |