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

Function id_value

src/bthread/id.cpp:179–185  ·  view source on GitHub ↗

required by unittest

Source from the content-addressed store, hash-verified

177}
178// required by unittest
179uint32_t id_value(bthread_id_t id) {
180 Id* const meta = address_resource(get_slot(id));
181 if (meta != NULL) {
182 return *meta->butex;
183 }
184 return 0; // valid version never be zero
185}
186
187static int default_bthread_id_on_error(bthread_id_t id, void*, int) {
188 return bthread_id_unlock_and_destroy(id);

Callers 3

TESTFunction · 0.85
stopped_waiterFunction · 0.85
waiterFunction · 0.85

Calls 2

get_slotFunction · 0.70
address_resourceFunction · 0.50

Tested by 3

TESTFunction · 0.68
stopped_waiterFunction · 0.68
waiterFunction · 0.68