3521 John David Duncan 2011-09-21
merge
modified:
storage/ndb/memcache/include/atomics.h
storage/ndb/memcache/include/hash_item_util.h
storage/ndb/memcache/include/ndb_engine.h
3520 John David Duncan 2011-09-21
merge
modified:
storage/ndb/memcache/include/atomics.h
storage/ndb/memcache/include/ndbmemcache_config.in
storage/ndb/memcache/src/atomics.c
=== modified file 'storage/ndb/memcache/include/atomics.h'
--- a/storage/ndb/memcache/include/atomics.h 2011-09-22 03:37:05 +0000
+++ b/storage/ndb/memcache/include/atomics.h 2011-09-22 04:40:21 +0000
@@ -67,6 +67,7 @@ typedef volatile Uint32 ndbmc_atomic32_t
*/
#ifdef USE_DARWIN_ATOMICS
+#define atomic_add_int(loc, amount) OSAtomicAdd32Barrier(amount, loc)
#define atomic_cmp_swap_int(loc, old, new) OSAtomicCompareAndSwap32Barrier(old, new, loc)
#define atomic_cmp_swap_ptr(loc, old, new) OSAtomicCompareAndSwapPtrBarrier(old, new, loc)
@@ -74,6 +75,16 @@ typedef volatile Uint32 ndbmc_atomic32_t
#define atomic_cmp_swap_int(loc, old, new) \
__sync_bool_compare_and_swap(loc, (Uint32) old, (Uint32) new)
#define atomic_cmp_swap_ptr(loc, old, new) __sync_bool_compare_and_swap(loc, old, new)
+#define atomic_add_int(loc, amount) __sync_fetch_and_add(loc, amount)
+
+#else
+
+DECLARE_FUNCTIONS_WITH_C_LINKAGE
+
+int atomic_cmp_swap_int(ndbmc_atomic32_t *loc, int oldvalue, int newvalue);
+int atomic_cmp_swap_ptr(void * volatile *loc, void *oldvalue, void *newvalue);
+
+END_FUNCTIONS_WITH_C_LINKAGE
#endif
#endif
=== modified file 'storage/ndb/memcache/include/hash_item_util.h'
--- a/storage/ndb/memcache/include/hash_item_util.h 2011-09-12 10:05:07 +0000
+++ b/storage/ndb/memcache/include/hash_item_util.h 2011-09-22 04:40:21 +0000
@@ -21,7 +21,6 @@
#define NDBMEMCACHE_HASH_ITEM_UTIL_H
#include <sys/types.h>
-#include <stdbool.h>
#include <stdint.h>
#include <memcached/engine.h>
=== modified file 'storage/ndb/memcache/include/ndb_engine.h'
--- a/storage/ndb/memcache/include/ndb_engine.h 2011-09-12 10:05:07 +0000
+++ b/storage/ndb/memcache/include/ndb_engine.h 2011-09-22 04:40:21 +0000
@@ -23,7 +23,10 @@
#include "ndbmemcache_config.h"
#include <pthread.h>
+
+#ifndef __cplusplus
#include <stdbool.h>
+#endif
#include <memcached/engine.h>
#include <memcached/util.h>
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster branch (john.duncan:3520 to 3521) | John David Duncan | 22 Sep |