- Better fix for previous error; use DEVOLATILE on the td_lock pointer
it can actually sometimes be something other than sched_lock even on schedulers which rely on a global scheduler lock. Tested by: kan
This commit is contained in:
parent
c219b097af
commit
95e3a0bca3
@ -903,7 +903,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags)
|
||||
#endif
|
||||
|
||||
/* I feel sleepy */
|
||||
cpu_switch(td, newtd, &sched_lock);
|
||||
cpu_switch(td, newtd, __DEVOLATILE(struct mtx *, td->td_lock));
|
||||
/*
|
||||
* Where am I? What year is it?
|
||||
* We are in the same thread that went to sleep above,
|
||||
|
@ -1487,7 +1487,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags)
|
||||
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT);
|
||||
#endif
|
||||
|
||||
cpu_switch(td, newtd, &sched_lock);
|
||||
cpu_switch(td, newtd, __DEVOLATILE(struct mtx *, td->td_lock));
|
||||
#ifdef HWPMC_HOOKS
|
||||
if (PMC_PROC_IS_USING_PMCS(td->td_proc))
|
||||
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user