Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103564674
D23492.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
741 B
Referenced Files
None
Subscribers
None
D23492.diff
View Options
Index: head/sys/kern/sched_ule.c
===================================================================
--- head/sys/kern/sched_ule.c
+++ head/sys/kern/sched_ule.c
@@ -2605,15 +2605,17 @@
sched_setpreempt(td);
#else
tdq = TDQ_SELF();
- TDQ_LOCK(tdq);
/*
* Now that the thread is moving to the run-queue, set the lock
* to the scheduler's lock.
*/
- if ((flags & SRQ_HOLD) != 0)
- td->td_lock = TDQ_LOCKPTR(tdq);
- else
- thread_lock_set(td, TDQ_LOCKPTR(tdq));
+ if (td->td_lock != TDQ_LOCKPTR(tdq)) {
+ TDQ_LOCK(tdq);
+ if ((flags & SRQ_HOLD) != 0)
+ td->td_lock = TDQ_LOCKPTR(tdq);
+ else
+ thread_lock_set(td, TDQ_LOCKPTR(tdq));
+ }
tdq_add(tdq, td, flags);
if (!(flags & SRQ_YIELDING))
sched_setpreempt(td);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 2:10 PM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14886531
Default Alt Text
D23492.diff (741 B)
Attached To
Mode
D23492: Fix the !SMP case in sched_add().
Attached
Detach File
Event Timeline
Log In to Comment