Re: Does NetBSD understand the __thread variable declaration ?

From: Joel Reicher (joel_at_panacea.null.org)
Date: 11/19/05

  • Next message: jpd: "Re: Does NetBSD understand the __thread variable declaration ?"
    Date: Sat, 19 Nov 2005 20:53:57 GMT
    
    

    "llothar" <llothar@web.de> writes:

    > It is portable among all OS that support at least the mimium for
    > multithreaded programming.
    >
    > It is "__thread", yes thats right and it is a gcc/glib feature.

    How can you say these two things together? If you use "__thread",
    which is a feature of a particular compiler, your code will not be
    portable.

    > But i
    > think more a os runtime then a compiler feature. Also solaris has this
    > and windows has exact the same as "declspec(thread)".

    What thread *semantics* are supported in the kernel is an OS
    issue. How this is accessed in the syntax of a language, if at all, is
    a compiler issue.

    > I also don't think that BSD's support this as they were in the past
    > terrible bad in multithreading. I just hoped that today where i can buy
    > a dual core in each discounter like Wal-Mart or the german Aldi, some
    > people realized that multithreading is a "must have" feature now.

    NetBSD supports all that you want just fine. The kernel has these
    semantics. You just have to use pthread_get/setspecific() instead of a
    cute little keyword to access it.

    Cheers,

            - Joel


  • Next message: jpd: "Re: Does NetBSD understand the __thread variable declaration ?"

    Relevant Pages

    • amd64 bitops fix for -Os
      ... filesystem, the kernel mostly hangs. ... When optimizing for speed, the generated code is such that the flags ... Obviously the asm statement must not rely on the compiler setting up ... -inline long find_first_zero_bit(const unsigned long * addr, ...
      (Linux-Kernel)
    • Re: amd64 bitops fix for -Os
      ... > kernel build. ... because its inline asm assumes at least one iteration ... the generated code is such that the flags ... although in a perfect world the compiler would be ...
      (Linux-Kernel)
    • Re: Language features worth proposing
      ... Some directive to disallow implicit external procedures. ... one could argue that a compiler flag to do this is ... partly because string conversion is 'fuzzy'. ... for some pet feature to be added. ...
      (comp.lang.fortran)
    • Newbie Q: spca5xx webcam driver installation problem
      ... with the included default makefile. ... Building SPCA5XX driver for 2.5/2.6 kernel. ... # Setup the tools ... # Setup compiler warnings ...
      (comp.os.linux.setup)
    • Re: Problem setting up lm-sensors
      ... >> they built the kernel. ... >> Why does the Makefile not use .config? ... >> I assume no one wants to see that 727 line Makefile. ... >> question as to what compiler I should use. ...
      (comp.os.linux.misc)