mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 14:38:21 +00:00
kernel: usercopy functions
This commit is contained in:
@@ -77,7 +77,7 @@ typedef struct {
|
||||
}
|
||||
|
||||
void arch_context_switch(context_t *context);
|
||||
void arch_context_saveandcall(void (*fn)(context_t *context, void *argument), void *stack, void *argument);
|
||||
int arch_context_saveandcall(void (*fn)(context_t *context, void *argument), void *stack, void *argument);
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#define USERSPACE_START (void *)0x0000000000001000
|
||||
#define USERSPACE_END (void *)0x0000800000000000
|
||||
|
||||
#define IS_USER_ADDRESS(a) ((void *)a < USERSPACE_END)
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
#define ARCH_MMU_FLAGS_READ (uint64_t)1
|
||||
#define ARCH_MMU_FLAGS_WRITE (uint64_t)2
|
||||
|
||||
Reference in New Issue
Block a user