| 158 | static __thread IdGen tls_span_id_gen = { false, 0, 0, { { 0, 0 } } }; |
| 159 | |
| 160 | inline uint64_t UpdateTLSRandom64(IdGen* g) { |
| 161 | if (!g->init) { |
| 162 | g->init = true; |
| 163 | init_fast_rand_seed(&g->seed); |
| 164 | } |
| 165 | const uint64_t val = fast_rand(&g->seed); |
| 166 | g->current_random = val; |
| 167 | return val; |
| 168 | } |
| 169 | |
| 170 | inline uint64_t GenerateSpanId() { |
| 171 | // 0 is an invalid Id |
no test coverage detected