Re: 2.4.5 gcc3 build patch

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue Jun 12 2001 - 19:12:42 EST


On Tue, Jun 12, 2001 at 04:27:33PM -0700, Richard Henderson wrote:
> We fixed a bug in cv-qualification checking.
>
> timer.c:35: conflicting types for `xtime'
> include/linux/sched.h:540: previous declaration of `xtime'
>
> There's no need for the volatile qualification here. One, being a
> struct it doesn't do any good, and two it's protected by xtime_lock.

wrong, the sec field of xtime is read all the time without any lock.
so xtime can change under you it has to be declared volatile or C
language will screwup. gcc 3.0 effectively spotted a bug in the kernel
that wasn't exporting xtime as volatile.

Right fix is this that I did just about 10 minutes ago after the 3.0
checkout ;)

        ftp://ftp.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.6pre2aa2/00_gcc-30-volatile-xtime-1

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 15 2001 - 21:00:16 EST