From: Nicholas Nethercote Date: Wed, 4 Aug 2004 14:03:16 +0000 (+0000) Subject: is_valid_or_empty_tid() doesn't need to be global. X-Git-Tag: svn/VALGRIND_2_2_0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69a2d35283e91e312ce116888a31982f50741286;p=thirdparty%2Fvalgrind.git is_valid_or_empty_tid() doesn't need to be global. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2567 --- diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h index 28c01ff431..7800061820 100644 --- a/coregrind/vg_include.h +++ b/coregrind/vg_include.h @@ -901,9 +901,6 @@ extern ThreadState VG_(threads)[VG_N_THREADS]; /* Check that tid is in range and denotes a non-Empty thread. */ extern Bool VG_(is_valid_tid) ( ThreadId tid ); -/* Check that tid is in range. */ -extern Bool VG_(is_valid_or_empty_tid) ( ThreadId tid ); - /* Determine if 'tid' is that of the current running thread (Nb: returns False if no thread is currently running. */ extern Bool VG_(is_running_thread)(ThreadId tid); diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 0847c5d119..81843bd1f0 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -125,7 +125,7 @@ Bool VG_(is_valid_tid) ( ThreadId tid ) __inline__ -Bool VG_(is_valid_or_empty_tid) ( ThreadId tid ) +Bool is_valid_or_empty_tid ( ThreadId tid ) { /* tid is unsigned, hence no < 0 test. */ if (tid == 0) return False; @@ -1368,7 +1368,7 @@ void make_thread_jump_to_cancelhdlr ( ThreadId tid ) static void cleanup_after_thread_exited ( ThreadId tid, Bool forcekill ) { - vg_assert(VG_(is_valid_or_empty_tid)(tid)); + vg_assert(is_valid_or_empty_tid(tid)); vg_assert(VG_(threads)[tid].status == VgTs_Empty); /* Its stack is now off-limits */ VG_TRACK( die_mem_stack, VG_(threads)[tid].stack_base, @@ -1864,7 +1864,7 @@ void do__apply_in_new_thread ( ThreadId parent_tid, /* If we've created the main thread's tid, we're in deep trouble :) */ vg_assert(tid != 1); - vg_assert(VG_(is_valid_or_empty_tid)(tid)); + vg_assert(is_valid_or_empty_tid(tid)); /* do this early, before the child gets any memory writes */ VG_TRACK ( post_thread_create, parent_tid, tid ); @@ -2649,7 +2649,7 @@ void do_pthread_getspecific_ptr ( ThreadId tid ) print_pthread_event(tid, msg_buf); } - vg_assert(VG_(is_valid_or_empty_tid)(tid)); + vg_assert(is_valid_or_empty_tid(tid)); if (VG_(threads)[tid].status == VgTs_Empty) { SET_PTHREQ_RETVAL(tid, 1); @@ -3342,7 +3342,7 @@ void scheduler_sanity ( void ) for(top = timeouts; top != NULL; top = top->next) { vg_assert(top->time >= lasttime); - vg_assert(VG_(is_valid_or_empty_tid)(top->tid)); + vg_assert(is_valid_or_empty_tid(top->tid)); #if 0 /* assert timeout entry is either stale, or associated with a