|
|
|
|
|
|
| Author |
Message |
FanJet *nix forums beginner
Joined: 23 Feb 2005
Posts: 8
|
Posted: Wed Nov 23, 2005 3:39 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
jpd wrote:
| Quote: | Begin <1132448606.787420.74410@z14g2000cwz.googlegroups.com
On 2005-11-20, llothar <llothar@web.de> wrote:
[Context missing. You are welcome to fix that]
I'm not a troll, i'm an power user/programmer with much more
experience then most of the people.
Ah, clearly a DAU.
That is, if you are in the 10-to-16 demographic I encourage you to
grow up. In case that you are not, I'll classify you as one of the
most dangerous types of luser: bigheaded, clueless, and refusing to
grow up. As a system administrator for a software company, I had to
deal with far too many of you, and I know in painful detail how
utterly annoying the endless stupidity of ``power users'' can be. In
an entirely different way just as painful and annoying as that other
bane of sane people, the salescritter.
And i never did a multipost. I just have the same question for two
operating systems.
The question was more a less a simple "yes" or "no sorry, not yet".
I think you are more confused than you care to admit. I am not well
versed in the intrinsics of thread programming, but to me it was clear
enough that the clearest part of your question was that it was self-
contradictory. If you mean to say the answer to your question was a
simple yes or no, then I think it has been amply demonstrated by
others that that was simply not the case.
|
Yessir! |
|
| Back to top |
|
 |
Joel Reicher *nix forums beginner
Joined: 15 Nov 2005
Posts: 29
|
Posted: Sun Nov 20, 2005 3:10 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
"llothar" <llothar@web.de> writes:
| Quote: | No __thread is going deeper. It must be supported by specific sections
in the ELF executable, so it must be implemented in the loader.
|
Yes, you're quite right. This is a recent and *optional* extension to
the ELF spec.
I apologise, I wasn't aware of these details. It makes your code even
less portable than I at first thought.
Cheers,
- Joel |
|
| Back to top |
|
 |
jpd *nix forums Guru
Joined: 22 Feb 2005
Posts: 877
|
Posted: Sun Nov 20, 2005 1:25 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
Begin <1132448606.787420.74410@z14g2000cwz.googlegroups.com>
On 2005-11-20, llothar <llothar@web.de> wrote:
[Context missing. You are welcome to fix that]
| Quote: | I'm not a troll, i'm an power user/programmer with much more experience
then most of the people.
|
Ah, clearly a DAU.
That is, if you are in the 10-to-16 demographic I encourage you to grow
up. In case that you are not, I'll classify you as one of the most
dangerous types of luser: bigheaded, clueless, and refusing to grow up.
As a system administrator for a software company, I had to deal with far
too many of you, and I know in painful detail how utterly annoying the
endless stupidity of ``power users'' can be. In an entirely different
way just as painful and annoying as that other bane of sane people, the
salescritter.
| Quote: | And i never did a multipost. I just have the same question for two
operating systems.
The question was more a less a simple "yes" or "no sorry, not yet".
|
I think you are more confused than you care to admit. I am not well
versed in the intrinsics of thread programming, but to me it was clear
enough that the clearest part of your question was that it was self-
contradictory. If you mean to say the answer to your question was a
simple yes or no, then I think it has been amply demonstrated by others
that that was simply not the case.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law. |
|
| Back to top |
|
 |
Lothar Scholz *nix forums Guru Wannabe
Joined: 17 Apr 2005
Posts: 176
|
Posted: Sun Nov 20, 2005 1:03 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
I'm not a troll, i'm an power user/programmer with much more experience
then most of the people.
And i never did a multipost. I just have the same question for two
operating systems.
The question was more a less a simple "yes" or "no sorry, not yet". |
|
| Back to top |
|
 |
Lothar Scholz *nix forums Guru Wannabe
Joined: 17 Apr 2005
Posts: 176
|
Posted: Sun Nov 20, 2005 1:01 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
No __thread is going deeper. It must be supported by specific sections
in the ELF executable, so it must be implemented in the loader.
The code is still cross plattform and portable, not to Net/Open BSD but
to any modern operating system. It doesn't matter how this is called,
its the concept that must be there and i think it is missing in NetBSD.
pthread_get/setspecific can never be as efficient as a __thread
declared variable which is a simple indirect access. It's easier to use
and does not have any of the restrictions
of the pthreads. And i have use cases where this is a critical factor.
I'm not talking with you about the usefullness of this feature, this is
already proven. I'm tired about explaining why 2+2 is 4. I'm currently
adding multithreading to the GNU Eiffel compiler and have to generate
the correct backend code (Eiffel compiles to C) and port some runtime
features. |
|
| Back to top |
|
 |
jpd *nix forums Guru
Joined: 22 Feb 2005
Posts: 877
|
Posted: Sat Nov 19, 2005 9:11 pm Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
Begin <1132431728.390842.131870@z14g2000cwz.googlegroups.com>
On 2005-11-19, llothar <llothar@web.de> wrote:
[lots of barely coherent drivel]
You know, I think you are a troll.
Not that the multiposting isn't a giveaway, oh no.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law. |
|
| Back to top |
|
 |
Joel Reicher *nix forums beginner
Joined: 15 Nov 2005
Posts: 29
|
Posted: Sat Nov 19, 2005 8:53 pm Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
"llothar" <llothar@web.de> writes:
| Quote: | 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.
| Quote: | 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.
| Quote: | 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 |
|
| Back to top |
|
 |
Lothar Scholz *nix forums Guru Wannabe
Joined: 17 Apr 2005
Posts: 176
|
Posted: Sat Nov 19, 2005 8:22 pm Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
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. But i
think more a os runtime then a compiler feature. Also solaris has this
and windows has exact the same as "declspec(thread)".
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. |
|
| Back to top |
|
 |
Joel Reicher *nix forums beginner
Joined: 15 Nov 2005
Posts: 29
|
Posted: Sat Nov 19, 2005 4:52 am Post subject:
Re: Does NetBSD understand the __thread variable declaration ?
|
|
|
"llothar" <llothar@web.de> writes:
| Quote: | 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 |
|
| Back to top |
|
 |
Lothar Scholz *nix forums Guru Wannabe
Joined: 17 Apr 2005
Posts: 176
|
Posted: Sat Nov 19, 2005 3:16 am Post subject:
Does NetBSD understand the __thread variable declaration ?
|
|
|
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" |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Tue Jan 06, 2009 1:22 pm | All times are GMT
|
|
Loans | Web Advertising | Credit Card Consolidation | Credit Card Debt Consolidation | Server setup
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|