diff options
| author | Andy Grover <agrover@groveronline.com> | 2003-03-19 00:09:51 -0800 |
|---|---|---|
| committer | Andy Grover <agrover@groveronline.com> | 2003-03-19 00:09:51 -0800 |
| commit | b39e199b453be169dfd1adec9686978057c1dc0f (patch) | |
| tree | dd7162a8e62d003159d6250069194b48a72b76d0 /drivers/oprofile/buffer_sync.c | |
| parent | 99d5dfb972d15c955e274d3f67e3862ce8004311 (diff) | |
| parent | d99c48c60bc52561b3125dd1f85db7a77b7031ca (diff) | |
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
Diffstat (limited to 'drivers/oprofile/buffer_sync.c')
| -rw-r--r-- | drivers/oprofile/buffer_sync.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index c2b0b6a833a2..9162f38d8395 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c @@ -82,9 +82,16 @@ static struct notifier_block exit_mmap_nb = { int sync_start(void) { - int err = profile_event_register(EXIT_TASK, &exit_task_nb); + int err; + + init_timer(&sync_timer); + sync_timer.function = timer_ping; + sync_timer.expires = jiffies + DEFAULT_EXPIRE; + add_timer(&sync_timer); + + err = profile_event_register(EXIT_TASK, &exit_task_nb); if (err) - goto out; + goto out1; err = profile_event_register(EXIT_MMAP, &exit_mmap_nb); if (err) goto out2; @@ -92,16 +99,14 @@ int sync_start(void) if (err) goto out3; - init_timer(&sync_timer); - sync_timer.function = timer_ping; - sync_timer.expires = jiffies + DEFAULT_EXPIRE; - add_timer(&sync_timer); out: return err; out3: profile_event_unregister(EXIT_MMAP, &exit_mmap_nb); out2: profile_event_unregister(EXIT_TASK, &exit_task_nb); +out1: + del_timer_sync(&sync_timer); goto out; } |
