MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / try_get_block_from_initial_pool

Function try_get_block_from_initial_pool

concurrentqueue.h:3078–3087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3076 }
3077
3078 inline Block* try_get_block_from_initial_pool()
3079 {
3080 if (initialBlockPoolIndex.load(std::memory_order_relaxed) >= initialBlockPoolSize) {
3081 return nullptr;
3082 }
3083
3084 auto index = initialBlockPoolIndex.fetch_add(1, std::memory_order_relaxed);
3085
3086 return index < initialBlockPoolSize ? (initialBlockPool + index) : nullptr;
3087 }
3088
3089 inline void add_block_to_free_list(Block* block)
3090 {

Callers 1

requisition_blockFunction · 0.85

Calls 2

loadMethod · 0.45
fetch_addMethod · 0.45

Tested by

no test coverage detected