Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for - Mailing list pgsql-hackers-win32

From Cyrille Chepelov
Subject Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for
Date
Msg-id 20030925182218.GB21627@chepelov.org
Whole thread Raw
List pgsql-hackers-win32
Le Thu, Sep 25, 2003, à 12:57:09PM -0400, Bruce Momjian a écrit:
> Keith Bottner wrote:
> > Typically variables that you want to be per-thread are stored in what
> > Microsoft calls Thread Local Storage (TLS). Variables that you want shared
> > you can just treat as globals and statics with the appropriate threading
> > synchronization primitives. With Windows 2000 and later you have up to 1088
> > TLS locations that you can use, of course these can be pointers to memory
> > which can store whatever you want.
> Goes GCC on Windows support TLS, or only Microsoft compilers?

Well, for sure Borland C++ Builder has support for TLS. Gcc too
apparently:
    http://www-es.fernuni-hagen.de/cgi-bin/info2html?(gcc)Thread-Local

Doesn't seem specially hard to use, I guess the primary factor will be
the amount of static data currently used and how much of it should be
sent to the shared and non-shared bins.

    -- Cyrille

--

pgsql-hackers-win32 by date:

Previous
From: Jason Tishler
Date:
Subject: Re: [HACKERS] Win32 native port
Next
From: "Merlin Moncure"
Date:
Subject: Re: [HACKERS] Threads vs Processes