From e9e6deb35d4edfcb198130aa7de483baebd8a0f0 Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland@gnu.org>
Date: Sat, 29 May 1999 21:05:02 +0000
Subject: 1999-05-29  Roland McGrath  <roland@baalperazim.frob.com>

	* kern/startup.c (start_kernel_threads): Call record_time_stamp to
	reset the kernel task's creation_time field, so it's not zero.
---
 kern/startup.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

(limited to 'kern/startup.c')

diff --git a/kern/startup.c b/kern/startup.c
index dc0d5a01..0e1c701d 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -1,25 +1,25 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
@@ -143,7 +143,7 @@ void setup_main()
 	 */
 	recompute_priorities();
 	compute_mach_factor();
-	
+
 	/*
 	 *	Create a kernel thread to start the other kernel
 	 *	threads.  Thread_resume (from kernel_thread) calls
@@ -239,6 +239,16 @@ void start_kernel_threads()
 	norma_vm_init();
 #endif	NORMA_VM
 
+
+	/*
+	 * 	Initialize kernel task's creation time.
+	 * When we created the kernel task in task_init, the mapped
+	 * time was not yet available.  Now, last thing before starting
+	 * the user bootstrap, record the current time as the kernel
+	 * task's creation time.
+	 */
+	record_time_stamp (&kernel_task->creation_time);
+
 	/*
 	 *	Start the user bootstrap.
 	 */
-- 
cgit v1.2.3