- 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:
Jeff Roberson 2007-06-05 03:46:54 +00:00
parent 36b369163b
commit c219b097af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170316
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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);