Added thread_pre_cancel().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8636
This commit is contained in:
Bart Van Assche 2008-09-27 12:26:50 +00:00
parent 16489e15ef
commit a9997c81c7
2 changed files with 10 additions and 0 deletions

View 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

View 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);