[−][src]Module sunrise_kernel::utils
Generic useful functions
Re-exports
pub use crate::checks::*; |
Modules
io | The IO interface |
loop_future | Definition of the |
Macros
enum_with_val | Creates a fake C-like enum, where all bit values are accepted. |
initialize_to_zero | A macro to initialize a struct directly in global. |
Structs
CursorRead | A minimal Cursor for writing, for use in libcore. |
CursorWrite | A minimal Cursor for writing, for use in libcore. |
Traits
BitArrayExt | Extension of the BitField trait, that adds the |
Splittable | A trait for things that can be splitted in two parts |
Functions
align_down | Align the address to the previous alignment. |
align_up | Align the address to the next alignment. |
align_up_checked | align_up, but checks if addr overflows |
bit_array_first_count_one | Returns the index of the first instance of count contiguous 1 in a bit array |
bit_array_first_one | Returns the index of the first 1 in a bit array. |
bit_array_first_zero | Returns the index of the first 0 in a bit array. |
cast_mut⚠ | Cast a slice while keeping the lifetimes. |
div_ceil | Counts the numbers of |
log2_floor | Returns the floored base 2 logarithm of the number. |
log2_ceil | Returns the ceiled base 2 logarithm of the number. |
print_hexdump | Displays memory as hexdump |
print_hexdump_as_if_at_addr | Makes a hexdump of a slice, but display different addresses. Used for displaying memory areas which are not identity mapped in the current pages |