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

From: Davide Libenzi (dlibenzi@maticad.it)
Date: Thu Jan 06 2000 - 12:31:34 EST


On Thu, 06 Jan 2000, Richard B. Johnson wrote:
> > AFAIK the generated code is the same on intel.
> > Having a single instruction to increment a memory location ( in any
> > architecture ? ) why the compiler should split the operation ?

> This is not meant mean anything other than what was stated. I will
> wear my flak jacket when others try to change my statements into a
> C-war. 'C' is a good tool. In particular, it has grown to where it
> is the tool of choice for many writing portable code. However, specific
> memory locations, and specific read/write orderings are not portable.
> For this, you use another tool.

I don't want to start any C-war.
I use C from 1982 and it's my favourite programming language.
As You can see I've used a question mark to hilight the question nature of my
statement.
What I meant was :

Why split a sigle, atomic, register clobber free and less expensive instruction
like "incl xx" with a - load , incr , store sequence.

The only reason I can see is the absence of the "incl" instruction on some
processor.

Cheers,
        Davide.

-- 
"Debian, the freedom in freedom."

- 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