lkml.org 
[lkml]   [2000]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (*(unsigned long *)&jiffies)++;
Tigran Aivazian wrote:
>
> Ok, then it applies to lost_ticks and lost_ticks_system as well. And
> therefore a cleaner way of doing it (as Richard Johnson suggested) would
> be in asm:
>
> --- timer.c.0 Thu Jan 6 15:13:21 2000
> +++ timer.c Thu Jan 6 15:15:31 2000
> @@ -629,12 +629,11 @@
>
> void do_timer(struct pt_regs * regs)
> {
> - /* (*(unsigned long *)&jiffies)++; */
> - jiffies++;
> - lost_ticks++;
> + __asm__ __volatile__("incl jiffies");
> + __asm__ __volatile__("incl lost_ticks");
> mark_bh(TIMER_BH);
> if (!user_mode(regs))
> - lost_ticks_system++;
> + __asm__ __volatile__("incl lost_ticks_system");
> if (tq_timer)
> mark_bh(TQUEUE_BH);
> }
>
> Thsi is better than the *& hack because it is gcc-version-independent.


IMHO untill this is in the arch independent part of the kernel it is
better to use *& hacks.


Petkan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:2.224 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site