Skip to contentSkip to conversation

do_timer api change common part.

PATCH New Martin Schwidefsky 1 participant 1 message Jul 4, 2002 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_timer api change common part.

Hi,
while working with my timer patch stuff I wondered about two details of do_timer and update_process_times. It bothered me that do_timer calls update_process_times in the non smp case. In the smp case it is cleanly separated, so why not let the caller of do_timer always do the call to update_process_times?
The second thing is that you can only account for a single tick with a call to do_timer & update_process_times.

I extracted the relevant parts of the timer patch for review. The arch part of the change is in the second mail and is only relevant if this first one makes sense to you.

blue skies,
Martin.

include/linux/sched.h +3 -2
diff -urN linux-2.5.24/include/linux/sched.h linux-2.5.24-timer/include/linux/sched.h
@@ -147,7 +147,8 @@
 extern void show_state(void);
 extern void cpu_init (void);
 extern void trap_init(void);
-extern void update_process_times(int user);
+extern void update_process_times(unsigned long user_ticks,
+				 unsigned long system_ticks);
 extern void update_one_process(struct task_struct *p, unsigned long user,
 			       unsigned long system, int cpu);
 extern void scheduler_tick(int user_tick, int system);
@@ -482,7 +483,7 @@
 
 extern unsigned long itimer_ticks;
 extern unsigned long itimer_next;
-extern void do_timer(struct pt_regs *);
+extern void do_timer(unsigned long ticks);
 
 extern unsigned int * prof_buffer;
 extern unsigned long prof_len;
kernel/timer.c +16 -36

102 lines not on this page · raw message