From:
[email protected]
Hi,
I fixed this bug for unstable. I did only minimal changes, so that
this fix would also be ok for testing. I (or more correct: Frank)
tested this package on a mips-machine, and installation of slapd works
now. Thanks for Thiemo for the fix.
Cheers,
Andi
diff -Nur db4.2-4.2.52-prev/dbinc/mutex.h db4.2-4.2.52/dbinc/mutex.h
--- db4.2-4.2.52-prev/dbinc/mutex.h 2003-09-20 23:40:49.000000000 +0200
+++ db4.2-4.2.52/dbinc/mutex.h 2004-08-20 16:08:45.000000000 +0200
@@ -487,6 +487,48 @@
#endif
/*********************************************************************
+ * MIPS/gcc assembly.
+ *********************************************************************/ +#ifdef HAVE_MUTEX_MIPS_GCC_ASSEMBLY
+typedef u_int32_t tsl_t;
+
+#ifndef MUTEX_ALIGN
+#define MUTEX_ALIGN 4
+#endif
+
+#ifdef LOAD_ACTUAL_MUTEX_CODE
+/*
+ * For gcc/mips. Should return 0 if could not acquire the lock, 1 if
+ * lock was acquired properly.
+ */
+static inline int
+MUTEX_SET(tsl_t *tsl) {
+ register tsl_t *__l = tsl;
+ register tsl_t __r;
+ asm volatile(
+ " .set push \n"
+ " .set mips2 \n"
+ " .set noreorder \n"
+ "1: ll %0, %1 \n"
+ " bnez %0, 1f \n"
+ " nop