mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-16 17:12:23 +08:00
mdbx-test: add ttl testcase.
Change-Id: Ia5d164fde250e959226a53c63fcaf024ffe965a2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user