From: Alan Cox Date: Tue, 13 Sep 2016 21:08:57 +0000 (+0100) Subject: swap: type hygeine X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e895898b9368a82f4fd27ca65521873c50ee171b;p=FUZIX.git swap: type hygeine We can easily have 32bit ptr, 16bit int and swap over 64K --- diff --git a/Kernel/swap.c b/Kernel/swap.c index 9ff1ea95..6921e6c7 100644 --- a/Kernel/swap.c +++ b/Kernel/swap.c @@ -37,8 +37,8 @@ int swapmap_alloc(void) we are in the middle of an I/O (at least for now). If we rework the kernel for sleepable I/O this will change */ -int swapread(uint16_t dev, blkno_t blkno, unsigned int nbytes, - uint16_t buf, uint16_t page) +int swapread(uint16_t dev, blkno_t blkno, usize_t nbytes, + uaddr_t buf, uint16_t page) { udata.u_dptr = swap_map(buf); udata.u_block = blkno; @@ -50,8 +50,8 @@ int swapread(uint16_t dev, blkno_t blkno, unsigned int nbytes, } -int swapwrite(uint16_t dev, blkno_t blkno, unsigned int nbytes, - uint16_t buf, uint16_t page) +int swapwrite(uint16_t dev, blkno_t blkno, usize_t nbytes, + uaddr_t buf, uint16_t page) { /* FIXME: duplication here */ udata.u_dptr = swap_map(buf);