| 468 | } |
| 469 | |
| 470 | void 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 | |
| 487 | int FixedQueueIndexManager::reservePopIndex(unsigned int *generation, |
| 488 | unsigned int *index) |
no test coverage detected