Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
Linux powerpc64 / ppc64le
Description
The below code change is required because older code was setting SPIN_INITIALIZER value to 1. This was causing 'spin_lock' to wait infinitely for lock which is not acquired by any other thread (it's just the lock is initialized with wrong value). Adding a check - "!defined(_PPC64_)" will make sure that the functionality doesn't get changed for other architectures.
diff --git a/src/arch.h b/src/arch.h
|
index 34fd686..0a1bf3d 100644 |
--- a/src/arch.h
|
+++ b/src/arch.h
|
@@ -350,7 +350,7 @@ |
(pthread_spin_trylock(arg) == 0) |
#define spin_unlock(arg) pthread_spin_unlock(arg)
|
#define spin_destroy(arg) pthread_spin_destroy(arg)
|
- #if defined(__GLIBC__) && !defined(__s390x__) |
+ #if defined(__GLIBC__) && !defined(__s390x__) && !defined(__PPC64__) |
#define SPIN_INITIALIZER (spin_t)(1) |
#else |
#define SPIN_INITIALIZER (spin_t)(0) |
Attachments
Gerrit Reviews
For Gerrit Dashboard: MB-33352 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
106189,2 | MB-33352: Set SPIN_INITIALIZER value to 0 for ppc64le | master | forestdb | Status: MERGED | +2 | +1 |