]> Zhao Yanbai Git Server - minix.git/commitdiff
No more HZ; move stacktrace() to library
authorBen Gras <ben@minix3.org>
Thu, 11 Dec 2008 14:36:37 +0000 (14:36 +0000)
committerBen Gras <ben@minix3.org>
Thu, 11 Dec 2008 14:36:37 +0000 (14:36 +0000)
lib/sysutil/Makefile.in
lib/sysutil/micro_delay.c
lib/sysutil/sys_hz.c

index 3082a19098363895c5a89244982bcb47fa429c58..3cd2866ce42752f5ef26d4c822df63b2329ae531 100644 (file)
@@ -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 \
index 773897943936957bb5c2c2e8be69433a75ebad3c..b549510f901c2431e22bfb70dcdddf389ca98aeb 100644 (file)
@@ -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)))
index 10130175ed867c2c57a8c0a15e25f6ad2fc0afe4..ad6463121b44856859149bb770d7c2f4198afa47 100644 (file)
@@ -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);
                }
        }