diff options
author | jeff <jeff@FreeBSD.org> | 2007-06-05 04:12:46 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-06-05 04:12:46 +0000 |
commit | dcba3b4fa8419f3d5a1fbb4a0008976414cb062c (patch) | |
tree | dca37ea584135d911cd4d19a155d84fc7f507a9a /sys/kern | |
parent | bec3346df40450e253beff2aa53827212bf6000b (diff) | |
download | FreeBSD-src-dcba3b4fa8419f3d5a1fbb4a0008976414cb062c.zip FreeBSD-src-dcba3b4fa8419f3d5a1fbb4a0008976414cb062c.tar.gz |
- 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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sched_4bsd.c | 2 | ||||
-rw-r--r-- | sys/kern/sched_ule.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index bd3286c..86e8dad 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -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, diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 895410b..e374b50 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -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); |