diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-01-13 01:03:44 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-01-13 01:03:44 +0100 |
commit | cc00657854df4e868598b6447ea5599798604da9 (patch) | |
tree | 458e3a04aabf424fed3c7eecdf7980352f030eb1 /xen/include/xen/timer.h | |
parent | c5c75c292628864e2f22c4186f8f16da10fbe6da (diff) | |
download | xen-cc00657854df4e868598b6447ea5599798604da9.tar.gz xen-cc00657854df4e868598b6447ea5599798604da9.tar.bz2 xen-cc00657854df4e868598b6447ea5599798604da9.zip |
Add a new timer operation kill_timer(). Effectively the
'opposite' of init_timer(), it marks the end of a timer's
lifetime. After this call the timer will not be pending,
its callback handler will not be running, and future calls
to set_timer() will silently fail.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/timer.h')
-rw-r--r-- | xen/include/xen/timer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/include/xen/timer.h b/xen/include/xen/timer.h index c89e98c346..f53a7ed35f 100644 --- a/xen/include/xen/timer.h +++ b/xen/include/xen/timer.h @@ -22,6 +22,8 @@ struct timer { void *data; /* Timer-heap offset. */ unsigned int heap_offset; + /* Has this timer been killed (cannot be activated)? */ + int killed; }; /* @@ -64,6 +66,13 @@ extern void set_timer(struct timer *timer, s_time_t expires); extern void stop_timer(struct timer *timer); /* + * Deactivate a timer and prevent it from being re-set (future calls to + * set_timer will silently fail). When this function returns it is guaranteed + * that the timer callback handler is not running on any CPU. + */ +extern void kill_timer(struct timer *timer); + +/* * Initialisation. Must be called before any other timer function. */ extern void timer_init(void); |