summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2003-05-02 00:33:12 +0000
committerjulian <julian@FreeBSD.org>2003-05-02 00:33:12 +0000
commita954908b3534f6488e4e563f6d2912c3df9d750e (patch)
tree354160c488b1394b67dd663bd12e8767fd5a36cf /sys
parent14593b22f8b42102305b3d161ae6334b6e445eb4 (diff)
downloadFreeBSD-src-a954908b3534f6488e4e563f6d2912c3df9d750e.zip
FreeBSD-src-a954908b3534f6488e4e563f6d2912c3df9d750e.tar.gz
Move the flag that indicates an idle thread from the KSE to the thread.
It was always referenced via the thread anyhow. Reviewed by: jhb (a LOOOOONG time ago)
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_idle.c2
-rw-r--r--sys/kern/kern_intr.c2
-rw-r--r--sys/kern/kern_ktr.c2
-rw-r--r--sys/kern/sched_ule.c2
-rw-r--r--sys/sys/proc.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c
index a3a9495..825b2f0 100644
--- a/sys/kern/kern_idle.c
+++ b/sys/kern/kern_idle.c
@@ -67,7 +67,7 @@ idle_setup(void *dummy)
p->p_state = PRS_NORMAL;
td = FIRST_THREAD_IN_PROC(p);
td->td_state = TDS_CAN_RUN;
- td->td_kse->ke_flags |= KEF_IDLEKSE;
+ td->td_flags |= TDF_IDLETD;
mtx_unlock_spin(&sched_lock);
PROC_UNLOCK(p);
#ifdef SMP
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 5a1a0c2..3405687 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -397,7 +397,7 @@ ithread_schedule(struct ithd *ithread, int do_switch)
KASSERT((TD_IS_RUNNING(ctd)),
("ithread_schedule: Bad state for curthread."));
ctd->td_proc->p_stats->p_ru.ru_nivcsw++;
- if (ctd->td_kse->ke_flags & KEF_IDLEKSE)
+ if (ctd->td_flags & TDF_IDLETD)
ctd->td_state = TDS_CAN_RUN; /* XXXKSE */
mi_switch();
} else {
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 35a15fd..2454406 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -195,7 +195,7 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format,
#ifdef KTR_ALQ
if (ktr_alq_enabled &&
td->td_critnest == 0 &&
- (td->td_kse->ke_flags & KEF_IDLEKSE) == 0 &&
+ (td->td_flags & TDF_IDLETD) == 0 &&
td != ald_thread) {
if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max)
goto done;
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index e3c5a8e..49329f9 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -901,7 +901,7 @@ sched_clock(struct kse *ke)
if (ke->ke_ftick + SCHED_CPU_TICKS + hz < ke->ke_ltick)
sched_pctcpu_update(ke);
- if (td->td_kse->ke_flags & KEF_IDLEKSE)
+ if (td->td_flags & TD_IDLETD)
return;
CTR4(KTR_ULE, "Tick kse %p (slice: %d, slptime: %d, runtime: %d)",
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index ab6950e..92f9739 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -350,6 +350,7 @@ struct thread {
#define TDF_CAN_UNBIND 0x000004 /* Only temporarily bound. */
#define TDF_SINTR 0x000008 /* Sleep is interruptible. */
#define TDF_TIMEOUT 0x000010 /* Timing out during sleep. */
+#define TDF_IDLETD 0x000020 /* This is one of the per-CPU idle threads */
#define TDF_SELECT 0x000040 /* Selecting; wakeup/waiting danger. */
#define TDF_CVWAITQ 0x000080 /* Thread is on a cv_waitq (not slpq). */
#define TDF_UPCALLING 0x000100 /* This thread is doing an upcall. */
@@ -450,7 +451,6 @@ struct kse {
};
/* flags kept in ke_flags */
-#define KEF_IDLEKSE 0x00004 /* A 'Per CPU idle process'.. has one thread */
#define KEF_DIDRUN 0x02000 /* KSE actually ran. */
#define KEF_EXIT 0x04000 /* KSE is being killed. */
OpenPOWER on IntegriCloud