PERFORCE change 100366 for review
Peter Wemm
peter at FreeBSD.org
Fri Jun 30 23:59:00 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100366
Change 100366 by peter at peter_daintree on 2006/06/30 23:58:14
Eliminate now-useless sched_userret(). Saves a wasted function call
to code that may or may not do a diagnostic assert. Just do the
assert that is the same for all
(XXX SCHED_CORE hasn't been de-kse'ed yet, so it still has kse cleanup code
in this function)
Affected files ...
.. //depot/projects/bike_sched/sys/kern/sched_4bsd.c#5 edit
.. //depot/projects/bike_sched/sys/kern/sched_core.c#2 edit
.. //depot/projects/bike_sched/sys/kern/sched_ule.c#4 edit
.. //depot/projects/bike_sched/sys/kern/subr_trap.c#3 edit
.. //depot/projects/bike_sched/sys/sys/sched.h#4 edit
Differences ...
==== //depot/projects/bike_sched/sys/kern/sched_4bsd.c#5 (text+ko) ====
@@ -1149,14 +1149,6 @@
}
void
-sched_userret(struct thread *td)
-{
-
- KASSERT((td->td_flags & TDF_BORROWING) == 0,
- ("thread with borrowed priority returning to userland"));
-}
-
-void
sched_bind(struct thread *td, int cpu)
{
struct kse *ke;
==== //depot/projects/bike_sched/sys/kern/sched_core.c#2 (text+ko) ====
@@ -1348,6 +1348,7 @@
#endif
}
+/* XXXX gone */
void
sched_userret(struct thread *td)
{
==== //depot/projects/bike_sched/sys/kern/sched_ule.c#4 (text+ko) ====
@@ -1641,14 +1641,6 @@
return (load);
}
-void
-sched_userret(struct thread *td)
-{
-
- KASSERT((td->td_flags & TDF_BORROWING) == 0,
- ("thread with borrowed priority returning to userland"));
-}
-
struct kse *
sched_choose(void)
{
==== //depot/projects/bike_sched/sys/kern/subr_trap.c#3 (text+ko) ====
@@ -120,10 +120,8 @@
if (p->p_flag & P_PROFIL)
addupc_task(td, TRAPF_PC(frame), td->td_pticks * psratio);
- /*
- * Let the scheduler adjust our priority etc.
- */
- sched_userret(td);
+ KASSERT((td->td_flags & TDF_BORROWING) == 0,
+ ("userret: thread with borrowed priority returning to userland"));
KASSERT(td->td_locks == 0,
("userret: Returning with %d locks held.", td->td_locks));
}
==== //depot/projects/bike_sched/sys/sys/sched.h#4 (text+ko) ====
@@ -65,7 +65,6 @@
void sched_sleep(struct thread *td);
void sched_switch(struct thread *td, struct thread *newtd, int flags);
void sched_unlend_prio(struct thread *td, u_char prio);
-void sched_userret(struct thread *td);
void sched_wakeup(struct thread *td);
/*
More information about the p4-projects
mailing list