Re: 64-bit pgsql

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: 64-bit pgsql
Дата
Msg-id 200309102232.h8AMWR400918@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: 64-bit pgsql  (Jeroen Ruigrok/asmodai <asmodai@wxs.nl>)
Список pgsql-hackers
Jeroen Ruigrok/asmodai wrote:
> -On [20030905 20:52], Tom Lane (tgl@sss.pgh.pa.us) wrote:
> >Alternatively, find out what symbols your compiler predeclares.
> >If my theory is right then your pg_config_os.h file is failing to
> >define HAS_TEST_AND_SET; why?
> 
> Indeed, pg_config_os.h does not set anything for __ia64__.
> 
> When I added definitions for Itanium and Opteron to the
> src/include/port/freebsd.h (attached) I get the following:

This post brings up a problem with our configuration system.  Right now,
we test for compiler flags and set HAS_TEST_AND_SET based on the CPU in
each include/port/{os}.h file.  However, this requires us to know about
each CPU enabled on each OS, and requires us to add duplicate
CPU-specific code for each platform.  See below for FreeBSD:
--- freebsd.h.orig    Fri Sep  5 21:38:06 2003+++ freebsd.h    Fri Sep  5 21:41:38 2003@@ -44,5 +44,14 @@ #if
defined(__powerpc__)#define HAS_TEST_AND_SET typedef unsigned int slock_t;+#endif +#if defined(__ia64__)+#define
HAS_TEST_AND_SET+typedefunsigned int slock_t;+#endif++#if defined(__x64_64__)+#define HAS_TEST_AND_SET+typedef unsigned
intslock_t; #endif
 

For example, we will need the last two defines for all platforms that
support Intel.  I wonder if we should have the HAS_TEST_AND_SET defined
in s_lock.h where the actual test-and-set is defined.  This would
eliminate redundancy, and fix the FreeBSD problem reported with
Opteron/Itanium.  I think we still need an slock_t typedef, but it is
probably the same for all CPU's on that platform.

--  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,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Dropping users
Следующее
От: Greg Stark
Дата:
Сообщение: Re: massive quotes?