All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: user-mode port 0.44-2.4.7
Date: Wed, 25 Jul 2001 19:37:20 -0400	[thread overview]
Message-ID: <3B5F5830.253C2E0D@nortelnetworks.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0107251615430.22383-100000@penguin.transmeta.com>

Linus Torvalds wrote:
> 
> On Thu, 26 Jul 2001, Andrea Arcangeli wrote:
> >
> > I will if Honza assures me that no future version of gcc will cause me to
> > crash if I don't declare xtime volatile and I play with it while it can
> > change under me (which seems not the case from his last email).
> 
> WHY DO YOU NOT ADD THE "VOLATILE" TO THE PLACES THAT _CARE_?
> 
> This is not a gcc issue. Even if gcc _were_ to generate bad code, the
> global volatile _still_ wouldn't be the correct answer.

I think his worry is the pedantic reason that without the volatile gcc is
allowed to write code that chokes and dies if xtime happens to change in a
volatile manner.  The example given earlier was:

code as written:
	kprintf("%d\n",xtime.tv_usec);

code as compiled by gcc (with xtime not specified as volatile):
	suseconds_t temp = xtime.tv_usec;
	if (temp != xtime.tv_usec)
		BUG();
	kprintf"%d\n",temp);

I hope that gcc would not do such a thing, but I think a case could be made that
it could do it and still comply with the language standard.

Of course, since the linux kernel is an important thing for gcc to compile, I
can't imagine them doing something that would break it on purpose without a
really good reason.

Chris


-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

  reply	other threads:[~2001-07-25 23:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-23  5:08 user-mode port 0.44-2.4.7 Jeff Dike
2001-07-23 15:56 ` Andrea Arcangeli
2001-07-23 15:59   ` Andrea Arcangeli
2001-07-23 16:17     ` Andrea Arcangeli
2001-07-23 16:51       ` Andrea Arcangeli
2001-07-23 16:33   ` Linus Torvalds
2001-07-23 16:45     ` Andrea Arcangeli
2001-07-23 17:32       ` Linus Torvalds
2001-07-23 17:50         ` Andrea Arcangeli
2001-07-23 18:11           ` Linus Torvalds
2001-07-23 18:27             ` Andrea Arcangeli
2001-07-23 20:00               ` Linus Torvalds
2001-07-23 20:15                 ` Jonathan Lundell
2001-07-23 22:51                   ` Linus Torvalds
2001-07-24  3:45                     ` Jonathan Lundell
2001-07-24 15:41                       ` Davide Libenzi
2001-07-24 15:46                         ` Alexander Viro
2001-07-24 16:01                           ` Davide Libenzi
2001-07-24 16:08                             ` Alexander Viro
2001-07-24 16:52                               ` Davide Libenzi
2001-07-24 16:59                                 ` Linus Torvalds
2001-07-24 17:31                                   ` Davide Libenzi
2001-07-24 17:38                                     ` Linus Torvalds
2001-07-24 18:07                               ` Anton Altaparmakov
2001-07-23 20:44                 ` Chris Friesen
2001-07-23 21:11                   ` Andrea Arcangeli
2001-07-23 21:50                     ` Richard Gooch
2001-07-23 22:09                       ` Andrea Arcangeli
2001-07-23 13:20                         ` Rob Landley
2001-07-23 22:27                           ` Andrea Arcangeli
2001-07-23 17:50                             ` Rob Landley
2001-07-23 23:47                         ` Richard Gooch
2001-07-24  0:04                           ` Andrea Arcangeli
2001-07-24  9:02                             ` Jan Hubicka
2001-07-24 15:35                               ` Linus Torvalds
2001-07-24 16:04                             ` Linus Torvalds
2001-07-25 22:49                               ` Andrea Arcangeli
2001-07-25 23:16                                 ` Linus Torvalds
2001-07-25 23:37                                   ` Chris Friesen [this message]
2001-07-26 18:28                                 ` Jan Hubicka
2001-07-26 18:35                                   ` Alan Cox
2001-07-23 22:53                   ` Linus Torvalds
2001-07-23 23:13                     ` Alan Cox
2001-07-23 20:25   ` Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2001-07-25 19:03 James W. Lake
     [not found] <no.id>
2001-07-23 20:57 ` Alan Cox
2001-07-23 21:14   ` Chris Friesen
2001-07-25 19:12 ` Alan Cox
2001-07-25 23:49 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B5F5830.253C2E0D@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.