]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
is_valid_or_empty_tid() doesn't need to be global.
authorNicholas Nethercote <n.nethercote@gmail.com>
Wed, 4 Aug 2004 14:03:16 +0000 (14:03 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Wed, 4 Aug 2004 14:03:16 +0000 (14:03 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2567

coregrind/vg_include.h
coregrind/vg_scheduler.c

index 28c01ff431a8d02e45a7148f276afa30fd30412b..780006182064d9f40a03373fdf2daa818cb7ed10 100644 (file)
@@ -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);
index 0847c5d119b0bda995ff6247d3055305b6b7c93b..81843bd1f05726081d28bad9ed943b8eb581ef02 100644 (file)
@@ -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