patch-2.4.0-test5 linux/arch/arm/kernel/time.c
Next file: linux/arch/arm/kernel/traps.c
Previous file: linux/arch/arm/kernel/sys_arm.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Tue Jul 18 22:43:24 2000
- Orig file:
v2.4.0-test4/linux/arch/arm/kernel/time.c
- Orig date:
Mon Jul 10 16:47:19 2000
diff -u --recursive --new-file v2.4.0-test4/linux/arch/arm/kernel/time.c linux/arch/arm/kernel/time.c
@@ -30,7 +30,7 @@
extern int setup_arm_irq(int, struct irqaction *);
extern void setup_timer(void);
extern rwlock_t xtime_lock;
-extern volatile unsigned long lost_ticks;
+extern unsigned long wall_jiffies;
/* change this if you have some constant time drift */
#define USECS_PER_JIFFY (1000000/HZ)
@@ -189,7 +189,7 @@
read_lock_irqsave(&xtime_lock, flags);
usec = gettimeoffset();
{
- unsigned long lost = lost_ticks;
+ unsigned long lost = jiffies - wall_jiffies;
if (lost)
usec += lost * USECS_PER_JIFFY;
@@ -218,7 +218,7 @@
* would have done, and then undo it!
*/
tv->tv_usec -= gettimeoffset();
- tv->tv_usec -= lost_ticks * USECS_PER_JIFFY;
+ tv->tv_usec -= (jiffies - wall_jiffies) * USECS_PER_JIFFY;
while (tv->tv_usec < 0) {
tv->tv_usec += 1000000;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)