* Release the span back into the pool of available spans. */
| 323 | * Release the span back into the pool of available spans. |
| 324 | */ |
| 325 | static void trace_span_clear(struct span *s) |
| 326 | { |
| 327 | if (!span_htable_del(spans, s)) |
| 328 | abort(); |
| 329 | |
| 330 | /* If s is actually in fixed_spans, just zero it out. */ |
| 331 | if (s >= fixed_spans && s < fixed_spans + ARRAY_SIZE(fixed_spans)) { |
| 332 | s->key = 0; |
| 333 | return; |
| 334 | } |
| 335 | |
| 336 | /* Dynamically allocated, so we need to free it */ |
| 337 | tal_free(s); |
| 338 | } |
| 339 | |
| 340 | void trace_span_start_(const char *name, const void *key) |
| 341 | { |
no test coverage detected