diff options
author | Marvin Borner | 2021-04-10 15:25:27 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-10 15:25:27 +0200 |
commit | f96b8ad1ee83dec08ae636e179cc48019ca50b12 (patch) | |
tree | 80ff605e1305673291ce6230941db7ed4229856d /kernel/inc | |
parent | 9655593d80e23d2ea3c091e3187e8e47b278bc3d (diff) |
Some changes here and there
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/mm.h | 7 | ||||
-rw-r--r-- | kernel/inc/proc.h | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h index a9524ad..0f1b4ec 100644 --- a/kernel/inc/mm.h +++ b/kernel/inc/mm.h @@ -32,9 +32,9 @@ void physical_free(struct memory_range range); * Virtual */ -#define PAGE_SIZE 0x1000 -#define PAGE_COUNT 1024 -#define PAGE_KERNEL_COUNT 256 +#define PAGE_SIZE 0x1000u +#define PAGE_COUNT 1024u +#define PAGE_KERNEL_COUNT 256u #define PAGE_ALIGN(x) ((x) + PAGE_SIZE - ((x) % PAGE_SIZE)) #define PAGE_ALIGNED(x) ((x) % PAGE_SIZE == 0) #define PAGE_ALIGN_UP(x) (((x) % PAGE_SIZE == 0) ? (x) : (x) + PAGE_SIZE - ((x) % PAGE_SIZE)) @@ -122,6 +122,7 @@ struct memory_range memory_range_from(u32 base, u32 size); struct memory_range memory_range_around(u32 base, u32 size); void *memory_alloc(struct page_dir *dir, u32 size, u32 flags) NONNULL; +void *memory_alloc_with_boundary(struct page_dir *dir, u32 size, u32 flags) NONNULL; void *memory_alloc_identity(struct page_dir *dir, u32 flags) NONNULL; void memory_free(struct page_dir *dir, struct memory_range vrange) NONNULL; void memory_map_identity(struct page_dir *dir, struct memory_range prange, u32 flags) NONNULL; diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index f5dbf1a..b8912a5 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -53,8 +53,6 @@ struct stream { struct proc { u32 pid; u32 entry; - u32 user_stack; - u32 kernel_stack; char name[64]; char dir[64]; @@ -70,6 +68,11 @@ struct proc { struct { u32 user; u32 kernel; + } stack; + + struct { + u32 user; + u32 kernel; } ticks; struct { |