From 52fca461cb67b6bec30e3bb6b0abd0dd697e2ee8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 22 Jan 2019 23:49:09 +0000 Subject: [PATCH] kernel: header tweaks We add a new method to set p->p_udata on platform basis We allow the page switch code to be passed a death argument so that flat and similar models can do a one way copy if they are copying store to direct mapped and the existing direct map is dead (It's a common case when you fork and execve. The child has to put the parent back but there's no point saving the child as it's going to free and realloc a mapping) --- Kernel/include/kernel.h | 1 + Kernel/include/kernel32.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index f9de24af..e5b526c4 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -1055,6 +1055,7 @@ extern uint8_t platform_param(char *p); extern void platform_switchout(void); extern void platform_interrupt(void); extern uint8_t platform_suspend(void); +extern void platform_udata_set(ptptr p); extern void platform_swap_found(uint8_t part, uint8_t letter); diff --git a/Kernel/include/kernel32.h b/Kernel/include/kernel32.h index 2b9cf7a8..9ac0c19f 100644 --- a/Kernel/include/kernel32.h +++ b/Kernel/include/kernel32.h @@ -14,7 +14,7 @@ extern unsigned long kmemavail(void); extern unsigned long kmemused(void); /* flat.c */ -extern void pagemap_switch(ptptr p); +extern void pagemap_switch(ptptr p, int death); extern uaddr_t pagemap_base(void); #define PROGLOAD pagemap_base() extern uint32_t ugetl(void *uaddr, int *err); -- 2.34.1