diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-23 17:47:46 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-23 17:47:46 +0200 |
| commit | 64ef02c4baa0a1181a28e2e1b1517de3ba4907be (patch) | |
| tree | 71da34495e878d24fb06cbc2051e65b50ec53531 /include/apos/utils.h | |
| parent | 272e1889ce14aaea9e3431a93c406d347f5b3c54 (diff) | |
| download | kmi-64ef02c4baa0a1181a28e2e1b1517de3ba4907be.tar.gz kmi-64ef02c4baa0a1181a28e2e1b1517de3ba4907be.zip | |
map_fill_region can now utilize higher order pages
Diffstat (limited to 'include/apos/utils.h')
| -rw-r--r-- | include/apos/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/apos/utils.h b/include/apos/utils.h index 318ba0a..b973d49 100644 --- a/include/apos/utils.h +++ b/include/apos/utils.h @@ -54,6 +54,14 @@ static inline size_t align_down(size_t val, size_t a) return val - (val % a); } +static inline bool aligned(size_t val, size_t a) +{ + if (!a) + return true; + + return val % a == 0; +} + static inline size_t asciinum(char c) { if(c >= '0' && c <= '9') |
