summaryrefslogtreecommitdiff
path: root/src/include/storage
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-11 11:55:29 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-12 07:39:05 +0200
commit25f36066dd2abde74faa12f08e5e498a95128cd0 (patch)
tree96d1fb2ba36da0fcde15441b86bbb33e61a795ee /src/include/storage
parente92677e86333562b8dd4972083c8a1abf985d90d (diff)
Remove traces of support for Sun Studio compiler
Per discussion, this compiler suite is no longer maintained, and it has not been able to compile PostgreSQL since at least PostgreSQL 17. This removes all the remaining support code for this compiler. Note that the Solaris operating system continues to be supported, but using GCC as the compiler. Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/a0f817ee-fb86-483a-8a14-b6f7f5991b6e%40eisentraut.org
Diffstat (limited to 'src/include/storage')
-rw-r--r--src/include/storage/s_lock.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2f73f9fcf57..7f8f566bd40 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -333,9 +333,9 @@ tas(volatile slock_t *lock)
slock_t _res;
/*
- * See comment in src/backend/port/tas/sunstudio_sparc.s for why this
- * uses "ldstub", and that file uses "cas". gcc currently generates
- * sparcv7-targeted binaries, so "cas" use isn't possible.
+ * "cas" would be better than "ldstub", but it is only present on
+ * sparcv8plus and later, while some platforms still support sparcv7 or
+ * sparcv8. Also, "cas" requires that the system be running in TSO mode.
*/
__asm__ __volatile__(
" ldstub [%2], %0 \n"
@@ -594,24 +594,6 @@ tas(volatile slock_t *lock)
#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
-/* These are in sunstudio_(sparc|x86).s */
-
-#if defined(__SUNPRO_C) && (defined(__i386) || defined(__x86_64__) || defined(__sparc__) || defined(__sparc))
-#define HAS_TEST_AND_SET
-
-#if defined(__i386) || defined(__x86_64__) || defined(__sparcv9) || defined(__sparcv8plus)
-typedef unsigned int slock_t;
-#else
-typedef unsigned char slock_t;
-#endif
-
-extern slock_t pg_atomic_cas(volatile slock_t *lock, slock_t with,
- slock_t cmp);
-
-#define TAS(a) (pg_atomic_cas((a), 1, 0) != 0)
-#endif
-
-
#ifdef _MSC_VER
typedef LONG slock_t;