| 568 | } |
| 569 | |
| 570 | static int StartIndexingIfNeeded() { |
| 571 | if (pthread_once(&start_span_indexing_once, StartSpanIndexing) != 0) { |
| 572 | return -1; |
| 573 | } |
| 574 | return started_span_indexing ? 0 : -1; |
| 575 | } |
| 576 | |
| 577 | inline int GetSpanDB(butil::intrusive_ptr<SpanDB>* db) { |
| 578 | BAIDU_SCOPED_LOCK(g_span_db_mutex); |