From: <sv...@va...> - 2008-09-27 12:36:52
|
Author: bart Date: 2008-09-27 13:36:48 +0100 (Sat, 27 Sep 2008) New Revision: 8639 Log: Added client requests related to pthread_cancel(). Modified: trunk/drd/drd_clientreq.c trunk/drd/drd_clientreq.h Modified: trunk/drd/drd_clientreq.c =================================================================== --- trunk/drd/drd_clientreq.c 2008-09-27 12:36:13 UTC (rev 8638) +++ trunk/drd/drd_clientreq.c 2008-09-27 12:36:48 UTC (rev 8639) @@ -210,6 +210,16 @@ PtThreadIdToDrdThreadId(arg[1])); break; + case VG_USERREQ__PRE_THREAD_CANCEL: + tl_assert(arg[1]); + drd_pre_thread_cancel(drd_tid, PtThreadIdToDrdThreadId(arg[1])); + break; + + case VG_USERREQ__POST_THREAD_CANCEL: + tl_assert(arg[1]); + drd_post_thread_cancel(drd_tid, PtThreadIdToDrdThreadId(arg[1]), arg[2]); + break; + case VG_USERREQ__PRE_MUTEX_INIT: if (thread_enter_synchr(drd_tid) == 0) drd_pre_mutex_init(arg[1], arg[2]); Modified: trunk/drd/drd_clientreq.h =================================================================== --- trunk/drd/drd_clientreq.h 2008-09-27 12:36:13 UTC (rev 8638) +++ trunk/drd/drd_clientreq.h 2008-09-27 12:36:48 UTC (rev 8639) @@ -59,6 +59,13 @@ VG_USERREQ__POST_THREAD_JOIN, /* args: pthread_t (joinee) */ + /* To notify drd before a pthread_cancel call. */ + VG_USERREQ__PRE_THREAD_CANCEL, + /* args: pthread_t */ + /* To notify drd after a pthread_cancel call. */ + VG_USERREQ__POST_THREAD_CANCEL, + /* args: pthread_t, Bool */ + /* to notify the drd tool of a pthread_mutex_init call. */ VG_USERREQ__PRE_MUTEX_INIT, /* args: Addr, MutexT */ |