mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Fix for NS32K machine.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* 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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -118,6 +118,17 @@ success: \n\
|
||||
#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__) */
|
||||
/***************************************************************************
|
||||
|
Reference in New Issue
Block a user