diff options
| author | zy <[email protected]> | 2023-11-26 22:53:11 -0500 |
|---|---|---|
| committer | zy <[email protected]> | 2023-11-26 22:53:11 -0500 |
| commit | 14ad544f85ff944b03fa583348b9548011e66faa (patch) | |
| tree | acd417afdb2cc37bf0b8b2e4d9474a214bedfaa2 /source/module | |
| parent | 70c24ad73ad8fbf83d37d56ebf3f6f1b1fc92105 (diff) | |
int i ...
Diffstat (limited to 'source/module')
| -rw-r--r-- | source/module/monitor_kernel_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/module/monitor_kernel_lib.c b/source/module/monitor_kernel_lib.c index 47021f0..bc639d2 100644 --- a/source/module/monitor_kernel_lib.c +++ b/source/module/monitor_kernel_lib.c @@ -119,7 +119,8 @@ static void sample_task_work(struct work_struct *work){ vm_record.tv = ktime_get_real(); vm_record.threshold_num = k_watch_timer->threshold_num; - for (int i = 0; i < vm_record.threshold_num; i++) { + int i; + for (i = 0; i < vm_record.threshold_num; i++) { kwarg = &k_watch_timer->k_watch_args[k_watch_timer->threshold_buffer[i]]; k_w_arg2threshold(kwarg, &vm_record.threshold_record[i]); } @@ -169,7 +170,8 @@ int monitor_init(void) { if (ret) return -1; // init workqueue - for (int i=0; i < MAX_TIMER_NUM; i++) { + int i; + for (i=0; i < MAX_TIMER_NUM; i++) { kernel_watch_timer *kw_timer = &kernel_wtimer_list[i]; INIT_WORK(&kw_timer->wk, sample_task_work); } |
