2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>

* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c,
	libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-monitor.c,
	libmisc/serdbg/serdbg.c, libmisc/serdbg/serdbg.h,
	libnetworking/netinet/in_cksum_powerpc.h, shttpd/compat_rtems.h: Fix
	warnings.
This commit is contained in:
Joel Sherrill
2008-08-18 21:16:42 +00:00
parent 6bb1d1a228
commit 1487880d2c
9 changed files with 31 additions and 12 deletions

View File

@@ -35,21 +35,26 @@ static void CPU_usage_Per_thread_handler(
#endif
}
/*
* External data that is shared by cpu usage code but not declared in .h files.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
extern struct timespec CPU_usage_Uptime_at_last_reset;
#else
extern uint32_t CPU_usage_Ticks_at_last_reset;
#endif
/*
* rtems_cpu_usage_reset
*/
void rtems_cpu_usage_reset( void )
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
extern struct timespec CPU_usage_Uptime_at_last_reset;
_TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
_Thread_Time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
#else
extern uint32_t CPU_usage_Ticks_at_last_reset;
CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
#endif
rtems_iterate_over_all_threads(CPU_usage_Per_thread_handler);