kernel - Add p_ppid

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 20 October 2017 02:33 EDT

- We have proc->p_pptr, but still needed a shared p->p_token to access the ppid. Buckle under and add proc->p_ppid as well so getppid() can run lockless.

- Adjust the vmtotal proc scan to use a shared proc->p_token instead of an exclusive one.

39b9b6c kernel - Add p_ppid
sys/kern/kern_exit.c | 2 ++
sys/kern/kern_fork.c | 1 +
sys/kern/kern_proc.c | 1 +
sys/kern/kern_prot.c | 4 +---
sys/sys/proc.h | 1 +
sys/vm/vm_meter.c | 2 +-
6 files changed, 7 insertions(+), 4 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share