kernel.h: Add a HOWMANY macro and make use of it.

This commit is contained in:
Augustin Cavalier
2024-10-14 13:53:50 -04:00
parent 8f383fa10e
commit 916e681ca5
3 changed files with 6 additions and 4 deletions
+1
View File
@@ -85,6 +85,7 @@ is_user_address_range(const void* addr, size_t size)
#define ROUNDDOWN(a, b) (((a) / (b)) * (b))
#define ROUNDUP(a, b) ROUNDDOWN((a) + (b) - 1, b)
#define HOWMANY(a, b) (((a) + ((b) - 1)) / (b))
#define CHECK_BIT(a, b) ((a) & (1 << (b)))