summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-06-05 17:04:03 +0000
committerkib <kib@FreeBSD.org>2016-06-05 17:04:03 +0000
commitef5f88c3578682534931b6958f99bdc1a6a33869 (patch)
tree90eb5449980100c99e48c6ec67fe6f36d38e6ae6 /sys/kern/kern_proc.c
parent78ad2d66952b6547cf31e4d25c669d82bf69615b (diff)
downloadFreeBSD-src-ef5f88c3578682534931b6958f99bdc1a6a33869.zip
FreeBSD-src-ef5f88c3578682534931b6958f99bdc1a6a33869.tar.gz
Get rid of struct proc p_sched and struct thread td_sched pointers.
p_sched is unused. The struct td_sched is always co-allocated with the struct thread, except for the thread0. Avoid useless indirection, instead calculate td_sched location using simple pointer arithmetic in td_get_sched(9). For thread0, which is statically allocated, create a structure to emulate layout of the dynamic allocation. Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D6711
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 96a8f4c..2f1f620 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -237,7 +237,6 @@ proc_init(void *mem, int size, int flags)
p = (struct proc *)mem;
SDT_PROBE3(proc, , init, entry, p, size, flags);
- p->p_sched = (struct p_sched *)&p[1];
mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK | MTX_NEW);
mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_NEW);
mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW);
OpenPOWER on IntegriCloud