Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #26084

Re: How to name a function to indicate that they require calling from a critical section?

From Stephen Sprunk <stephen@sprunk.org>
Newsgroups comp.lang.c
Subject Re: How to name a function to indicate that they require calling from a critical section?
Date 2012-09-07 16:01 -0500
Organization A noiseless patient Spider
Message-ID <k2dnbm$rab$1@dont-email.me> (permalink)
References <12497759-f557-4c9a-a4f4-7bcf177b251d@googlegroups.com> <GhVUr.1067102$3s1.72445@fx12.am4> <lnr4rfvl3q.fsf@nuthaus.mib.org> <kfnk3w5kfne.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


On 07-Sep-12 10:37, Tim Rentsch wrote:
> Keith Thompson <kst-u@mib.org> writes:
>> (The kernel is arguably part of the implementation, and even if it 
>> isn't, it's probably ok for the developers to rely on certain
>> behaviors that aren't defined by the language standard.)
> 
> The Linux kernel is part of no existing C implementation.

The _running_ kernel is arguably part of the implementation; the kernel
_source being compiled_ is not.

> And, even if it were, it is not part of implementations running on other 
> operating systems (eg MS windows or MacOS), yet presumably it's expected 
> to be compileable some such environments, so it's still breaking the 
> rules regarding reserved identifiers.

The Linux kernel is only expected to be compilable by GCC, and successfully
compiling the Linux kernel is a gate in the GCC release process, so the two
are intimately tied together.

I would expect the same of Windows and MSVC, etc.  Kernels are special.

> Don't get me wrong, it's no big deal that these particular rules are 
> being broken in this case, but that doesn't mean the rules aren't being 
> broken.

In such a case, the normal rules are simply not relevant.

OTOH, that also means that one should always be careful before using kernel
source as an example of how to write non-kernel source.

S

-- 
Stephen Sprunk         "God does not play dice."  --Albert Einstein
CCIE #3723         "God is an inveterate gambler, and He throws the
K5SSS        dice at every possible opportunity." --Stephen Hawking

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to name a function to indicate that they require calling from a critical section? celephicus@gmail.com - 2012-08-08 18:55 -0700
  Re: How to name a function to indicate that they require calling from a critical section? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-09 08:31 -0400
  Re: How to name a function to indicate that they require calling from a critical section? "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> - 2012-08-09 12:24 -0700
    Re: How to name a function to indicate that they require calling from a critical section? Keith Thompson <kst-u@mib.org> - 2012-08-09 13:59 -0700
  Re: How to name a function to indicate that they require calling from a critical section? Andrew Cooper <amc96@cam.ac.uk> - 2012-08-09 21:43 +0100
    Re: How to name a function to indicate that they require calling from a critical section? Keith Thompson <kst-u@mib.org> - 2012-08-09 13:58 -0700
      Re: How to name a function to indicate that they require calling from a critical section? Andrew Cooper <amc96@cam.ac.uk> - 2012-08-09 23:11 +0100
        Re: How to name a function to indicate that they require calling from a critical section? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-09 18:22 -0400
      Re: How to name a function to indicate that they require calling from a critical section? Tim Rentsch <txr@alumni.caltech.edu> - 2012-09-07 08:37 -0700
        Re: How to name a function to indicate that they require calling from a critical section? Stephen Sprunk <stephen@sprunk.org> - 2012-09-07 16:01 -0500
          Re: How to name a function to indicate that they require calling from a critical section? Tim Rentsch <txr@alumni.caltech.edu> - 2012-09-07 18:37 -0700
            Re: How to name a function to indicate that they require calling from a critical section? Stephen Sprunk <stephen@sprunk.org> - 2012-09-30 00:17 -0500
              Re: How to name a function to indicate that they require calling from a critical section? Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-17 14:24 -0800
          Re: How to name a function to indicate that they require calling   from a critical section? Ian Collins <ian-news@hotmail.com> - 2012-09-08 13:56 +1200
            Re: How to name a function to indicate that they require calling   from a critical section? Stephen Sprunk <stephen@sprunk.org> - 2012-09-30 13:45 -0500

csiph-web