MCPcopy Create free account
hub / github.com/apache/brpc / bthread_list_init

Function bthread_list_init

src/bthread/bthread.cpp:599–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599int bthread_list_init(bthread_list_t* list,
600 unsigned /*size*/,
601 unsigned /*conflict_size*/) {
602 list->impl = new (std::nothrow) bthread::TidList;
603 if (NULL == list->impl) {
604 return ENOMEM;
605 }
606 // Set unused fields to zero as well.
607 list->head = 0;
608 list->size = 0;
609 list->conflict_head = 0;
610 list->conflict_size = 0;
611 return 0;
612}
613
614void bthread_list_destroy(bthread_list_t* list) {
615 delete static_cast<bthread::TidList*>(list->impl);

Callers 2

EchoMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68