Re: [PATCHES] UnixWare/CVS Tip/initdb.c needs to use threads

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [PATCHES] UnixWare/CVS Tip/initdb.c needs to use threads
Date: 2004-03-22 06:12:03
Message-ID: 200403220612.i2M6C3w27199@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Larry Rosenman wrote:
> The a.out (not any library) should be linked with -Kpthread (not
> -lpthread).
> This will force libthread to be linked in the right order relative to
> libc, libC, networking libraries, etc.
>
> In other words, the entire application either is or is not linked with
> threads; it's not a property of an individual library.
>
>
> SO, IF we are using the threads flags, we need to use them on ALL
> libpq-using programs, ours or the users.

Seems we have a few options for making threaded libpq on Unixware:

o remove thread-safe SIGPIPE code, which calls thread library

o create a threaded and non-threaded libpq library

o add a libpq function that enables threading, and do dynamic
linking of thread calls based on that function

o Add thread flags to all builds on that platform, including
the backend

o Add the ability to specify compile/link flags for everything
but the backend

As I remember, libcrypt used to be required by all libpq builds on
various platforms. This seems to be a similar case.

I think the last option might be the best. Somehow create different
cppflags/libs for the backend and non-backend programs.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Manfred Spraul 2004-03-22 06:12:59 Re: [HACKERS] libpq thread safety
Previous Message Bruce Momjian 2004-03-22 05:59:25 Re: [HACKERS] UnixWare/CVS Tip/initdb.c needs to use threads

Browse pgsql-patches by date

  From Date Subject
Next Message Manfred Spraul 2004-03-22 06:12:59 Re: [HACKERS] libpq thread safety
Previous Message Bruce Momjian 2004-03-22 05:59:25 Re: [HACKERS] UnixWare/CVS Tip/initdb.c needs to use threads