aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-09-29 09:44:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-09-29 11:09:14 -0400
commitb00c1a99e7758f794923c61e5cd55268d61c9469 (patch)
treeaace17598caf3dfaa01f8f2f4c6e587bb1f9a2f8 /include
parent41e1022eae71707f1ce6801a746f70b1e57b7567 (diff)
hrtimer: mark migration state
Impact: during migration active hrtimers can be seen as inactive The migration code removes the hrtimers from the queues of the dead CPU and sets the state temporary to INACTIVE. The enqueue code sets it to ACTIVE/PENDING again. Prevent that the wrong state can be seen by using a separate migration state bit. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 6d93dce61cbb..bdd88df1b4e5 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -67,9 +67,10 @@ enum hrtimer_cb_mode {
67 * 0x02 callback function running 67 * 0x02 callback function running
68 * 0x04 callback pending (high resolution mode) 68 * 0x04 callback pending (high resolution mode)
69 * 69 *
70 * Special case: 70 * Special cases:
71 * 0x03 callback function running and enqueued 71 * 0x03 callback function running and enqueued
72 * (was requeued on another CPU) 72 * (was requeued on another CPU)
73 * 0x09 timer was migrated on CPU hotunplug
73 * The "callback function running and enqueued" status is only possible on 74 * The "callback function running and enqueued" status is only possible on
74 * SMP. It happens for example when a posix timer expired and the callback 75 * SMP. It happens for example when a posix timer expired and the callback
75 * queued a signal. Between dropping the lock which protects the posix timer 76 * queued a signal. Between dropping the lock which protects the posix timer
@@ -87,6 +88,7 @@ enum hrtimer_cb_mode {
87#define HRTIMER_STATE_ENQUEUED 0x01 88#define HRTIMER_STATE_ENQUEUED 0x01
88#define HRTIMER_STATE_CALLBACK 0x02 89#define HRTIMER_STATE_CALLBACK 0x02
89#define HRTIMER_STATE_PENDING 0x04 90#define HRTIMER_STATE_PENDING 0x04
91#define HRTIMER_STATE_MIGRATE 0x08
90 92
91/** 93/**
92 * struct hrtimer - the basic hrtimer structure 94 * struct hrtimer - the basic hrtimer structure