Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131781489
D44050.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44050.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D44050: sched: Simplify sched_lend_user_prio_cond()
Attached
Detach File
Event Timeline
Log In to Comment