Messages in this thread | | | From | "David Schwartz" <> | Subject | RE: (*(unsigned long *)&jiffies)++; | Date | Thu, 6 Jan 2000 11:51:03 -0800 |
| |
> On Thu, Jan 6, 2000, Andrea Arcangeli <andrea@suse.de> wrote: > > >>(*(unsigned long *)&jiffies)++; > >> > >>why not just jiffies++; ? It works fine with jiffies++ but I > assume there > >>is a reason... > > > >No reason. It won't make any difference. > > > >You could as well do jiffies++. jiffies is volatile so it can't be > >reodered across other `;' and it won't be cached into registers. > > Actually, I'm wondering if the explicit may even kill the volatile > attribute, thus allowing re-ordering... sounds bogus to me.
Exactly. What's the point of declaring it as volatile if you're later going to cast the volatile away? The compiler has the right to ignore the fact that it's volatile at that point.
DS
- 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/
| |