* <!-- description --> * @brief Allocates a chunk of memory for the debug ring that will be * used by the microkernel. * * <!-- inputs/outputs --> * @param pmut_debug_ring the debug_ring_t to store the newly allocated * debug ring * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure. */
| 41 | * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure. |
| 42 | */ |
| 43 | NODISCARD int64_t |
| 44 | alloc_mk_debug_ring(struct debug_ring_t **const pmut_debug_ring) NOEXCEPT |
| 45 | { |
| 46 | *pmut_debug_ring = (struct debug_ring_t *)platform_alloc(HYPERVISOR_DEBUG_RING_SIZE); |
| 47 | if (NULLPTR == *pmut_debug_ring) { |
| 48 | bferror("platform_alloc failed"); |
| 49 | return LOADER_FAILURE; |
| 50 | } |
| 51 | |
| 52 | return LOADER_SUCCESS; |
| 53 | } |
no test coverage detected