Add thread.c and linkage
Here is a new file, threads.c, which implements the functions needed for
libpq threading.
One tricky part was to add the threading flags to the compile of just
thread.c. I used:
# compile this with thread flags
thread.o: thread.c
$(CC) $(CFLAGS) $(THREAD_CFLAGS) -c thread.c
I assume that is the correct way to do it.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
It seems really ugly to be putting a big case statement on the OS type
into configure. Can't you put those values into the per-platform
template files, instead?
regards, tom lane
Tom Lane wrote:
It seems really ugly to be putting a big case statement on the OS type
into configure. Can't you put those values into the per-platform
template files, instead?
I hadn't thought of that. We can do that. However, seems we have to
have a test in there anyway to know whether we can do threads at all, or
do we make a new variable and set it to true only in the templates that
support it?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian <pgman@candle.pha.pa.us> writes:
do we make a new variable and set it to true only in the templates that
support it?
That's what I'd suggest.
regards, tom lane
Done.
---------------------------------------------------------------------------
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
do we make a new variable and set it to true only in the templates that
support it?That's what I'd suggest.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073