mirror of
https://github.com/MariaDB/server.git
synced 2025-12-01 17:39:21 +03:00
fix the tokudb build on 32 bit linux closes[t:2273]
git-svn-id: file:///svn/toku/tokudb@16708 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
committed by
Yoni Fogel
parent
42f8c95778
commit
d5ee2d7946
@@ -281,3 +281,14 @@ toku_os_get_processor_frequency(uint64_t *hzret) {
|
|||||||
r = toku_get_processor_frequency_cpuinfo(hzret);
|
r = toku_get_processor_frequency_cpuinfo(hzret);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __GNUC__ && __i386__
|
||||||
|
|
||||||
|
// workaround for a gcc 4.1.2 bug on 32 bit platforms.
|
||||||
|
uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) __attribute__((noinline));
|
||||||
|
|
||||||
|
uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) {
|
||||||
|
return __sync_fetch_and_add(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -41,24 +41,26 @@ toku_sync_fetch_and_add_uint64(volatile ULONGLONG *a, uint64_t b) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
//Linux
|
|
||||||
#define TOKU_INLINE32 inline
|
|
||||||
|
|
||||||
static TOKU_INLINE32 int32_t toku_sync_fetch_and_add_int32(volatile int32_t *a, int32_t b) {
|
//Linux
|
||||||
|
|
||||||
|
static inline int32_t toku_sync_fetch_and_add_int32(volatile int32_t *a, int32_t b) {
|
||||||
return __sync_fetch_and_add(a, b);
|
return __sync_fetch_and_add(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __GNUC__ && __i386__
|
#if __GNUC__ && __i386__
|
||||||
#define TOKU_INLINE64
|
|
||||||
// workaround for a gcc 4.1.2 bug on 32 bit platforms.
|
|
||||||
static uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) __attribute__((noinline));
|
|
||||||
#else
|
|
||||||
#define TOKU_INLINE64 inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static TOKU_INLINE64 uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) {
|
// workaround for a gcc 4.1.2 bug on 32 bit platforms.
|
||||||
|
uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) __attribute__((noinline));
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline uint64_t toku_sync_fetch_and_add_uint64(volatile uint64_t *a, uint64_t b) {
|
||||||
return __sync_fetch_and_add(a, b);
|
return __sync_fetch_and_add(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user