Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14cd0ca

Browse files
committed
modified i386_solaris port
submitted by: dr. george
1 parent31cae34 commit14cd0ca

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/2507:27:08 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.4 1996/07/2519: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.ctas.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+
.align16
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+
movl8(%ebp),%ebx /load bx with address oflock
16+
pushl%ebx /save prev bx
17+
movl8(%ebp),%ebx /load bx with address oflock
18+
movl$255,%eax /put somethingin ax
19+
xchgb%al,(%ebx) /swaplock value with"0"
20+
cmpb$0,%al /did we get thelock?
21+
jne .Locked
22+
subl%eax,%eax /yes, we got it -- return0
23+
jmp .Finish
24+
.align4
25+
.Locked:
26+
movl$1,%eax /no, we didn't get it - return1
27+
.Finish:
28+
popl%ebx /restore prev bx
29+
movl%ebp,%esp /restore stack state
30+
popl%ebp
31+
ret /return
32+
.align4
33+
.type tas,@function
34+
.size tas,.-tas
35+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp