My Kernel v0.1.0
math.h File Reference
#include <kernel/types.h>
Include dependency graph for math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX(_x, _y)
 Compute the maximum value between 2 numbers.
 
#define MIN(_x, _y)
 Compute the minimum value between 2 numbers.
 
#define ABS(_x)
 Compute the absolute value of a number.
 
#define align_up(_value, _power)    ((((_value)-1) | __align_mask(_value, _power)) + 1)
 Align _value to the next multiple of _power. More...
 
#define align_down(_value, _power)   ((_value) & ~__align_mask(_value, _power))
 Align _value to the previous multiple of _power. More...
 
#define is_aligned(_value, _alignment)   (!((_value) % (_alignment)))
 

Functions

static u32 round_up (u32 value, u32 alignment)
 Round value to the next multiple of alignment. More...
 
static u32 round_down (u32 value, u32 alignment)
 Round value to the previous multiple of alignment. More...
 

Detailed Description