summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2004-02-16 00:11:04 +0000
committerjdike <jdike>2004-02-16 00:11:04 +0000
commite43e0a1532f04b0189e83ba42b2ddf84917d71fb (patch)
tree28cf093de80fc5936e0e0a6782667fa59268ba95
parent0d72ed4547c3922938e504ae6484fe4f37f49b7b (diff)
downloaduml-history-e43e0a1532f04b0189e83ba42b2ddf84917d71fb.tar.gz
time_init calls timer to make sure that xtime is non-zero. This was the
cause of /proc having a 1970 date.
-rw-r--r--arch/um/kernel/time.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index ddcd009..c740ef7 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -117,6 +117,13 @@ unsigned long long host_hz = 0;
void time_init(void)
{
+ /* XXX This is to fill xtime with something real - otherwise by the
+ * time /proc is mounted, no timers have fired, and xtime is still 0,
+ * meaning it shows times of Jan 1 1970. The real fix is to figure
+ * out why no timers have happened by then.
+ */
+ timer();
+
host_hz = get_host_hz();
if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
panic("Couldn't set SIGVTALRM handler");