Re: [PATCH GIT 0.6] make use of register variables & size_t

From: Matthias-Christian Ott (matthias.christian_at_tiscali.de)
Date: 04/25/05

  • Next message: David Teigland: "[PATCH 1a/7] dlm: core locking"
    Date:	Mon, 25 Apr 2005 18:59:42 +0200
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    Linus Torvalds wrote:
    >
    > On Mon, 25 Apr 2005, Matthias-Christian Ott wrote:
    >
    >>The "git" didn't try store small variables, which aren't referenced, in
    >>the processor registers. It also didn't use the size_t type. I corrected
    >>a C++ style comment too.
    >
    >
    > What kind of ancient C standard are you working against?
    >
    > // isn't "C++" any more, and "register" variables are sooo 60's, man.
    >
    > Pass the toke,
    >
    > Linus
    >
    "register" and "auto" variables aren't relicts of the 60's, they're a
    part of the ISO-C 99 standard, I'm following, "man".

    And if you think "register" variables are outdated, please remove the
    CONFIG_REGPARM option from the Kernel source.

    Removing a "//" comment makes sense in this case because a "//" comment
    between hundrets of "/* */" comments looks extremly ugly and shows that
    the source is "patchworked" and unstructured.

    Today a lot of people forget about the basic rules of coding. You too. :)

    Matthias-Christian Ott

    Literature:
    [1] Dr.-Ing. Ludwig Claßen, Dipl.-Math. Ulrich Oefler: Unix und C: Ein
    Anwenderbuch; VEB Verlag Technik Berlin; 1990
    [2] Erik de Castro Lopo, Peter Aitken, Bradley L. Jones: Teach Yourself
    C for Linux Programming in 21 Days; SAMS Publishing; 1999

    -
    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/


  • Next message: David Teigland: "[PATCH 1a/7] dlm: core locking"

    Relevant Pages

    • Re: [PATCH GIT 0.6] make use of register variables & size_t
      ... It's just that the C standard hasn't ever ... had the reason to remove them. ... > CONFIG_REGPARM option from the Kernel source. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • VMI Interface Proposal Documentation for I386, Part 5
      ... to three register arguments. ... of the native instruction set. ... Most of these calls behave as standard C functions, and as such, may ... clobber registers EAX, EDX, ECX, flags. ...
      (Linux-Kernel)
    • Re: Recursive Call
      ... On IBM mainframes there was/is a standard linkage convention to be followed ... Register 15 contains the "branch to" address and Register ... this save area at entry to the subroutine. ...
      (comp.lang.cobol)
    • Re: multiple threads and volatile
      ... Yet the standard tries to guarantee that your code will work. ... ensured to be copied from memory to register, ... threads conceptual machine nor the POSIX threads conceptual machine ...
      (comp.programming.threads)
    • Re: [PATCH] Generic platform device IDE driver
      ... It's likely that ARM will switch over to using the MMIO resources if ... or we can simply have an element for the spacing interval if you ... Here's the decision matrix for libata: Will the hardware use the standard taskfile push/pull functions like ata_tf_load, ata_tf_read, ata_exec_command, etc.? ... If the hardware requires non-standard I/O accessors, or the register sizes themselves changed, then you must implement your own taskfile I/O ...
      (Linux-Kernel)