projects
/
platform
/
upstream
/
lmdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7fe1f4
)
Fix MDB_txninfo.mt2 padding on Windows/Apple
author
Hallvard Furuseth
<hallvard@openldap.org>
Fri, 9 Mar 2012 18:30:34 +0000
(19:30 +0100)
committer
Hallvard Furuseth
<hallvard@openldap.org>
Fri, 9 Mar 2012 18:30:34 +0000
(19:30 +0100)
libraries/libmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/libmdb/mdb.c
b/libraries/libmdb/mdb.c
index 4e3d70dc132c9be65c672e19a4b2af50fdc08770..b714119c1069933f1e8b1254982cddca1e44e23f 100644
(file)
--- a/
libraries/libmdb/mdb.c
+++ b/
libraries/libmdb/mdb.c
@@
-202,6
+202,8
@@
#if defined(_WIN32) || defined(__APPLE__)
#define MNAME_LEN 32
+#else
+#define MNAME_LEN (sizeof(pthread_mutex_t))
#endif
/** @} */
@@
-543,7
+545,7
@@
typedef struct MDB_txninfo {
pthread_mutex_t mt2_wmutex;
#define mti_wmutex mt2.mt2_wmutex
#endif
- char pad[(
sizeof(pthread_mutex_t)
+CACHELINE-1) & ~(CACHELINE-1)];
+ char pad[(
MNAME_LEN
+CACHELINE-1) & ~(CACHELINE-1)];
} mt2;
MDB_reader mti_readers[1];
} MDB_txninfo;