Re: Does NetBSD understand the __thread variable declaration ?

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


Date: Sat, 19 Nov 2005 04:52:56 GMT


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

> I write a portable multi threading platform program.
> Solaris and Linux (with glibc 2.3) both know the
>
> __threading int myvar;
>
> declaration to declare a thread local variable. Is this also
> implemented in the BSD Versions (Open,Free,Net) ? I don't want to use
> the uncomfortable "pthread_set/get_specific"

You mean __thread, I think, and not "__threading"?

AFAIUI, __thread is a gccism; an extension to the ISO C standard. If
your program is supposed to be portable, why would you want to use it?

I could be mistaken though.

Anyway, I don't believe NetBSD supports it.

Cheers,

        - Joel



Relevant Pages

  • Re: scanf doubt
    ... for input is a Windows extension which doesn't work on ... But when the C standard says that something ... It's not an extension, it's undefined behavior. ... We discuss ISO C and not extensions here? ...
    (comp.lang.c)
  • Re: scanf doubt
    ... for input is a Windows extension which doesn't work on ... But when the C standard says that something ... We discuss ISO C and not extensions here? ... by replying `32bit integer one's complement in X'. ...
    (comp.lang.c)
  • Re: fclose memory fault
    ... The functionality described is an extension to the ISO C standard. ... conforming to that standard supports automatically ). ...
    (comp.unix.programmer)
  • Re: Tentative definition versus external linkage
    ... "The Standard model is a combination of features of the strict ref/def ... appropriate declaration without storage class specifier, ... A definition of an identifier is a declaration for that ...
    (comp.lang.c)
  • Tentative definition versus external linkage
    ... I'm having some trouble understanding the rationale for C99 when it ... "The Standard model is a combination of features of the strict ref/def ... appropriate declaration without storage class specifier, ...
    (comp.lang.c)