MCPcopy Create free account
hub / github.com/Tencent/phxsql / ResetFastRandomSeed

Function ResetFastRandomSeed

phxsqlclient/utils/random.cpp:57–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55static __thread FastRandomSeed seed_routine_safe = { false, 0 };
56
57static void ResetFastRandomSeed() {
58 seed_routine_safe.seed = rdtsc();
59 seed_routine_safe.init = true;
60}
61
62static void InitFastRandomSeedAtFork() {
63 pthread_atfork(ResetFastRandomSeed, ResetFastRandomSeed, ResetFastRandomSeed);

Callers 1

InitFastRandomSeedFunction · 0.85

Calls 1

rdtscFunction · 0.85

Tested by

no test coverage detected