Skip to content

Commit 3cbe6b2

Browse files
committed
Looks like a small patch is needed as well to do the right thing on Linux.
The patch enables the mips2 ISA for the ll/sc operations, and then restores it when done. The kernel/libc emulation code will take over on CPUs without ll/sc, and on CPUs with it, it'll use the operations provided by the CPU. Combined with the earlier fix (removing -mips2), postgresql builds again on mips and mipsel. The patch is against 7.2-7. Oliver Elphick
1 parent b9ae55f commit 3cbe6b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/storage/lmgr/s_lock.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.5 2001/11/05 17:46:28 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.6 2002/04/05 11:38:13 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -173,9 +173,12 @@ tas_dummy()
173173
.global tas \n\
174174
tas: \n\
175175
.frame $sp, 0, $31 \n\
176+
.set push \n\
177+
.set mips2 \n\n
176178
ll $14, 0($4) \n\
177179
or $15, $14, 1 \n\
178180
sc $15, 0($4) \n\
181+
.set pop \n\
179182
beq $15, 0, fail\n\
180183
bne $14, 0, fail\n\
181184
li $2, 0 \n\

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