mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
rocksdb: Implement timer for mips
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
3c1e72d62c
commit
4f5b55896b
19
meta-oe/recipes-dbs/rocksdb/files/mips.patch
Normal file
19
meta-oe/recipes-dbs/rocksdb/files/mips.patch
Normal file
@ -0,0 +1,19 @@
|
||||
implement timer implementation for mips platform
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||
+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||
@@ -155,7 +155,12 @@ static inline tokutime_t toku_time_now(v
|
||||
__asm __volatile__("rdcycle %0" : "=r"(result));
|
||||
return result;
|
||||
#endif
|
||||
-
|
||||
+#elif defined(__mips__)
|
||||
+ // mips apparently only allows rdtsc for superusers, so we fall
|
||||
+ // back to gettimeofday. It's possible clock_gettime would be better.
|
||||
+ struct timeval tv;
|
||||
+ gettimeofday(&tv, nullptr);
|
||||
+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
#else
|
||||
#error No timer implementation for this platform
|
||||
#endif
|
||||
@ -16,6 +16,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
|
||||
file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \
|
||||
file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \
|
||||
file://ppc64.patch \
|
||||
file://mips.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user