From 58d44849d3681f4c67a9b0d3032972152e3317ce Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 14 Jun 2017 21:25:04 +0100 Subject: [PATCH] simple: make the two cases more obvious and avoid the need for extra defines --- Kernel/simple.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Kernel/simple.c b/Kernel/simple.c index 014a4e5c..c2c23d06 100644 --- a/Kernel/simple.c +++ b/Kernel/simple.c @@ -77,9 +77,12 @@ int swapout(ptptr p) /* Write the app (and possibly the uarea etc..) to disk */ #ifdef CONFIG_SPLIT_UDATA swapwrite(SWAPDEV, blk, UDATA_SIZE, (uaddr_t)&udata, 1); -#endif swapwrite(SWAPDEV, blk + UDATA_BLKS, SWAPTOP - SWAPBASE, SWAPBASE, 1); +#else + swapwrite(SWAPDEV, blk, SWAPTOP - SWAPBASE, + SWAPBASE, 1); +#endif p->p_page = 0; p->p_page2 = map; #ifdef DEBUG @@ -105,9 +108,12 @@ void swapin(ptptr p, uint16_t map) #ifdef CONFIG_SPLIT_UDATA swapread(SWAPDEV, blk, UDATA_SIZE, (uaddr_t)&udata, 1); -#endif swapread(SWAPDEV, blk + UDATA_BLKS, SWAPTOP - SWAPBASE, SWAPBASE, 1); +#else + swapread(SWAPDEV, blk, SWAPTOP - SWAPBASE, + SWAPBASE, 1); +#endif #ifdef DEBUG kprintf("%x: swapin done %d\n", p, p->p_page); #endif -- 2.34.1