Wojtek Meler wrote:
On Mon, Mar 24, 2003 at 09:59:36PM -0800, Zeev Suraski wrote:

If __thread is any similar to Tls under Windows (which would be my guess), then we can't use it directly. We're already using pthread_setspecific so we're extremely quick with fetches as it is. As I said, I also doubt very much that our performance penalty is solely due to fetches, but mostly based on other issues, which __thread will not alter in any way. You're more than encouraged to try and implement a __thread based solution in place of the pthread_setspecific solution and see if it makes any difference. If it does, we can investigate further in that direction and see if it's usable.


I suppose that __thread is similar to __declspec( thread ). I really don't
know what is faster - using


__thread / __declspec(thread) struct {..} thread_globals;


The reason it is not used in windows is because it does not (or at least at the time thread stuff was started it didn't) work correctly with dynamicaly loaded dll's. This was, at the time, well documented by MS to use TLS to get around the limitations of __declspec(thread).

Shane


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to