Re: [HACKERS] Threads vs Processes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>, "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
Subject: Re: [HACKERS] Threads vs Processes
Date: 2003-09-26 14:43:22
Message-ID: 15538.1064587402@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> Tom Lane wrote:
>> Surely the addresses can be assumed constant within a thread.
>> Otherwise we have a problem here too.

> Quoting from the MSDN:
> The address of a thread local object is not considered constant, and any
> expression involving such an address is not considered a constant
> expression.

Ah. That's probably reasonable. Still a bit of a PITA for us, as there
are various places that do give a static variable an initializer
pointing to another static. But that could be worked around I think.
I thought you were saying that the compiler would forbid taking a TLS
variable's address even at runtime.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-26 14:49:16 Re: [HACKERS] Threads vs Processes
Previous Message Shridhar Daithankar 2003-09-26 14:32:50 Re: invalid tid errors in latest 7.3.4 stable.

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2003-09-26 14:49:16 Re: [HACKERS] Threads vs Processes
Previous Message Shridhar Daithankar 2003-09-26 12:34:11 Re: [HACKERS] Threads vs Processes