diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
commit | 9d8236625502d9aebd87ee4b8aa759eb7dd062ae (patch) | |
tree | 608f67fdaff3caceaeb03f449b57d21037a3fe79 /sys/kern/kern_proc.c | |
parent | 2470899b803a7fb5d135883edd5ddd82d6a592c7 (diff) |
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index eb9b7ca37f5..51a428d2af8 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_proc.c,v 1.69 2016/09/02 18:11:28 tedu Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.70 2016/09/15 02:00:16 dlg Exp $ */ /* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* @@ -93,24 +93,18 @@ procinit(void) if (!pidhashtbl || !pgrphashtbl || !uihashtbl) panic("procinit: malloc"); - pool_init(&proc_pool, sizeof(struct proc), 0, 0, PR_WAITOK, - "procpl", NULL); - pool_setipl(&proc_pool, IPL_NONE); - pool_init(&process_pool, sizeof(struct process), 0, 0, PR_WAITOK, - "processpl", NULL); - pool_setipl(&process_pool, IPL_NONE); - pool_init(&rusage_pool, sizeof(struct rusage), 0, 0, PR_WAITOK, - "zombiepl", NULL); - pool_setipl(&rusage_pool, IPL_NONE); - pool_init(&ucred_pool, sizeof(struct ucred), 0, 0, PR_WAITOK, - "ucredpl", NULL); - pool_setipl(&ucred_pool, IPL_NONE); - pool_init(&pgrp_pool, sizeof(struct pgrp), 0, 0, PR_WAITOK, - "pgrppl", NULL); - pool_setipl(&pgrp_pool, IPL_NONE); - pool_init(&session_pool, sizeof(struct session), 0, 0, PR_WAITOK, - "sessionpl", NULL); - pool_setipl(&session_pool, IPL_NONE); + pool_init(&proc_pool, sizeof(struct proc), 0, IPL_NONE, + PR_WAITOK, "procpl", NULL); + pool_init(&process_pool, sizeof(struct process), 0, IPL_NONE, + PR_WAITOK, "processpl", NULL); + pool_init(&rusage_pool, sizeof(struct rusage), 0, IPL_NONE, + PR_WAITOK, "zombiepl", NULL); + pool_init(&ucred_pool, sizeof(struct ucred), 0, IPL_NONE, + PR_WAITOK, "ucredpl", NULL); + pool_init(&pgrp_pool, sizeof(struct pgrp), 0, IPL_NONE, + PR_WAITOK, "pgrppl", NULL); + pool_init(&session_pool, sizeof(struct session), 0, IPL_NONE, + PR_WAITOK, "sessionpl", NULL); } struct uidinfo * |