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

Function ResetFastRandomSeed

phxqueue/comm/utils/other_util.cpp:59–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57static thread_local FastRandomSeed seed_thread_safe = { false, 0 };
58
59static void ResetFastRandomSeed() {
60 seed_thread_safe.seed = rdtsc();
61 seed_thread_safe.init = true;
62}
63
64static void InitFastRandomSeedAtFork() {
65 pthread_atfork(ResetFastRandomSeed, ResetFastRandomSeed, ResetFastRandomSeed);

Callers 1

InitFastRandomSeedFunction · 0.85

Calls 1

rdtscFunction · 0.85

Tested by

no test coverage detected