From 8ed712ead15fc26b5070dcac9458f31fc6ecf0fa Mon Sep 17 00:00:00 2001 From: des Date: Thu, 1 May 2003 16:59:23 +0000 Subject: Instead of recording the Unix time in a process when it starts, record the uptime. Where necessary, convert it back to Unix time by adding boottime to it. This fixes a potential problem in the accounting code, which would compute the elapsed time incorrectly if the Unix time was stepped during the lifetime of the process. --- sys/kern/kern_kthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/kern_kthread.c') diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 46fa97c..d4846dd 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -79,7 +79,7 @@ kthread_create(void (*func)(void *), void *arg, struct thread *td; struct proc *p2; - if (!proc0.p_stats /* || proc0.p_stats->p_start.tv_sec == 0 */) + if (!proc0.p_stats) panic("kthread_create called too soon"); error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, -- cgit v1.1