Skip to content

Commit 14cd0ca

Browse files
committed
modified i386_solaris port
submitted by: dr. george
1 parent 31cae34 commit 14cd0ca

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

src/backend/port/i386_solaris/Makefile.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.3 1996/07/25 07:27:08 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.4 1996/07/25 19:48:24 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

1414
CFLAGS+= -DUSE_POSIX_TIME -DNEED_ISINF -DNEED_RUSAGE -DNO_EMPTY_STMTS
1515

1616
LDADD+= -ll -ldl
1717

18-
SUBSRCS+= port.c
18+
SUBSRCS+= port.c tas.s
1919

2020
HEADERS+= machine.h port-protos.h rusagestub.h

src/backend/port/i386_solaris/tas.s

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/=============================================================================
2+
/ tas.s -- test and set lock for i386_solaris
3+
/=============================================================================
4+
5+
.file "tas.s"
6+
.text
7+
.align 16
8+
.L1.text:
9+
10+
.globl tas
11+
tas:
12+
pushl %ebp /save prev base pointer
13+
movl %esp,%ebp /new base pointer
14+
pushl %ebx /save prev bx
15+
movl 8(%ebp),%ebx /load bx with address of lock
16+
pushl %ebx /save prev bx
17+
movl 8(%ebp),%ebx /load bx with address of lock
18+
movl $255,%eax /put something in ax
19+
xchgb %al,(%ebx) /swap lock value with "0"
20+
cmpb $0,%al /did we get the lock?
21+
jne .Locked
22+
subl %eax,%eax /yes, we got it -- return 0
23+
jmp .Finish
24+
.align 4
25+
.Locked:
26+
movl $1,%eax /no, we didn't get it - return 1
27+
.Finish:
28+
popl %ebx /restore prev bx
29+
movl %ebp,%esp /restore stack state
30+
popl %ebp
31+
ret /return
32+
.align 4
33+
.type tas,@function
34+
.size tas,.-tas
35+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy