*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.10 1998/09/03 02:14:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.11 1998/09/18 05:36:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif /* PPC */
+#if defined(__ns32k__)
+int
+tas(volatile slock_t *lock)
+{
+ int res;
+ __asm__("sbitb 0, %0" : "=m"(*lock));
+ __asm__("sprb us, %0" : "=r"(res));
+ res = (res >> 5) & 1;
+ return res;
+}
+#endif
#else /* defined(__GNUC__) */
/***************************************************************************
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.47 1998/09/12 16:07:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.48 1998/09/18 05:36:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif /* NEED_I386_TAS_ASM */
-
-#if defined(NEED_NS32K_TAS_ASM)
-
-#define S_LOCK(lock) \
-{ \
- slock_t res = 1; \
- while (res) { \
- __asm__("movqd 0, r0"); \
- __asm__("sbitd r0, %0" : "=m"(*lock)); \
- __asm__("sprb us, %0" : "=r" (res)); \
- res = ((res >> 5) & 1); \
- } \
-}
-
-#endif /* NEED_NS32K_TAS_ASM */
-
+/* NS32K code is in s_lock.c */
#endif /* defined(__GNUC__) */