diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/imgact_elf.c | 2 | ||||
-rw-r--r-- | sys/kern/init_main.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_descrip.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_resource.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index b0b6399..09d7d5f 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -145,7 +145,7 @@ __elfN(brand_inuse)(Elf_Brandinfo *entry) int rval = FALSE; sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { if (p->p_sysent == entry->sysvec) { rval = TRUE; break; diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a911e11..284a84d 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -502,7 +502,7 @@ proc0_post(void *dummy __unused) * time from the filesystem. Pretend that proc0 started now. */ sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { microuptime(&p->p_stats->p_start); p->p_rux.rux_runtime = 0; } diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 590a387..b4e4560 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2384,7 +2384,7 @@ mountcheckdirs(struct vnode *olddp, struct vnode *newdp) if (vrefcnt(olddp) == 1) return; sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { fdp = fdhold(p); if (fdp == NULL) continue; @@ -2481,7 +2481,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) bzero(&xf, sizeof(xf)); xf.xf_size = sizeof(xf); sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { if (p->p_state == PRS_NEW) continue; PROC_LOCK(p); @@ -2563,7 +2563,7 @@ file_to_first_proc(struct file *fp) struct proc *p; int n; - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { if (p->p_state == PRS_NEW) continue; fdp = p->p_fd; diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index a252aa0..9e92e49 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -629,7 +629,7 @@ ktrace(td, uap) */ if (ops == KTROP_CLEARFILE) { sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (p->p_tracevp == vp) { if (ktrcanset(td, p)) { @@ -968,7 +968,7 @@ ktr_writerequest(struct thread *td, struct ktr_request *req) */ cred = NULL; sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (p->p_tracevp == vp) { mtx_lock(&ktrace_mtx); diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index e351d18..09a1ccc 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -142,7 +142,7 @@ getpriority(td, uap) if (uap->who == 0) uap->who = td->td_ucred->cr_uid; sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (!p_cansee(td, p) && p->p_ucred->cr_uid == uap->who) { diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index b053804..dec3b29 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1676,7 +1676,7 @@ killpg1(td, sig, pgid, all) * broadcast */ sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (p->p_pid <= 1 || p->p_flag & P_SYSTEM || p == td->td_proc || p->p_state == PRS_NEW) { diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index d451c07..b1e9ee2 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -1114,7 +1114,7 @@ DB_SHOW_COMMAND(allchains, db_show_allchains) int i; i = 1; - LIST_FOREACH(p, &allproc, p_list) { + FOREACH_PROC_IN_SYSTEM(p) { FOREACH_THREAD_IN_PROC(p, td) { if (TD_ON_LOCK(td) && LIST_EMPTY(&td->td_contested)) { db_printf("chain %d:\n", i++); |