| 97 | } |
| 98 | |
| 99 | void SemaphorePool::reset() |
| 100 | { |
| 101 | active_semaphore_count = 0; |
| 102 | |
| 103 | // Now we can safely recycle the released semaphores. |
| 104 | for (auto &sem : released_semaphores) |
| 105 | { |
| 106 | semaphores.push_back(sem); |
| 107 | } |
| 108 | |
| 109 | released_semaphores.clear(); |
| 110 | } |
| 111 | |
| 112 | uint32_t SemaphorePool::get_active_semaphore_count() const |
| 113 | { |