Page MenuHomeFreeBSD

D44050.diff
No OneTemporary

D44050.diff

diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -981,15 +981,9 @@
sched_lend_user_prio_cond(struct thread *td, u_char prio)
{
- if (td->td_lend_user_pri != prio)
- goto lend;
- if (td->td_user_pri != min(prio, td->td_base_user_pri))
- goto lend;
- if (td->td_priority != td->td_user_pri)
- goto lend;
- return;
-
-lend:
+ if (td->td_lend_user_pri == prio)
+ return;
+
thread_lock(td);
sched_lend_user_prio(td, prio);
thread_unlock(td);
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -2007,15 +2007,9 @@
sched_lend_user_prio_cond(struct thread *td, u_char prio)
{
- if (td->td_lend_user_pri != prio)
- goto lend;
- if (td->td_user_pri != min(prio, td->td_base_user_pri))
- goto lend;
- if (td->td_priority != td->td_user_pri)
- goto lend;
- return;
+ if (td->td_lend_user_pri == prio)
+ return;
-lend:
thread_lock(td);
sched_lend_user_prio(td, prio);
thread_unlock(td);

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 12, 3:00 AM (18 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23605200
Default Alt Text
D44050.diff (1 KB)

Event Timeline