summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include/cpu.h')
-rw-r--r--sys/alpha/include/cpu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index 0edb2fc..cd49802 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -80,8 +80,12 @@ struct clockframe {
* buffer pages are invalid. On the hp300, request an ast to send us
* through trap, marking the proc as needing a profiling tick.
*/
-#define need_proftick(p) \
- do { (p)->p_flag |= P_OWEUPC; aston(); } while (0)
+#define need_proftick(p) do { \
+ mtx_enter(&sched_lock, MTX_SPIN); \
+ (p)->p_sflag |= PS_OWEUPC; \
+ mtx_exit(&sched_lock, MTX_SPIN); \
+ aston(); \
+} while (0)
/*
* Notify the current process (p) that it has a signal pending,
OpenPOWER on IntegriCloud