| 1711 | |
| 1712 | |
| 1713 | hashmap<string, Resources> Resources::allocations() const |
| 1714 | { |
| 1715 | hashmap<string, Resources> result; |
| 1716 | |
| 1717 | foreach ( |
| 1718 | const Resource_Unsafe& resource_, |
| 1719 | resourcesNoMutationWithoutExclusiveOwnership) { |
| 1720 | // We require that this is called only when |
| 1721 | // the resources are allocated. |
| 1722 | CHECK(resource_->resource.has_allocation_info()); |
| 1723 | CHECK(resource_->resource.allocation_info().has_role()); |
| 1724 | result[resource_->resource.allocation_info().role()].add(resource_); |
| 1725 | } |
| 1726 | |
| 1727 | return result; |
| 1728 | } |
| 1729 | |
| 1730 | |
| 1731 | Resources Resources::pushReservation( |
no outgoing calls