diff options
author | Scott Long <scottl@FreeBSD.org> | 2004-09-11 10:07:22 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2004-09-11 10:07:22 +0000 |
commit | 1e7fad6b6ab1753e887ef1e3527afe950e67030c (patch) | |
tree | fbe6b311ded83e3661fdad4e8719abe9dd012c87 /sys/sys/sched.h | |
parent | 5d67845f3e3a797f727df4640fded51319b200b0 (diff) | |
download | src-1e7fad6b6ab1753e887ef1e3527afe950e67030c.tar.gz src-1e7fad6b6ab1753e887ef1e3527afe950e67030c.zip |
Revert the previous round of changes to td_pinned. The scheduler isn't
fully initialed when the pmap layer tries to call sched_pini() early in the
boot and results in an quick panic. Use ke_pinned instead as was originally
done with Tor's patch.
Approved by: julian
Notes
Notes:
svn path=/head/; revision=135076
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r-- | sys/sys/sched.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h index 2cb4bc50e085..691239043e83 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -82,14 +82,10 @@ void sched_rem(struct thread *td); * hold a thread on a particular CPU. */ void sched_bind(struct thread *td, int cpu); +static __inline void sched_pin(void); void sched_unbind(struct thread *td); +static __inline void sched_unpin(void); -/* these only work for curthread */ -void sched_pin(void); -void sched_unpin(void); -#ifdef INVARIANTS -int sched_ispinned(void); -#endif /* * These procedures tell the process data structure allocation code how @@ -99,6 +95,18 @@ int sched_sizeof_ksegrp(void); int sched_sizeof_proc(void); int sched_sizeof_thread(void); +static __inline void +sched_pin(void) +{ + curthread->td_pinned++; +} + +static __inline void +sched_unpin(void) +{ + curthread->td_pinned--; +} + /* temporarily here */ void schedinit(void); void sched_destroyproc(struct proc *p); |