From: Ben Gras Date: Thu, 11 Dec 2008 14:36:37 +0000 (+0000) Subject: No more HZ; move stacktrace() to library X-Git-Tag: v3.1.4~199 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/processing.js?a=commitdiff_plain;h=3e29947e28ac1cc8b9cd4240750440f688cee931;p=minix.git No more HZ; move stacktrace() to library --- 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); } }