Move the 'p_start' field from struct pstats (Process Statistics) into the
authorHiten Pandya <hmp@dragonflybsd.org>
Sun, 20 Jun 2004 22:29:10 +0000 (22:29 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Sun, 20 Jun 2004 22:29:10 +0000 (22:29 +0000)
commit41f3429ea5a2f15b36f8409c13c4081c0178b98b
tree442193caa2ae9f844b596afa7aa7c671ff7aac86
parentae528e1234ad798983da68b856f4ae72a7641437
Move the 'p_start' field from struct pstats (Process Statistics) into the
thread structure and call it 'td_start'.  The behavior of vm_fork(9) is
retained, i.e., it still copies the start time from the parent process just
as it did before.

The 'td_start' will later be used by pure threads to indicate their start
time.  It has not been committed in this round because use of the microtime()
function at such a early point in the boot process might be unsafe.

Note, there should be no problem in accessing the td_start field, unless
the process is a Zombie; due to the way Zombies are reaped, the thread will
be decoupled in kern_wait1() but the process will still be around for a
while it will not be possible to access the td_start field in such
scenarios.  A little note about this has been added on top of struct proc
in <sys/proc.h> for future reference.

This work was a collaboration of Hiten Pandya <hmp@backplane.com> and
Matthew Dillon <dillon@apollo.backplane.com>
bin/ps/ps.c
sys/kern/init_main.c
sys/kern/kern_acct.c
sys/kern/kern_fork.c
sys/netproto/smb/smb_subr.c
sys/sys/proc.h
sys/sys/resourcevar.h
sys/sys/thread.h
sys/vfs/procfs/procfs_status.c
sys/vm/vm_glue.c