mdbx-test: add ttl testcase.

Change-Id: Ia5d164fde250e959226a53c63fcaf024ffe965a2
This commit is contained in:
Leonid Yuriev
2019-06-21 22:42:45 +03:00
parent eecec74e21
commit 9cf9d6eac2
11 changed files with 192 additions and 21 deletions

View File

@@ -252,21 +252,8 @@ uint64_t entropy_ticks(void) {
//-----------------------------------------------------------------------------
static __inline uint64_t bleach64(uint64_t dirty) {
return mul_64x64_high(bswap64(dirty), UINT64_C(17048867929148541611));
}
static __inline uint32_t bleach32(uint32_t dirty) {
return (uint32_t)((bswap32(dirty) * UINT64_C(2175734609)) >> 32);
}
uint64_t prng64_careless(uint64_t &state) {
state = state * UINT64_C(6364136223846793005) + 1;
return state;
}
uint64_t prng64_white(uint64_t &state) {
state = state * UINT64_C(6364136223846793005) + UINT64_C(1442695040888963407);
state = prng64_map2_careless(state);
return bleach64(state);
}