From 3e29947e28ac1cc8b9cd4240750440f688cee931 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Thu, 11 Dec 2008 14:36:37 +0000 Subject: [PATCH] No more HZ; move stacktrace() to library --- lib/sysutil/Makefile.in | 1 + lib/sysutil/micro_delay.c | 3 +-- lib/sysutil/sys_hz.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sysutil/Makefile.in b/lib/sysutil/Makefile.in index 3082a1909..3cd2866ce 100644 --- a/lib/sysutil/Makefile.in +++ b/lib/sysutil/Makefile.in @@ -22,6 +22,7 @@ libsys_FILES=" \ taskcall.c \ read_tsc.s \ read_tsc_64.c \ + ser_putc.c \ stacktrace.c \ sys_hz.c \ profile_extern.c \ diff --git a/lib/sysutil/micro_delay.c b/lib/sysutil/micro_delay.c index 773897943..b549510f9 100644 --- a/lib/sysutil/micro_delay.c +++ b/lib/sysutil/micro_delay.c @@ -32,8 +32,7 @@ micro_delay_calibrate(void) unsigned long t = 0; /* Get HZ. */ - if(sys_getinfo(GET_HZ, &Hz, sizeof(Hz), 0, 0) != OK) - Hz = HZ; + Hz = sys_hz(); /* Wait for clock to tick. */ while(!t || (t == times(&tms))) diff --git a/lib/sysutil/sys_hz.c b/lib/sysutil/sys_hz.c index 10130175e..ad6463121 100644 --- a/lib/sysutil/sys_hz.c +++ b/lib/sysutil/sys_hz.c @@ -19,7 +19,7 @@ sys_hz(void) int r; /* Get HZ. */ if((r=sys_getinfo(GET_HZ, &Hz, sizeof(Hz), 0, 0)) != OK) { - Hz = HZ; + Hz = DEFAULT_HZ; printf("sys_hz: %d: reverting to HZ = %d\n", r, Hz); } } -- 2.44.0