mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
- Pass &sched_lock as the third argument to cpu_switch() as this will
always be the correct lock and we don't get volatile warnings this way. Pointed out by: kan
This commit is contained in:
parent
36b369163b
commit
c219b097af
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170316
|
@ -903,7 +903,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* I feel sleepy */
|
/* I feel sleepy */
|
||||||
cpu_switch(td, newtd, td->td_lock);
|
cpu_switch(td, newtd, &sched_lock);
|
||||||
/*
|
/*
|
||||||
* Where am I? What year is it?
|
* Where am I? What year is it?
|
||||||
* We are in the same thread that went to sleep above,
|
* 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);
|
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cpu_switch(td, newtd, td->td_lock);
|
cpu_switch(td, newtd, &sched_lock);
|
||||||
#ifdef HWPMC_HOOKS
|
#ifdef HWPMC_HOOKS
|
||||||
if (PMC_PROC_IS_USING_PMCS(td->td_proc))
|
if (PMC_PROC_IS_USING_PMCS(td->td_proc))
|
||||||
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN);
|
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN);
|
||||||
|
|
Loading…
Reference in a new issue