- ctx.cur_thread = current_thread();
- ctx.cur_pid = task_pid(get_threadtask(ctx.cur_thread));
-
- /* who fired */
- ctx.trigger_type = TRIGGER_TYPE_TIMER;
- ctx.trigger_id = (unsigned int)(timer - kperf_timerv);
+ thread_t thread = current_thread();
+ task_t task = get_threadtask(thread);
+ struct kperf_context ctx = {
+ .cur_thread = thread,
+ .cur_task = task,
+ .cur_pid = task_pid(task),
+ .trigger_type = TRIGGER_TYPE_TIMER,
+ .trigger_id = (unsigned int)(timer - kperf_timerv),
+ };