Re: (*(unsigned long *)&jiffies)++;

From: Florian Weimer (fw@s.netic.de)
Date: Fri Jan 07 2000 - 04:38:10 EST


tigran@sco.COM (Tigran Aivazian) writes:

> Why does do_timer() do:
>
> (*(unsigned long *)&jiffies)++;
>
> why not just jiffies++; ? It works fine with jiffies++ but I assume there
> is a reason...

It casts away the volatileness of `jiffies'. This means that GCC uses
`incl' instead of an explicit read/increment/write operation.

-
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/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:08 EST