Until we figure out the Perfect Way of adding flags to processes, add

a p_flag2. No objections on tech-kern@.

Input from simonb@, thanks!
This commit is contained in:
elad 2006-10-03 11:23:32 +00:00
parent b4da713cf5
commit f346fbdce9
3 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_sysctl.c,v 1.87 2006/09/24 05:46:14 dogcow Exp $ */
/* $NetBSD: init_sysctl.c,v 1.88 2006/10/03 11:23:32 elad Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.87 2006/09/24 05:46:14 dogcow Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.88 2006/10/03 11:23:32 elad Exp $");
#include "opt_sysv.h"
#include "opt_multiprocessor.h"
@ -2927,6 +2927,7 @@ fill_kproc2(struct proc *p, struct kinfo_proc2 *ki)
ki->p_eflag = 0;
ki->p_exitsig = p->p_exitsig;
ki->p_flag = p->p_flag;
ki->p_flag2 = p->p_flag2;
ki->p_pid = p->p_pid;
if (p->p_pptr)

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.225 2006/07/30 21:58:11 ad Exp $ */
/* $NetBSD: proc.h,v 1.226 2006/10/03 11:23:32 elad Exp $ */
/*-
* Copyright (c) 1986, 1989, 1991, 1993
@ -185,6 +185,7 @@ struct proc {
int p_exitsig; /* signal to send to parent on exit */
int p_flag; /* P_* flags. */
int p_flag2; /* second batch of P_* flags. */
char p_stat; /* S* process status. */
char p_pad1[3];

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.157 2006/09/08 20:58:58 elad Exp $ */
/* $NetBSD: sysctl.h,v 1.158 2006/10/03 11:23:32 elad Exp $ */
/*
* Copyright (c) 1989, 1993
@ -561,6 +561,9 @@ struct kinfo_proc2 {
uint64_t p_realstat; /* LONG: non-LWP process status */
uint32_t p_svuid; /* UID_T: saved user id */
uint32_t p_svgid; /* GID_T: saved group id */
int32_t p_flag2; /* INT: second batch of P_* flags */
int32_t p_pad; /* INT: unused, free for use */
};
/*