Re: Committing Resources to Win32 - Mailing list pgsql-hackers-win32

From Claudio Natoli
Subject Re: Committing Resources to Win32
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B028004@harris.memetrics.local
Whole thread Raw
In response to Committing Resources to Win32  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Committing Resources to Win32  ("Marc G. Fournier" <scrappy@postgresql.org>)
List pgsql-hackers-win32
> I'm trying to understand this. Is it that the existing code references
> static data in so many places that it impractical to move all
> that into a structures?

More like "unjustifiable for a single port" than impractical.


> You could put a structure high up on the stack of each thread and pass
> down a pointer to it, or use a hash on thread id to reference
> the data.

The second approach is more or less what I'm doing myself on a private port.
However, the code for this simply would not integrate cleanly with the
existing source base. What would is use of the __declspec(thread) directive,
which could be macro'd into the definition of each global var under Win32.
This, with some other related changes, would bring a Win32 multi-threaded
port into existence in short order, however is not (yet) supported under the
MingW environment.

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

pgsql-hackers-win32 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: WIN32_DEV CVS branch
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Committing Resources to Win32