Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[linux/fpc-iii.git] / drivers / oprofile / timer_int.c
blob333f915568c796683af2b49e51227e54914d97b2
1 /**
2 * @file timer_int.c
4 * @remark Copyright 2002 OProfile authors
5 * @remark Read the file COPYING
7 * @author John Levon <levon@movementarian.org>
8 */
10 #include <linux/kernel.h>
11 #include <linux/notifier.h>
12 #include <linux/smp.h>
13 #include <linux/oprofile.h>
14 #include <linux/profile.h>
15 #include <linux/init.h>
16 #include <asm/ptrace.h>
18 #include "oprof.h"
20 static int timer_notify(struct pt_regs *regs)
22 oprofile_add_sample(regs, 0);
23 return 0;
26 static int timer_start(void)
28 return register_timer_hook(timer_notify);
32 static void timer_stop(void)
34 unregister_timer_hook(timer_notify);
38 void __init oprofile_timer_init(struct oprofile_operations *ops)
40 ops->create_files = NULL;
41 ops->setup = NULL;
42 ops->shutdown = NULL;
43 ops->start = timer_start;
44 ops->stop = timer_stop;
45 ops->cpu_type = "timer";