MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / add

Method add

ngscuda/concurrentqueue.h:1459–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457 FreeList& operator=(FreeList const&) MOODYCAMEL_DELETE_FUNCTION;
1458
1459 inline void add(N* node)
1460 {
1461#ifdef MCDBGQ_NOLOCKFREE_FREELIST
1462 debug::DebugLock lock(mutex);
1463#endif
1464 // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to
1465 // set it using a fetch_add
1466 if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) {
1467 // Oh look! We were the last ones referencing this node, and we know
1468 // we want to add it to the free list, so let's do it!
1469 add_knowing_refcount_is_zero(node);
1470 }
1471 }
1472
1473 inline N* try_get()
1474 {

Callers 2

add_block_to_free_listFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected