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

From: Benjamin Herrenschmidt (bh40@calva.net)
Date: Thu Jan 06 2000 - 13:25:10 EST


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.

-
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:06 EST