aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/oprof.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2009-07-15 09:19:29 -0400
committerRobert Richter <robert.richter@amd.com>2009-07-20 10:43:19 -0400
commitafe1b50fe6aa56093e9234bdc08779e9fe20b5bf (patch)
tree9c6ce25e09476a0d6c16ceabda66323dd3f5aefe /drivers/oprofile/oprof.c
parent2051cade7ccbe45a8bf8b7809d56b23d6d75ad03 (diff)
oprofile: Rename variable timeout_jiffies and move to oprofile_files.c
This patch renames timeout_jiffies into an oprofile specific name. The macro MULTIPLEXING_TIMER_DEFAULT is changed too. Also, since this variable is controlled using oprofilefs, its definition is moved to oprofile_files.c. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/oprofile/oprof.c')
-rw-r--r--drivers/oprofile/oprof.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index 42c9c765f9f..2b33de71641 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -33,8 +33,7 @@ static DEFINE_MUTEX(start_mutex);
33 33
34static void switch_worker(struct work_struct *work); 34static void switch_worker(struct work_struct *work);
35static DECLARE_DELAYED_WORK(switch_work, switch_worker); 35static DECLARE_DELAYED_WORK(switch_work, switch_worker);
36unsigned long timeout_jiffies; 36#define TIME_SLICE_DEFAULT 1
37#define MULTIPLEXING_TIMER_DEFAULT 1
38 37
39#endif 38#endif
40 39
@@ -102,7 +101,7 @@ out:
102 101
103static void start_switch_worker(void) 102static void start_switch_worker(void)
104{ 103{
105 schedule_delayed_work(&switch_work, timeout_jiffies); 104 schedule_delayed_work(&switch_work, oprofile_time_slice);
106} 105}
107 106
108static void switch_worker(struct work_struct *work) 107static void switch_worker(struct work_struct *work)
@@ -216,7 +215,7 @@ int oprofile_set_timeout(unsigned long val_msec)
216 goto out; 215 goto out;
217 } 216 }
218 217
219 timeout_jiffies = time_slice; 218 oprofile_time_slice = time_slice;
220 219
221out: 220out:
222 mutex_unlock(&start_mutex); 221 mutex_unlock(&start_mutex);
@@ -253,7 +252,7 @@ out:
253 252
254static void __init oprofile_multiplexing_init(void) 253static void __init oprofile_multiplexing_init(void)
255{ 254{
256 timeout_jiffies = msecs_to_jiffies(MULTIPLEXING_TIMER_DEFAULT); 255 oprofile_time_slice = msecs_to_jiffies(TIME_SLICE_DEFAULT);
257} 256}
258 257
259#endif 258#endif