| 542 | } |
| 543 | |
| 544 | static void ResetSpanDB(SpanDB* db) { |
| 545 | SpanDB* old_db = NULL; |
| 546 | { |
| 547 | BAIDU_SCOPED_LOCK(g_span_db_mutex); |
| 548 | old_db = g_span_db; |
| 549 | g_span_db = db; |
| 550 | if (g_span_db) { |
| 551 | g_span_db->AddRefManually(); |
| 552 | } |
| 553 | } |
| 554 | if (old_db) { |
| 555 | old_db->RemoveRefManually(); |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | static void RemoveSpanDB() { |
| 560 | g_span_ending = true; |
no test coverage detected