develooper Front page | perl.perl6.internals | Postings from December 2001

[PATCH] Thread Local Storage

Thread Previous | Thread Next
From:
Jason Gloudon
Date:
December 22, 2001 08:43
Subject:
[PATCH] Thread Local Storage
Message ID:
20011222114233.A1275@gloudon.com

Here is a big diff that removes the interpreter argument from vtable function
calls, and creates macros for obtaining the pointer to an interpreter structure
for the current thread from thread local storage, assuming only that there is
one interpreter per thread. It works on unixish systems with pthread, on
mswin32, and systems with no threading (using a global variable). There is no
code here for creating threads etc., this is just intended to eliminate
gratuitous passing of the interpreter pointer to places it is not needed.
Currently it gives a small but consistent increase in the PMC mops figure of
about 5 percent.

I have separate platform thread files since there are a number of different
threading alternatives for some systems, though it might be more reasonable to
ifdef these in platform files.

I'd like to know if no one cares or does care and has suggestions.

-- 
Jason


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About