]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added thread_pre_cancel().
authorBart Van Assche <bvanassche@acm.org>
Sat, 27 Sep 2008 12:26:50 +0000 (12:26 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 27 Sep 2008 12:26:50 +0000 (12:26 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8636

drd/drd_thread.c
drd/drd_thread.h

index b1d443c58922c3f4741afefbda30db9109199b2a..82b4d86b6f736bf2152cd51e154c6c72d4963235 100644 (file)
@@ -321,6 +321,15 @@ void thread_finished(const DrdThreadId tid)
   }
 }
 
+void thread_pre_cancel(const DrdThreadId tid)
+{
+  tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
+            && tid != DRD_INVALID_THREADID);
+  tl_assert(s_threadinfo[tid].pt_threadid != INVALID_POSIX_THREADID);
+
+  s_threadinfo[tid].synchr_nesting = 0;
+}
+
 void thread_set_pthreadid(const DrdThreadId tid, const PThreadId ptid)
 {
   tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
index c3174321618465030f957993d45de89ce544d87c..895502f8332b0e81f321e36a76dab572d7f6ecf8 100644 (file)
@@ -103,6 +103,7 @@ DrdThreadId thread_pre_create(const DrdThreadId creator,
 DrdThreadId thread_post_create(const ThreadId vg_created);
 void thread_delete(const DrdThreadId tid);
 void thread_finished(const DrdThreadId tid);
+void thread_pre_cancel(const DrdThreadId tid);
 void thread_set_stack_startup(const DrdThreadId tid, const Addr stack_startup);
 Addr thread_get_stack_min(const DrdThreadId tid);
 Addr thread_get_stack_min_min(const DrdThreadId tid);