]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Get rid of struct proc p_sched and struct thread td_sched pointers.
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 5 Jun 2016 17:04:03 +0000 (17:04 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 5 Jun 2016 17:04:03 +0000 (17:04 +0000)
commit93ccd6bf87c7e1f94fb672f08b52a120c00e6f9d
tree90eb5449980100c99e48c6ec67fe6f36d38e6ae6
parent314381b52924e253f6f1f6c11490097b72bb6859
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
sys/kern/init_main.c
sys/kern/kern_fork.c
sys/kern/kern_proc.c
sys/kern/kern_synch.c
sys/kern/kern_thread.c
sys/kern/sched_4bsd.c
sys/kern/sched_ule.c
sys/mips/mips/locore.S
sys/sys/proc.h