MCPcopy Create free account
hub / github.com/bloomberg/bde / commitPushIndex

Method commitPushIndex

groups/bdl/bdlcc/bdlcc_fixedqueueindexmanager.cpp:470–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470void FixedQueueIndexManager::commitPushIndex(unsigned int generation,
471 unsigned int index)
472{
473 BSLS_ASSERT(generation <= d_maxGeneration);
474 BSLS_ASSERT(index < d_capacity);
475 BSLS_ASSERT(e_WRITING == decodeStateFromElementState(d_states[index]));
476 BSLS_ASSERT(generation ==
477 decodeGenerationFromElementState(d_states[index]));
478
479 // We cannot guarantee the full pre-conditions of this function. The
480 // preceding assertions are as close as we can get.
481
482 // Mark the pushed cell with the 'FULL' state.
483
484 d_states[index] = encodeElementState(generation, e_FULL);
485}
486
487int FixedQueueIndexManager::reservePopIndex(unsigned int *generation,
488 unsigned int *index)

Callers 5

ggFunction · 0.80
tryPushBackMethod · 0.80
writerThreadFunction · 0.80
mainFunction · 0.80
tryPushBackMethod · 0.80

Calls 3

encodeElementStateFunction · 0.85

Tested by

no test coverage detected