Re: Volatile magic

Pavel Machek (
Sat, 24 Jan 1998 19:43:42 +0100


> > Patch to scheduler is attached, it kills comment duplication, and adds
> > one volatile, which is IMO needed.
> Nope. It isnt needed. The case in asm/i386 is a special case where gcc
> optimisation outwits a clever misuse of the gcc calling convention

Hmm... So what is effect of
(*(unsigned long *)&jiffies)++;
when jiffies are volatile, anyway? I would expect that jiffies++; is
just enough...

> > Please note that if you want to know if long is 64bit, #if ((~0UL) ==
> > 0xffffffff) is not good way - what about crosscompiling? I already
> It is the right way to do it if your cross C pre-processor is decent. If
> your native and cross build compilers generate different output you have a
> MAJOR bug. So cpp should (and I think does) evaluate maths in the

What problems will you get? IMO even current kernel will compile, and
will even run, but all format strings will be broken. I do not think
that C specification says anything about aritmetics used in
preprocessor, and I do not think we should rely on this...

> targets maths format.


PS: Sorry for me thinking this is serious. I just thought it is.

I'm really 	   Pavel
Look at ;-).