1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Darwin porting patches from Peter Bierman <bierman@apple.com>

This commit is contained in:
Tom Lane
2000-12-11 00:49:54 +00:00
parent 839de3c577
commit 41fe2a2a03
13 changed files with 568 additions and 25 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.26 2000/11/28 23:27:55 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.27 2000/12/11 00:49:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -119,6 +119,35 @@ _success: \n\
#endif /* __m68k__ */
#if defined(__APPLE__) && defined(__ppc__)
/* used in darwin. */
/* We key off __APPLE__ here because this function differs from
* the LinuxPPC implementation only in compiler syntax.
*/
static void
tas_dummy()
{
__asm__(" \n\
.globl tas \n\
.globl _tas \n\
_tas: \n\
tas: \n\
lwarx r5,0,r3 \n\
cmpwi r5,0 \n\
bne fail \n\
addi r5,r5,1 \n\
stwcx. r5,0,r3 \n\
beq success \n\
fail: li r3,1 \n\
blr \n\
success: \n\
li r3,0 \n\
blr \n\
");
}
#endif /* __APPLE__ && __ppc__ */
#if defined(__powerpc__)
/* Note: need a nice gcc constrained asm version so it can be inlined */
static void