httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <bh...@pobox.com>
Subject Re: Fibers and thread local storage
Date Mon, 18 Jan 1999 18:13:25 GMT
Dean Gaudet writes:
>> It is my impression that using fibers has one - and really only one
>> cost - e.g. we have to avoid thread local storage within request
>> processing. Can we manage that?
>
>If that's true, then microsoft screwed up.  It's bloody simple to
>implement TLS for userland/kernel hybrids.  I'd be surprised if that's the
>case... 

Having now reviewed the doc on the CD one more time I'm quite
confident that fibers have only one datum of private storage that is
passed to it upon creation accessed via an API call.  That's enough
machinery to simulate thread local storage but it's not what
the __declspec( thread ) is creating.  

One "proof" of this is the compiler switch /GT that tells the compiler
not to constant fold subexpressions involving thread local storage
because the fibers run using the scheduling contour of multiple
threads (and hence I presume the thread local storage of multiple
threads).

At one point they are said to as having only a stack and a register
set.  They seem to be "max-lite".

 - ben

Mime
View raw message