summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-09-11 10:07:22 +0000
committerscottl <scottl@FreeBSD.org>2004-09-11 10:07:22 +0000
commit1e56230631d33cf86f623a7cf882caa3ad9b1299 (patch)
treefbe6b311ded83e3661fdad4e8719abe9dd012c87 /sys/sys/sched.h
parenta2b00744ab6dd89091e6dddc6c918c605058eb06 (diff)
downloadFreeBSD-src-1e56230631d33cf86f623a7cf882caa3ad9b1299.zip
FreeBSD-src-1e56230631d33cf86f623a7cf882caa3ad9b1299.tar.gz
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
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 2cb4bc5..6912390 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);
OpenPOWER on IntegriCloud