From 3972c4b37b827e0358b9ef473fb116a22b82cc50 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 17 May 2005 21:10:11 +0000 Subject: [PATCH] minor cleanups git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3764 --- coregrind/core.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/coregrind/core.h b/coregrind/core.h index c5e170bd6..438d80efd 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -35,9 +35,6 @@ #include "tool.h" // tool stuff #include "core_arch.h" // arch-specific stuff, eg. x86/core_arch.h -// Ugly: this is needed by linux/core_os.h -typedef struct _ThreadState ThreadState; - #include "core_platform.h" // platform-specific stuff, // eg. x86-linux/core_platform.h #include "core_os.h" // OS-specific stuff, eg. linux/core_os.h @@ -204,7 +201,7 @@ typedef ThreadArchState; -struct _ThreadState { +typedef struct { /* ThreadId == 0 (and hence vg_threads[0]) is NEVER USED. The thread identity is simply the index in vg_threads[]. ThreadId == 1 is the root thread and has the special property @@ -288,7 +285,9 @@ struct _ThreadState { /* Per-thread jmp_buf to resume scheduler after a signal */ Bool sched_jmpbuf_valid; jmp_buf sched_jmpbuf; -}; +} +ThreadState; + /* The thread table. */ extern ThreadState VG_(threads)[VG_N_THREADS]; @@ -324,7 +323,8 @@ extern Bool VG_(is_exiting)(ThreadId tid); extern Int VG_(count_living_threads)(void); /* Nuke all threads except tid. */ -extern void VG_(nuke_all_threads_except) ( ThreadId me, VgSchedReturnCode reason ); +extern void VG_(nuke_all_threads_except) ( ThreadId me, + VgSchedReturnCode reason ); /* Make a thread the running thread. The thread must previously been sleeping, and not holding the CPU semaphore. This will set the @@ -589,9 +589,6 @@ extern void VG_(unimplemented) ( Char* msg ) /* Something of a function looking for a home ... start up debugger. */ extern void VG_(start_debugger) ( ThreadId tid ); -/* Counts downwards in vg_run_innerloop. */ -extern UInt VG_(dispatch_ctr); - /* Stats ... */ extern void VG_(print_scheduler_stats) ( void );