Page MenuHomeFreeBSD

D1969.1794517982.diff
No OneTemporary

Authored By
Unknown
Size
878 B
Referenced Files
None
Subscribers
None

D1969.1794517982.diff

Index: sys/kern/sched_ule.c
===================================================================
--- sys/kern/sched_ule.c
+++ sys/kern/sched_ule.c
@@ -2510,16 +2510,20 @@
ts = td->td_sched;
if (ts->ts_flags & TSF_BOUND)
sched_unbind(td);
- KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td));
- ts->ts_flags |= TSF_BOUND;
- sched_pin();
- if (PCPU_GET(cpuid) == cpu)
+ if (PCPU_GET(cpuid) == cpu) {
+ ts->ts_flags |= TSF_BOUND;
+ sched_pin();
return;
- ts->ts_cpu = cpu;
- /* When we return from mi_switch we'll be on the correct cpu. */
- mi_switch(SW_VOL, NULL);
+ }
+ else {
+ KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td));
+ ts->ts_flags |= TSF_BOUND;
+ sched_pin();
+ ts->ts_cpu = cpu;
+ /* When we return from mi_switch we'll be on the correct cpu. */
+ mi_switch(SW_VOL, NULL);
+ }
}
-
/*
* Release a bound thread.
*/

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 9:13 PM (16 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41684177
Default Alt Text
D1969.1794517982.diff (878 B)

Event Timeline