summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
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/kern/sched_4bsd.c
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/kern/sched_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 6686339..c1a1c6b 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -87,7 +87,6 @@ struct kse {
} ke_state; /* (j) KSE status. */
int ke_cpticks; /* (j) Ticks of cpu time. */
struct runq *ke_runq; /* runq the kse is currently on */
- int ke_pinned; /* (k) nested count, pinned to a cpu */
};
#define ke_proc ke_thread->td_proc
@@ -125,7 +124,7 @@ struct kg_sched {
* cpus.
*/
#define KSE_CAN_MIGRATE(ke) \
- ((ke)->ke_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0)
+ ((ke)->ke_thread->td_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0)
static struct kse kse0;
static struct kg_sched kg_sched0;
@@ -1172,26 +1171,5 @@ sched_pctcpu(struct thread *td)
return (0);
}
-
-void
-sched_pin(void)
-{
- curthread->td_sched->ke_pinned++;
-}
-
- void
-sched_unpin(void)
-{
- curthread->td_sched->ke_pinned--;
-}
-
-#ifdef INVARIANTS
-int
-sched_ispinned(void)
-{
- return (curthread->td_sched->ke_pinned);
-}
-#endif
-
#define KERN_SWITCH_INCLUDE 1
#include "kern/kern_switch.c"
OpenPOWER on IntegriCloud