lkml.org 
[lkml]   [2001]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.5 gcc3 build patch
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/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.037 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site