No more HZ; move stacktrace() to library
This commit is contained in:
parent
825dfb0282
commit
3e29947e28
3 changed files with 3 additions and 3 deletions
|
@ -22,6 +22,7 @@ libsys_FILES=" \
|
||||||
taskcall.c \
|
taskcall.c \
|
||||||
read_tsc.s \
|
read_tsc.s \
|
||||||
read_tsc_64.c \
|
read_tsc_64.c \
|
||||||
|
ser_putc.c \
|
||||||
stacktrace.c \
|
stacktrace.c \
|
||||||
sys_hz.c \
|
sys_hz.c \
|
||||||
profile_extern.c \
|
profile_extern.c \
|
||||||
|
|
|
@ -32,8 +32,7 @@ micro_delay_calibrate(void)
|
||||||
unsigned long t = 0;
|
unsigned long t = 0;
|
||||||
|
|
||||||
/* Get HZ. */
|
/* Get HZ. */
|
||||||
if(sys_getinfo(GET_HZ, &Hz, sizeof(Hz), 0, 0) != OK)
|
Hz = sys_hz();
|
||||||
Hz = HZ;
|
|
||||||
|
|
||||||
/* Wait for clock to tick. */
|
/* Wait for clock to tick. */
|
||||||
while(!t || (t == times(&tms)))
|
while(!t || (t == times(&tms)))
|
||||||
|
|
|
@ -19,7 +19,7 @@ sys_hz(void)
|
||||||
int r;
|
int r;
|
||||||
/* Get HZ. */
|
/* Get HZ. */
|
||||||
if((r=sys_getinfo(GET_HZ, &Hz, sizeof(Hz), 0, 0)) != OK) {
|
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);
|
printf("sys_hz: %d: reverting to HZ = %d\n", r, Hz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue