diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-11-19 21:34:50 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-11-19 21:34:50 +0000 |
commit | 2996376ab518d7c1c4764bc62f273ca9bef10cd0 (patch) | |
tree | 7c075136782502c2444d0d218712afc57d9337a4 /sys | |
parent | 93efcae809aa8f6d7c94d55503520a0aa03d405f (diff) | |
download | src-2996376ab518d7c1c4764bc62f273ca9bef10cd0.tar.gz src-2996376ab518d7c1c4764bc62f273ca9bef10cd0.zip |
Use LIST_FOREACH to traverse the allproc list.
Submitted by: Jake Burkholder jake@checker.org
Notes
Notes:
svn path=/head/; revision=53433
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/pmap.c | 7 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index b265980f538c..72e3c4bebf47 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -771,8 +771,7 @@ pmap_get_asn(pmap_t pmap) printf("pmap_get_asn: generation rollover\n"); #endif pmap_current_asngen = 1; - for (p = allproc.lh_first; - p != 0; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_vmspace) { tpmap = vmspace_pmap(p->p_vmspace); tpmap->pm_asngen = 0; @@ -1601,7 +1600,7 @@ pmap_growkernel(vm_offset_t addr) newlev1 = pmap_phys_to_pte(pa) | PG_V | PG_ASM | PG_KRE | PG_KWE; - for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_vmspace) { pmap = vmspace_pmap(p->p_vmspace); *pmap_lev1pte(pmap, kernel_vm_end) = newlev1; @@ -3137,7 +3136,7 @@ pmap_pid_dump(int pid) { struct proc *p; int npte = 0; int index; - for (p = allproc.lh_first; p != NULL; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_pid != pid) continue; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index bb690d30205e..96d880dfa8ed 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1461,7 +1461,7 @@ pmap_growkernel(vm_offset_t addr) newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); pdir_pde(PTD, kernel_vm_end) = newpdir; - for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_vmspace) { pmap = vmspace_pmap(p->p_vmspace); *pmap_pde(pmap, kernel_vm_end) = newpdir; @@ -3410,7 +3410,7 @@ pmap_pid_dump(int pid) { struct proc *p; int npte = 0; int index; - for (p = allproc.lh_first; p != NULL; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_pid != pid) continue; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index bb690d30205e..96d880dfa8ed 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1461,7 +1461,7 @@ pmap_growkernel(vm_offset_t addr) newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); pdir_pde(PTD, kernel_vm_end) = newpdir; - for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_vmspace) { pmap = vmspace_pmap(p->p_vmspace); *pmap_pde(pmap, kernel_vm_end) = newpdir; @@ -3410,7 +3410,7 @@ pmap_pid_dump(int pid) { struct proc *p; int npte = 0; int index; - for (p = allproc.lh_first; p != NULL; p = p->p_list.le_next) { + LIST_FOREACH(p, &allproc, p_list) { if (p->p_pid != pid) continue; |