summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/pkill/pkill.c2
-rw-r--r--bin/ps/ps.12
-rw-r--r--sys/compat/ndis/ntoskrnl_var.h2
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c2
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_fork.c2
-rw-r--r--sys/kern/kern_kthread.c8
-rw-r--r--sys/kern/kern_proc.c3
-rw-r--r--sys/kern/kern_racct.c2
-rw-r--r--sys/sys/proc.h2
-rw-r--r--usr.bin/top/machine.c8
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h2
12 files changed, 18 insertions, 19 deletions
diff --git a/bin/pkill/pkill.c b/bin/pkill/pkill.c
index 8c814ce..abdc450 100644
--- a/bin/pkill/pkill.c
+++ b/bin/pkill/pkill.c
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
/* Ignore system-processes (if '-S' flag is not specified) and myself. */
#define PSKIP(kp) ((kp)->ki_pid == mypid || \
- (!kthreads && ((kp)->ki_flag & P_KTHREAD) != 0))
+ (!kthreads && ((kp)->ki_flag & P_KPROC) != 0))
enum listtype {
LT_GENERIC,
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index e00d313..3d7c738 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -318,7 +318,7 @@ the include file
.Bl -column P_SINGLE_BOUNDARY 0x40000000
.It Dv "P_ADVLOCK" Ta No "0x00001" Ta "Process may hold a POSIX advisory lock"
.It Dv "P_CONTROLT" Ta No "0x00002" Ta "Has a controlling terminal"
-.It Dv "P_KTHREAD" Ta No "0x00004" Ta "Kernel thread"
+.It Dv "P_KPROC" Ta No "0x00004" Ta "Kernel process"
.It Dv "P_FOLLOWFORK" Ta No "0x00008" Ta "Attach debugger to new children"
.It Dv "P_PPWAIT" Ta No "0x00010" Ta "Parent is waiting for child to exec/exit"
.It Dv "P_PROFIL" Ta No "0x00020" Ta "Has started profiling"
diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h
index 2642626..f5efc6e 100644
--- a/sys/compat/ndis/ntoskrnl_var.h
+++ b/sys/compat/ndis/ntoskrnl_var.h
@@ -337,7 +337,7 @@ typedef struct nt_dispatch_header nt_dispatch_header;
#define SYNC_LEVEL_MP (IPI_LEVEL - 1)
#define AT_PASSIVE_LEVEL(td) \
- ((td)->td_proc->p_flag & P_KTHREAD == FALSE)
+ ((td)->td_proc->p_flag & P_KPROC == FALSE)
#define AT_DISPATCH_LEVEL(td) \
((td)->td_base_pri == PI_REALTIME)
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 3f56f12..3a1d52a 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -1009,7 +1009,7 @@ pmc_attach_one_process(struct proc *p, struct pmc *pm)
/* issue an attach event to a configured log file */
if (pm->pm_owner->po_flags & PMC_PO_OWNS_LOGFILE) {
- if (p->p_flag & P_KTHREAD) {
+ if (p->p_flag & P_KPROC) {
fullpath = kernelname;
freepath = NULL;
} else {
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index d157d24..fa1c3d0 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -479,7 +479,7 @@ proc0_init(void *dummy __unused)
session0.s_leader = p;
p->p_sysent = &null_sysvec;
- p->p_flag = P_SYSTEM | P_INMEM | P_KTHREAD;
+ p->p_flag = P_SYSTEM | P_INMEM | P_KPROC;
p->p_flag2 = 0;
p->p_state = PRS_NORMAL;
knlist_init_mtx(&p->p_klist, &p->p_mtx);
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 34af264..94e139e 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1037,7 +1037,7 @@ fork_exit(void (*callout)(void *, struct trapframe *), void *arg,
* Check if a kernel thread misbehaved and returned from its main
* function.
*/
- if (p->p_flag & P_KTHREAD) {
+ if (p->p_flag & P_KPROC) {
printf("Kernel thread \"%s\" (pid %d) exited prematurely.\n",
td->td_name, p->p_pid);
kthread_exit();
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 9cca255..134e9a2 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -104,7 +104,7 @@ kproc_create(void (*func)(void *), void *arg,
/* this is a non-swapped system process */
PROC_LOCK(p2);
td = FIRST_THREAD_IN_PROC(p2);
- p2->p_flag |= P_SYSTEM | P_KTHREAD;
+ p2->p_flag |= P_SYSTEM | P_KPROC;
td->td_pflags |= TDP_KTHREAD;
mtx_lock(&p2->p_sigacts->ps_mtx);
p2->p_sigacts->ps_flag |= PS_NOCLDWAIT;
@@ -181,7 +181,7 @@ kproc_suspend(struct proc *p, int timo)
* use the p_siglist field.
*/
PROC_LOCK(p);
- if ((p->p_flag & P_KTHREAD) == 0) {
+ if ((p->p_flag & P_KPROC) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}
@@ -198,7 +198,7 @@ kproc_resume(struct proc *p)
* use the p_siglist field.
*/
PROC_LOCK(p);
- if ((p->p_flag & P_KTHREAD) == 0) {
+ if ((p->p_flag & P_KPROC) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}
@@ -411,7 +411,7 @@ kthread_resume(struct thread *td)
* and notify the caller that is has happened.
*/
void
-kthread_suspend_check()
+kthread_suspend_check(void)
{
struct proc *p;
struct thread *td;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 729d7f0..e980176 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -3010,8 +3010,7 @@ allproc_loop:
LIST_REMOVE(cp, p_list);
LIST_INSERT_AFTER(p, cp, p_list);
PROC_LOCK(p);
- if ((p->p_flag & (P_KTHREAD | P_SYSTEM |
- P_TOTAL_STOP)) != 0) {
+ if ((p->p_flag & (P_KPROC | P_SYSTEM | P_TOTAL_STOP)) != 0) {
PROC_UNLOCK(p);
continue;
}
diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c
index ce7e2a4..1c3c9d7 100644
--- a/sys/kern/kern_racct.c
+++ b/sys/kern/kern_racct.c
@@ -1099,7 +1099,7 @@ racct_proc_throttle(struct proc *p)
* Do not block kernel processes. Also do not block processes with
* low %cpu utilization to improve interactivity.
*/
- if (((p->p_flag & (P_SYSTEM | P_KTHREAD)) != 0) ||
+ if (((p->p_flag & (P_SYSTEM | P_KPROC)) != 0) ||
(p->p_racct->r_resources[RACCT_PCTCPU] <= pcpu_threshold))
return;
p->p_throttled = 1;
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 039fd39..f9ca6d9 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -658,7 +658,7 @@ struct proc {
/* These flags are kept in p_flag. */
#define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */
#define P_CONTROLT 0x00002 /* Has a controlling terminal. */
-#define P_KTHREAD 0x00004 /* Kernel thread (*). */
+#define P_KPROC 0x00004 /* Kernel process. */
#define P_FOLLOWFORK 0x00008 /* Attach parent debugger to children. */
#define P_PPWAIT 0x00010 /* Parent is waiting for child to exec/exit. */
#define P_PROFIL 0x00020 /* Has started profiling. */
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 20be935..0ae2ae7 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1160,7 +1160,7 @@ format_nice(const struct kinfo_proc *pp)
static char nicebuf[4 + 1];
fifo = PRI_NEED_RR(pp->ki_pri.pri_class) ? "" : "F";
- kthread = (pp->ki_flag & P_KTHREAD) ? "k" : "";
+ kthread = (pp->ki_flag & P_KPROC) ? "k" : "";
switch (PRI_BASE(pp->ki_pri.pri_class)) {
case PRI_ITHD:
return ("-");
@@ -1185,19 +1185,19 @@ format_nice(const struct kinfo_proc *pp)
* values like "kr31F", but such values shouldn't occur,
* and if they do then the tailing "F" is not displayed.
*/
- rtpri = ((pp->ki_flag & P_KTHREAD) ? pp->ki_pri.pri_native :
+ rtpri = ((pp->ki_flag & P_KPROC) ? pp->ki_pri.pri_native :
pp->ki_pri.pri_user) - PRI_MIN_REALTIME;
snprintf(nicebuf, sizeof(nicebuf), "%sr%d%s",
kthread, rtpri, fifo);
break;
case PRI_TIMESHARE:
- if (pp->ki_flag & P_KTHREAD)
+ if (pp->ki_flag & P_KPROC)
return ("-");
snprintf(nicebuf, sizeof(nicebuf), "%d", pp->ki_nice - NZERO);
break;
case PRI_IDLE:
/* XXX: as above. */
- rtpri = ((pp->ki_flag & P_KTHREAD) ? pp->ki_pri.pri_native :
+ rtpri = ((pp->ki_flag & P_KPROC) ? pp->ki_pri.pri_native :
pp->ki_pri.pri_user) - PRI_MIN_IDLE;
snprintf(nicebuf, sizeof(nicebuf), "%si%d%s",
kthread, rtpri, fifo);
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
index 04928d2..5c11573 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
@@ -85,7 +85,7 @@ struct statfs;
/* path to devd(8) output pipe */
#define PATH_DEVD_PIPE "/var/run/devd.pipe"
-#define IS_KERNPROC(kp) (((kp)->ki_flag & P_KTHREAD) == P_KTHREAD)
+#define IS_KERNPROC(kp) (((kp)->ki_flag & P_KPROC) == P_KPROC)
enum snmpTCTruthValue {
SNMP_TRUE = 1,
OpenPOWER on IntegriCloud