Skip to content

Commit 81051a8

Browse files
committed
Remove spinlock support for SINIX, Sun3, and NS32K.
All of these platforms are very much obsolete. As far as I can determine, the last version of SINIX, later renamed Reliant, occurred some time between 2002 and 2005. The last release of SunOS that would run on a sun3 was released in November of 1991; the last release of OpenBSD which supported that platform was in 2001. The highest clock speed of any processor in the family was 25MHz. The NS32K (national semiconductor 320xx) architecture was retired in 1990. Support can be re-added if a maintainer emerges for any of these platforms, but it seems unlikely. Reviewed by Andres Freund.
1 parent bbe4dea commit 81051a8

File tree

3 files changed

+1
-83
lines changed

3 files changed

+1
-83
lines changed

doc/src/sgml/installation.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid`
19531953
In general, <productname>PostgreSQL</> can be expected to work on
19541954
these CPU architectures: x86, x86_64, IA64, PowerPC,
19551955
PowerPC 64, S/390, S/390x, Sparc, Sparc 64, Alpha, ARM, MIPS, MIPSEL, M68K,
1956-
and PA-RISC. Code support exists for M32R, NS32K, and VAX, but these
1956+
and PA-RISC. Code support exists for M32R and VAX, but these
19571957
architectures are not known to have been tested recently. It is often
19581958
possible to build on an unsupported CPU type by configuring with
19591959
<option>--disable-spinlocks</option>, but performance will be poor.

src/backend/storage/lmgr/s_lock.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -247,36 +247,6 @@ _success: \n\
247247
);
248248
}
249249
#endif /* __m68k__ && !__linux__ */
250-
#else /* not __GNUC__ */
251-
252-
/*
253-
* All non gcc
254-
*/
255-
256-
257-
#if defined(sun3)
258-
static void
259-
tas_dummy() /* really means: extern int tas(slock_t
260-
* *lock); */
261-
{
262-
asm("LLA0:");
263-
asm(" .data");
264-
asm(" .text");
265-
asm("|#PROC# 04");
266-
asm(" .globl _tas");
267-
asm("_tas:");
268-
asm("|#PROLOGUE# 1");
269-
asm(" movel sp@(0x4),a0");
270-
asm(" tas a0@");
271-
asm(" beq LLA1");
272-
asm(" moveq #-128,d0");
273-
asm(" rts");
274-
asm("LLA1:");
275-
asm(" moveq #0,d0");
276-
asm(" rts");
277-
asm(" .data");
278-
}
279-
#endif /* sun3 */
280250
#endif /* not __GNUC__ */
281251
#endif /* HAVE_SPINLOCKS */
282252

src/include/storage/s_lock.h

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -551,31 +551,6 @@ tas(volatile slock_t *lock)
551551

552552
#endif /* __vax__ */
553553

554-
555-
#if defined(__ns32k__) /* National Semiconductor 32K */
556-
#define HAS_TEST_AND_SET
557-
558-
typedef unsigned char slock_t;
559-
560-
#define TAS(lock) tas(lock)
561-
562-
static __inline__ int
563-
tas(volatile slock_t *lock)
564-
{
565-
register int _res;
566-
567-
__asm__ __volatile__(
568-
" sbitb 0, %1 \n"
569-
" sfsd %0 \n"
570-
: "=r"(_res), "+m"(*lock)
571-
:
572-
: "memory");
573-
return _res;
574-
}
575-
576-
#endif /* __ns32k__ */
577-
578-
579554
#if defined(__alpha) || defined(__alpha__) /* Alpha */
580555
/*
581556
* Correct multi-processor locking methods are explained in section 5.5.3
@@ -886,25 +861,6 @@ typedef unsigned long slock_t;
886861
#define S_LOCK_FREE(lock) (test_then_add(lock,0) == 0)
887862
#endif /* __sgi */
888863

889-
890-
#if defined(sinix) /* Sinix */
891-
/*
892-
* SINIX / Reliant UNIX
893-
* slock_t is defined as a struct abilock_t, which has a single unsigned long
894-
* member. (Basically same as SGI)
895-
*/
896-
#define HAS_TEST_AND_SET
897-
898-
#include "abi_mutex.h"
899-
typedef abilock_t slock_t;
900-
901-
#define TAS(lock) (!acquire_lock(lock))
902-
#define S_UNLOCK(lock) release_lock(lock)
903-
#define S_INIT_LOCK(lock) init_lock(lock)
904-
#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
905-
#endif /* sinix */
906-
907-
908864
#if defined(_AIX) /* AIX */
909865
/*
910866
* AIX (POWER)
@@ -922,14 +878,6 @@ typedef int slock_t;
922878

923879
/* These are in s_lock.c */
924880

925-
926-
#if defined(sun3) /* Sun3 */
927-
#define HAS_TEST_AND_SET
928-
929-
typedef unsigned char slock_t;
930-
#endif
931-
932-
933881
#if defined(__SUNPRO_C) && (defined(__i386) || defined(__x86_64__) || defined(__sparc__) || defined(__sparc))
934882
#define HAS_TEST_AND_SET
935883

0 commit comments

Comments
 (0)