mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Clean and document header files.
- Add missing doc comments to header files - Move allocate_kernel_args to main.cpp - Split functions out into pointer_manipulation.h
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/// \file error.h
|
||||
/// Error handling definitions
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -30,6 +32,8 @@ private:
|
||||
static handler *s_current;
|
||||
};
|
||||
|
||||
/// Error handler using UEFI boot services. Integrates with `status_line`
|
||||
/// to print formatted error messages to the screen.
|
||||
class uefi_handler :
|
||||
public handler
|
||||
{
|
||||
@@ -41,6 +45,8 @@ private:
|
||||
console &m_con;
|
||||
};
|
||||
|
||||
/// Error handler that doesn't rely on UEFI. Sets status into CPU
|
||||
/// registers and then causes a CPU #DE exception.
|
||||
class cpu_assert_handler :
|
||||
public handler
|
||||
{
|
||||
@@ -52,6 +58,9 @@ public:
|
||||
} // namespace error
|
||||
} // namespace boot
|
||||
|
||||
/// Helper macro to raise an error if an operation fails.
|
||||
/// \arg s An expression evaluating to a UEFI status
|
||||
/// \arg m The error message to use on failure
|
||||
#define try_or_raise(s, m) \
|
||||
do { \
|
||||
uefi::status _s = (s); \
|
||||
|
||||
Reference in New Issue
Block a user