remove powerpc workaround and add patch for the mutex issue
provided by sleepycat via Philippe Lelédy <phl@leledy.org>
This commit is contained in:
parent
9be3be1408
commit
b6666a005f
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.8 2004/03/07 18:55:21 wilfried Exp $
|
||||
# $OpenBSD: Makefile,v 1.9 2004/05/27 21:05:25 pvalchev Exp $
|
||||
|
||||
REVISION= 4
|
||||
VERSION= ${REVISION}.2.52
|
||||
@ -12,8 +12,4 @@ CONFIGURE_STYLE=gnu
|
||||
|
||||
DEST_SUBDIR= ${REVISION}
|
||||
|
||||
.if ${MACHINE_ARCH} == "powerpc"
|
||||
CONFIGURE_ARGS+=--enable-posixmutexes
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
42
databases/db/v4/patches/patch-dbinc_mutex_h
Normal file
42
databases/db/v4/patches/patch-dbinc_mutex_h
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-dbinc_mutex_h,v 1.1 2004/05/27 21:05:25 pvalchev Exp $
|
||||
--- dbinc/mutex.h.orig 2003-09-20 15:40:49.000000000 -0600
|
||||
+++ dbinc/mutex.h 2004-05-27 14:51:44.000000000 -0600
|
||||
@@ -578,28 +578,28 @@ typedef u_int32_t tsl_t;
|
||||
* 'set' mutexes have the value 1, like on Intel; the returned value from
|
||||
* MUTEX_SET() is 1 if the mutex previously had its low bit clear, 0 otherwise.
|
||||
*/
|
||||
-#ifdef HAVE_MUTEX_PPC_GCC_ASSEMBLY
|
||||
static inline int
|
||||
MUTEX_SET(int *tsl) {
|
||||
- int __r;
|
||||
- asm volatile (
|
||||
+ int __r;
|
||||
+ int __tmp = (int)tsl;
|
||||
+ asm volatile (
|
||||
"0: \n\t"
|
||||
-" lwarx %0,0,%1 \n\t"
|
||||
+" lwarx %0,0,%2 \n\t"
|
||||
" cmpwi %0,0 \n\t"
|
||||
" bne- 1f \n\t"
|
||||
-" stwcx. %1,0,%1 \n\t"
|
||||
+" stwcx. %2,0,%2 \n\t"
|
||||
" isync \n\t"
|
||||
" beq+ 2f \n\t"
|
||||
" b 0b \n\t"
|
||||
"1: \n\t"
|
||||
" li %1, 0 \n\t"
|
||||
"2: \n\t"
|
||||
- : "=&r" (__r), "+r" (tsl)
|
||||
- :
|
||||
- : "cr0", "memory");
|
||||
- return (int)tsl;
|
||||
+ : "=&r" (__r), "=r" (tsl)
|
||||
+ : "r" (__tmp)
|
||||
+ : "cr0", "memory");
|
||||
+ return (int)tsl;
|
||||
}
|
||||
-#endif
|
||||
+
|
||||
static inline int
|
||||
MUTEX_UNSET(tsl_t *tsl) {
|
||||
asm volatile("sync" : : : "memory");
|
Loading…
Reference in New Issue
Block a user