From: Alan Cox Date: Wed, 14 Jun 2017 20:25:04 +0000 (+0100) Subject: simple: make the two cases more obvious and avoid the need for extra defines X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=58d44849d3681f4c67a9b0d3032972152e3317ce;p=FUZIX.git simple: make the two cases more obvious and avoid the need for extra defines --- 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