mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-09 08:10:09 +08:00
More cpu cleanups, only for 6.6.
This commit is contained in:
parent
540c114225
commit
050371fccd
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.23 1999/02/13 23:15:51 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.24 1999/07/13 20:12:46 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__alpha) && !defined(linux)
|
#if defined(__alpha__) && !defined(linux)
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include <machine/hal_sysinfo.h>
|
#include <machine/hal_sysinfo.h>
|
||||||
#define ASSEMBLER
|
#define ASSEMBLER
|
||||||
@ -41,7 +41,7 @@ main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
#if defined(__alpha)
|
#if defined(__alpha__)
|
||||||
#ifdef NOFIXADE
|
#ifdef NOFIXADE
|
||||||
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS};
|
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS};
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ main(int argc, char *argv[])
|
|||||||
syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL);
|
syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__alpha)
|
#if defined(__alpha__)
|
||||||
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
|
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
|
||||||
(unsigned long) NULL) < 0)
|
(unsigned long) NULL) < 0)
|
||||||
elog(NOTICE, "setsysinfo failed: %d\n", errno);
|
elog(NOTICE, "setsysinfo failed: %d\n", errno);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.21 1999/06/06 20:19:35 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.22 1999/07/13 20:12:46 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -143,7 +143,7 @@ success: \n\
|
|||||||
|
|
||||||
#endif /* __powerpc__ */
|
#endif /* __powerpc__ */
|
||||||
|
|
||||||
#if defined(__mips)
|
#if defined(__mips__)
|
||||||
static void
|
static void
|
||||||
tas_dummy()
|
tas_dummy()
|
||||||
{
|
{
|
||||||
@ -165,7 +165,7 @@ fail: \n\
|
|||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __mips */
|
#endif /* __mips__ */
|
||||||
|
|
||||||
#else /* defined(__GNUC__) */
|
#else /* defined(__GNUC__) */
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42 1999/05/25 16:12:02 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.43 1999/07/13 20:12:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -134,7 +134,7 @@ extern double rint(double x);
|
|||||||
* until the distributions are updated.
|
* until the distributions are updated.
|
||||||
* --djm 12/16/96
|
* --djm 12/16/96
|
||||||
*/
|
*/
|
||||||
#if ( defined(linux) && defined(__alpha) ) && !defined(UNSAFE_FLOATS)
|
#if ( defined(linux) && defined(__alpha__) ) && !defined(UNSAFE_FLOATS)
|
||||||
#define UNSAFE_FLOATS
|
#define UNSAFE_FLOATS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -28,15 +28,16 @@
|
|||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__powerpc__)
|
|
||||||
#define HAS_TEST_AND_SET
|
|
||||||
typedef unsigned int slock_t;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#if defined(__mips__)
|
#if defined(__mips__)
|
||||||
/* # undef HAS_TEST_AND_SET */
|
/* # undef HAS_TEST_AND_SET */
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__powerpc__)
|
|
||||||
typedef unsigned char slock_t;
|
|
||||||
|
|
||||||
|
#if defined(__powerpc__)
|
||||||
|
#define HAS_TEST_AND_SET
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__powerpc__)
|
||||||
|
typedef unsigned int slock_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned char slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#if defined(__sparc__)
|
#if defined(__sparc__)
|
||||||
#define NEED_SPARC_TAS_ASM
|
#define NEED_SPARC_TAS_ASM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
|
||||||
typedef unsigned char slock_t;
|
typedef unsigned char slock_t;
|
||||||
|
@ -27,4 +27,5 @@
|
|||||||
#if defined(__mips__)
|
#if defined(__mips__)
|
||||||
/* # undef HAS_TEST_AND_SET */
|
/* # undef HAS_TEST_AND_SET */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned char slock_t;
|
typedef unsigned char slock_t;
|
||||||
|
@ -8,18 +8,18 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
|
||||||
#if defined(__powerpc__)
|
#if if defined(__i386__)
|
||||||
|
typedef unsigned char slock_t;
|
||||||
|
|
||||||
|
#elif defined(__powerpc__)
|
||||||
typedef unsigned int slock_t;
|
typedef unsigned int slock_t;
|
||||||
|
|
||||||
#elif defined(__alpha)
|
#elif defined(__alpha__)
|
||||||
typedef long int slock_t;
|
typedef long int slock_t;
|
||||||
|
|
||||||
#elif defined(__mips)
|
#elif defined(__mips__)
|
||||||
typedef unsigned int slock_t;
|
typedef unsigned int slock_t;
|
||||||
|
|
||||||
#else /* i386 probably */
|
|
||||||
typedef unsigned char slock_t;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (__GLIBC__ >= 2)
|
#if (__GLIBC__ >= 2)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
#define NEED_I386_TAS_ASM
|
#define NEED_I386_TAS_ASM
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
* Define this if you are compiling with
|
* Define this if you are compiling with
|
||||||
* the native UNIXWARE C compiler.
|
* the native UNIXWARE C compiler.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.62 1999/07/13 20:00:36 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.63 1999/07/13 20:12:51 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ extern void s_lock_sleep(unsigned spin);
|
|||||||
* All the gcc inlines
|
* All the gcc inlines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__alpha)
|
#if defined(__alpha__)
|
||||||
#define TAS(lock) tas(lock)
|
#define TAS(lock) tas(lock)
|
||||||
#define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
|
#define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ __asm__(" ldq $0, %0 \n\
|
|||||||
return (int) _res;
|
return (int) _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __alpha */
|
#endif /* __alpha__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ tas(volatile slock_t *lock)
|
|||||||
* All non gcc
|
* All non gcc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__alpha)
|
#if defined(__alpha__)
|
||||||
/*
|
/*
|
||||||
* OSF/1 (Alpha AXP)
|
* OSF/1 (Alpha AXP)
|
||||||
*
|
*
|
||||||
@ -237,7 +237,7 @@ tas(volatile slock_t *lock)
|
|||||||
#define S_UNLOCK(lock) msem_unlock((lock), 0)
|
#define S_UNLOCK(lock) msem_unlock((lock), 0)
|
||||||
#define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED)
|
#define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED)
|
||||||
#define S_LOCK_FREE(lock) (!(lock)->msem_state)
|
#define S_LOCK_FREE(lock) (!(lock)->msem_state)
|
||||||
#endif /* __alpha */
|
#endif /* __alpha__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user