From afcc707b2b6316ef07d7f9356de3ce555e3e215b Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Tue, 2 Jan 2018 18:58:48 +0100 Subject: [PATCH] Replace u64_t by uint64_t --- minix/commands/fsck.mfs/fsck.c | 6 +- minix/commands/partition/partition.c | 4 +- minix/commands/vol/vol.c | 2 +- minix/drivers/eeprom/cat24c256/cat24c256.c | 12 +-- minix/drivers/examples/hello/hello.c | 8 +- minix/drivers/net/ip1000/ip1000.c | 12 +-- minix/drivers/net/ip1000/ip1000.h | 6 +- minix/drivers/net/rtl8169/rtl8169.c | 4 +- minix/drivers/printer/printer/printer.c | 4 +- minix/drivers/sensors/bmp085/bmp085.c | 8 +- minix/drivers/sensors/sht21/sht21.c | 8 +- minix/drivers/sensors/tsl2550/tsl2550.c | 8 +- minix/drivers/storage/ahci/ahci.c | 26 +++--- minix/drivers/storage/at_wini/at_wini.c | 19 +++-- minix/drivers/storage/fbd/action.c | 24 +++--- minix/drivers/storage/fbd/action.h | 4 +- minix/drivers/storage/fbd/fbd.c | 8 +- minix/drivers/storage/fbd/rule.c | 8 +- minix/drivers/storage/fbd/rule.h | 6 +- minix/drivers/storage/filter/driver.c | 8 +- minix/drivers/storage/filter/inc.h | 8 +- minix/drivers/storage/filter/main.c | 4 +- minix/drivers/storage/filter/sum.c | 10 +-- minix/drivers/storage/floppy/floppy.c | 8 +- minix/drivers/storage/memory/memory.c | 26 +++--- minix/drivers/storage/mmc/mmcblk.c | 4 +- minix/drivers/storage/virtio_blk/virtio_blk.c | 10 +-- minix/drivers/storage/virtio_blk/virtio_blk.h | 4 +- minix/drivers/storage/vnd/vnd.c | 10 +-- minix/drivers/system/log/log.c | 8 +- minix/drivers/system/random/main.c | 8 +- minix/drivers/tty/pty/pty.c | 8 +- minix/drivers/tty/pty/tty.c | 8 +- minix/drivers/tty/tty/tty.c | 8 +- minix/drivers/usb/usb_storage/usb_storage.c | 10 +-- minix/drivers/video/fb/fb.c | 12 +-- minix/drivers/video/tda19988/tda19988.c | 10 +-- minix/drivers/vmm_guest/vbox/hgcm.c | 2 +- minix/drivers/vmm_guest/vbox/vmmdev.h | 6 +- minix/fs/ext2/proto.h | 2 +- minix/fs/ext2/read.c | 16 ++-- minix/fs/ext2/super.c | 4 +- minix/fs/mfs/proto.h | 2 +- minix/fs/mfs/read.c | 16 ++-- minix/include/arch/earm/include/multiboot.h | 4 +- minix/include/minix/bdev.h | 16 ++-- minix/include/minix/blockdriver.h | 2 +- minix/include/minix/btrace.h | 2 +- minix/include/minix/chardriver.h | 4 +- minix/include/minix/driver.h | 4 +- minix/include/minix/ipc.h | 6 +- minix/include/minix/libminixfs.h | 6 +- minix/include/minix/minlib.h | 2 +- minix/include/minix/partition.h | 6 +- minix/include/minix/sffs.h | 8 +- minix/include/minix/spin.h | 2 +- minix/include/minix/sysutil.h | 8 +- minix/include/minix/timers.h | 4 +- minix/include/minix/type.h | 2 +- minix/include/minix/u64.h | 8 +- minix/include/minix/vbox.h | 4 +- minix/include/minix/vboxtype.h | 2 +- minix/include/sys/ioc_fbd.h | 8 +- minix/kernel/arch/earm/arch_clock.c | 16 ++-- minix/kernel/arch/earm/bsp/ti/omap_timer.c | 6 +- minix/kernel/arch/earm/include/arch_proto.h | 2 +- minix/kernel/arch/earm/pg_utils.c | 2 +- minix/kernel/arch/i386/acpi.h | 6 +- minix/kernel/arch/i386/apic.c | 8 +- minix/kernel/arch/i386/arch_clock.c | 30 +++---- minix/kernel/arch/i386/arch_watchdog.c | 8 +- minix/kernel/arch/i386/include/arch_proto.h | 2 +- minix/kernel/arch/i386/pg_utils.c | 2 +- minix/kernel/clock.h | 4 +- minix/kernel/cpulocals.h | 6 +- minix/kernel/glo.h | 6 +- minix/kernel/main.c | 2 +- minix/kernel/proc.c | 2 +- minix/kernel/proc.h | 14 ++-- minix/kernel/watchdog.h | 6 +- minix/lib/libaudiodriver/audio_fw.c | 8 +- minix/lib/libbdev/bdev.c | 28 +++---- minix/lib/libblockdriver/driver.c | 4 +- minix/lib/libblockdriver/drvlib.c | 12 +-- minix/lib/libblockdriver/trace.c | 6 +- minix/lib/libc/gen/read_tsc_64.c | 4 +- minix/lib/libc/sys/sizeup.c | 6 +- minix/lib/libhgfs/file.c | 4 +- minix/lib/libhgfs/info.c | 2 +- minix/lib/libhgfs/proto.h | 6 +- minix/lib/libhgfs/time.c | 10 +-- minix/lib/libminixfs/cache.c | 12 +-- minix/lib/libsffs/misc.c | 2 +- minix/lib/libsys/arch/earm/frclock_util.c | 14 ++-- minix/lib/libsys/arch/earm/spin.c | 2 +- minix/lib/libsys/arch/earm/tsc_util.c | 4 +- minix/lib/libsys/arch/i386/getidle.c | 8 +- minix/lib/libsys/arch/i386/spin.c | 2 +- minix/lib/libsys/arch/i386/tsc_util.c | 10 +-- minix/lib/libsys/arch/i386/vbox.c | 4 +- minix/lib/libsys/sys_hz.c | 2 +- minix/lib/libvboxfs/attr.c | 8 +- minix/lib/libvboxfs/file.c | 6 +- minix/lib/libvboxfs/info.c | 2 +- minix/lib/libvboxfs/proto.h | 6 +- minix/lib/libvboxfs/vboxfs.h | 22 ++--- minix/lib/libvirtio/virtio_ring.h | 2 +- minix/man/man2/fcntl.2 | 2 +- minix/man/man4/controller.4 | 4 +- minix/servers/input/input.c | 4 +- minix/servers/pm/utility.c | 2 +- minix/servers/vfs/misc.c | 2 +- minix/servers/vm/cache.c | 10 +-- minix/servers/vm/cache.h | 4 +- minix/servers/vm/mem_file.c | 6 +- minix/servers/vm/mmap.c | 10 +-- minix/servers/vm/proto.h | 12 +-- minix/servers/vm/region.h | 2 +- minix/servers/vm/vfs.c | 2 +- minix/servers/vm/vmproc.h | 4 +- minix/tests/blocktest/blocktest.c | 82 +++++++++---------- minix/tests/test53.c | 20 ++--- minix/tests/test71.c | 4 +- minix/tests/test72.c | 6 +- minix/tests/test74.c | 4 +- minix/tests/testcache.c | 6 +- minix/tests/testcache.h | 4 +- minix/tests/testvm.c | 4 +- minix/usr.bin/mtop/mtop.c | 22 ++--- minix/usr.sbin/fbdctl/fbdctl.c | 4 +- 130 files changed, 513 insertions(+), 512 deletions(-) diff --git a/minix/commands/fsck.mfs/fsck.c b/minix/commands/fsck.mfs/fsck.c index fbffc8314..62a369398 100644 --- a/minix/commands/fsck.mfs/fsck.c +++ b/minix/commands/fsck.mfs/fsck.c @@ -97,7 +97,7 @@ static struct super_block sb; * btoa64 gives the byte address of a block */ #define ztob(z) ((block_nr) (z) << sb.s_log_zone_size) -#define btoa64(b) ((u64_t)(b) * block_size) +#define btoa64(b) ((uint64_t)(b) * block_size) #define SCALE ((int) ztob(1)) /* # blocks in a zone */ #define FIRST ((zone_nr) sb.s_firstdatazone) /* as the name says */ @@ -656,12 +656,12 @@ void chksuper() int inoblock(int inn) { - return (int)(((u64_t)(inn - 1) * INODE_SIZE) / block_size) + BLK_ILIST; + return (int)(((uint64_t)(inn - 1) * INODE_SIZE) / block_size) + BLK_ILIST; } int inooff(int inn) { - return (int)(((u64_t)(inn - 1) * INODE_SIZE) % block_size); + return (int)(((uint64_t)(inn - 1) * INODE_SIZE) % block_size); } /* Make a listing of the inodes given by `clist'. If `repair' is set, ask diff --git a/minix/commands/partition/partition.c b/minix/commands/partition/partition.c index 103e1f906..2cbbcd334 100644 --- a/minix/commands/partition/partition.c +++ b/minix/commands/partition/partition.c @@ -316,8 +316,8 @@ void geometry(void) /* Use the same fake geometry as part. */ if (fstat(fd, &sb) < 0) fatal(device); - geometry.base= ((u64_t)(0)); - geometry.size= ((u64_t)(sb.st_size)); + geometry.base= ((uint64_t)(0)); + geometry.size= ((uint64_t)(sb.st_size)); geometry.sectors= 32; geometry.heads= 64; geometry.cylinders= (sb.st_size-1)/SECTOR_SIZE/ diff --git a/minix/commands/vol/vol.c b/minix/commands/vol/vol.c index 7036a77c2..a55b26b1d 100644 --- a/minix/commands/vol/vol.c +++ b/minix/commands/vol/vol.c @@ -47,7 +47,7 @@ char *buffer = NULL; size_t block_size = 0, mult_max = 0; size_t buffer_size; -u64_t volume_size; +uint64_t volume_size; char *str_vol_size; int rflag = 0, wflag = 0, oneflag = 0, variable = 0; diff --git a/minix/drivers/eeprom/cat24c256/cat24c256.c b/minix/drivers/eeprom/cat24c256/cat24c256.c index 5d5647638..fff886930 100644 --- a/minix/drivers/eeprom/cat24c256/cat24c256.c +++ b/minix/drivers/eeprom/cat24c256/cat24c256.c @@ -26,7 +26,7 @@ static i2c_addr_t valid_addrs[9] = { static int cat24c256_blk_open(devminor_t minor, int access); static int cat24c256_blk_close(devminor_t minor); static ssize_t cat24c256_blk_transfer(devminor_t minor, int do_write, - u64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags); + uint64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags); static int cat24c256_blk_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt); static struct device *cat24c256_blk_part(devminor_t minor); @@ -103,15 +103,15 @@ cat24c256_blk_close(devminor_t minor) } static ssize_t -cat24c256_blk_transfer(devminor_t minor, int do_write, u64_t pos64, +cat24c256_blk_transfer(devminor_t minor, int do_write, uint64_t pos64, endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags) { /* Read or write one the driver's block devices. */ unsigned int count; struct device *dv; - u64_t dv_size; + uint64_t dv_size; int r; - u64_t position; + uint64_t position; cp_grant_id_t grant; ssize_t total = 0; vir_bytes offset; @@ -424,8 +424,8 @@ sef_cb_init(int type, sef_init_info_t * UNUSED(info)) lu_state_restore(); } - geom[EEPROM_DEV].dv_base = ((u64_t) (0)); - geom[EEPROM_DEV].dv_size = ((u64_t) (32768)); + geom[EEPROM_DEV].dv_base = ((uint64_t) (0)); + geom[EEPROM_DEV].dv_size = ((uint64_t) (32768)); /* look-up the endpoint for the bus driver */ bus_endpoint = i2cdriver_bus_endpoint(bus); diff --git a/minix/drivers/examples/hello/hello.c b/minix/drivers/examples/hello/hello.c index 6769521ee..203620990 100644 --- a/minix/drivers/examples/hello/hello.c +++ b/minix/drivers/examples/hello/hello.c @@ -10,7 +10,7 @@ */ static int hello_open(devminor_t minor, int access, endpoint_t user_endpt); static int hello_close(devminor_t minor); -static ssize_t hello_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t hello_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); /* SEF functions and variables. */ @@ -45,11 +45,11 @@ static int hello_close(devminor_t UNUSED(minor)) return OK; } -static ssize_t hello_read(devminor_t UNUSED(minor), u64_t position, +static ssize_t hello_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { - u64_t dev_size; + uint64_t dev_size; char *ptr; int ret; char *buf = HELLO_MESSAGE; @@ -57,7 +57,7 @@ static ssize_t hello_read(devminor_t UNUSED(minor), u64_t position, printf("hello_read()\n"); /* This is the total size of our device. */ - dev_size = (u64_t) strlen(buf); + dev_size = (uint64_t) strlen(buf); /* Check for EOF, and possibly limit the read size. */ if (position >= dev_size) return 0; /* EOF */ diff --git a/minix/drivers/net/ip1000/ip1000.c b/minix/drivers/net/ip1000/ip1000.c index 43de570b8..bd79fc155 100644 --- a/minix/drivers/net/ip1000/ip1000.c +++ b/minix/drivers/net/ip1000/ip1000.c @@ -369,8 +369,8 @@ static void dev_init_rx_desc(NDR_desc *desc_start, int index, size_t buf_size, phys_bytes buf_dma, int max_desc_num, phys_bytes desc_dma_start) { NDR_desc *desc = desc_start + index; desc->status = 0; - desc->frag_info = (u64_t)(buf_dma); - desc->frag_info |= ((u64_t)buf_size << 48) & RFI_FRAG_LEN; + desc->frag_info = (uint64_t)(buf_dma); + desc->frag_info |= ((uint64_t)buf_size << 48) & RFI_FRAG_LEN; if (index == max_desc_num - 1) desc->next = desc_dma_start; else @@ -382,7 +382,7 @@ static void dev_init_tx_desc(NDR_desc *desc_start, int index, size_t buf_size, phys_bytes buf_dma, int max_desc_num, phys_bytes desc_dma_start) { NDR_desc *desc = desc_start + index; desc->status = TFS_TFD_DONE; - desc->frag_info = (u64_t)(buf_dma); + desc->frag_info = (uint64_t)(buf_dma); if (index == max_desc_num - 1) desc->next = desc_dma_start; else @@ -432,11 +432,11 @@ static void dev_set_rx_desc_done(uint32_t *base, NDR_desc *desc, int index) { static void dev_set_tx_desc_prepare(uint32_t *base, NDR_desc *desc, int index, size_t data_size) { desc->status = TFS_TFD_DONE; - desc->status |= (u64_t)(TFS_WORD_ALIGN | (TFS_FRAMEID & index) + desc->status |= (uint64_t)(TFS_WORD_ALIGN | (TFS_FRAMEID & index) | (TFS_FRAG_COUNT & (1 << 24))) | TFS_TX_DMA_INDICATE; - desc->frag_info |= TFI_FRAG_LEN & ((u64_t)((data_size > 60 ? data_size : 60) + desc->frag_info |= TFI_FRAG_LEN & ((uint64_t)((data_size > 60 ? data_size : 60) & 0xffff) << 48); - desc->status &= (u64_t)(~(TFS_TFD_DONE)); + desc->status &= (uint64_t)(~(TFS_TFD_DONE)); } /* Check whether Tx is OK from Tx descriptor (### CHECK_TX_OK_FROM_DESC ###) diff --git a/minix/drivers/net/ip1000/ip1000.h b/minix/drivers/net/ip1000/ip1000.h index b3d59bb5f..501166b80 100644 --- a/minix/drivers/net/ip1000/ip1000.h +++ b/minix/drivers/net/ip1000/ip1000.h @@ -138,9 +138,9 @@ static uint16_t PhyParam[] = { /* ======= Data Descriptor ======= */ typedef struct NDR_desc { - u64_t next; - u64_t status; - u64_t frag_info; + uint64_t next; + uint64_t status; + uint64_t frag_info; } NDR_desc; /* Driver Data Structure */ diff --git a/minix/drivers/net/rtl8169/rtl8169.c b/minix/drivers/net/rtl8169/rtl8169.c index 3f6177e8b..b728d7a55 100644 --- a/minix/drivers/net/rtl8169/rtl8169.c +++ b/minix/drivers/net/rtl8169/rtl8169.c @@ -284,8 +284,8 @@ static int mdio_read(uint16_t port, int regaddr) static void rtl8169_update_stat(re_t *rep) { - static u64_t last_miss = 0, last_coll = 0; - u64_t miss, coll; + static uint64_t last_miss = 0, last_coll = 0; + uint64_t miss, coll; port_t port; int i; diff --git a/minix/drivers/printer/printer/printer.c b/minix/drivers/printer/printer/printer.c index 023e48955..19872b761 100644 --- a/minix/drivers/printer/printer/printer.c +++ b/minix/drivers/printer/printer/printer.c @@ -82,7 +82,7 @@ static void prepare_output(void); static int do_probe(void); static void do_initialize(void); static int printer_open(devminor_t minor, int access, endpoint_t user_endpt); -static ssize_t printer_write(devminor_t minor, u64_t position, +static ssize_t printer_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int printer_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id); @@ -157,7 +157,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info)) /*===========================================================================* * do_write * *===========================================================================*/ -static ssize_t printer_write(devminor_t UNUSED(minor), u64_t UNUSED(position), +static ssize_t printer_write(devminor_t UNUSED(minor), uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { diff --git a/minix/drivers/sensors/bmp085/bmp085.c b/minix/drivers/sensors/bmp085/bmp085.c index 57788b7e4..debeb3da1 100644 --- a/minix/drivers/sensors/bmp085/bmp085.c +++ b/minix/drivers/sensors/bmp085/bmp085.c @@ -151,7 +151,7 @@ static int read_cal_coef(void); static int measure(int32_t * temperature, int32_t * pressure); /* libchardriver callbacks */ -static ssize_t bmp085_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t bmp085_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static void bmp085_other(message * m, int ipc_status); @@ -418,10 +418,10 @@ measure(int32_t * temperature, int32_t * pressure) } static ssize_t -bmp085_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, +bmp085_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { - u64_t dev_size; + uint64_t dev_size; int r; uint32_t temperature, pressure; @@ -437,7 +437,7 @@ bmp085_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, log_trace(&log, "%s", buffer); - dev_size = (u64_t)strlen(buffer); + dev_size = (uint64_t)strlen(buffer); if (position >= dev_size) return 0; if (position + size > dev_size) size = (size_t)(dev_size - position); diff --git a/minix/drivers/sensors/sht21/sht21.c b/minix/drivers/sensors/sht21/sht21.c index 1ec14c244..eab36c6d2 100644 --- a/minix/drivers/sensors/sht21/sht21.c +++ b/minix/drivers/sensors/sht21/sht21.c @@ -114,7 +114,7 @@ static uint8_t crc8(uint8_t crc, uint8_t byte); static int checksum(uint8_t * bytes, int nbytes, uint8_t expected_crc); /* libchardriver callbacks */ -static ssize_t sht21_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t sht21_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static void sht21_other(message * m, int ipc_status); @@ -322,10 +322,10 @@ checksum(uint8_t * bytes, int nbytes, uint8_t expected_crc) } static ssize_t -sht21_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, +sht21_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { - u64_t dev_size; + uint64_t dev_size; int bytes, r; r = measure(); @@ -340,7 +340,7 @@ sht21_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, log_trace(&log, "%s", buffer); - dev_size = (u64_t)strlen(buffer); + dev_size = (uint64_t)strlen(buffer); if (position >= dev_size) return 0; if (position + size > dev_size) size = (size_t)(dev_size - position); diff --git a/minix/drivers/sensors/tsl2550/tsl2550.c b/minix/drivers/sensors/tsl2550/tsl2550.c index b0009fa16..fe9940e41 100644 --- a/minix/drivers/sensors/tsl2550/tsl2550.c +++ b/minix/drivers/sensors/tsl2550/tsl2550.c @@ -65,7 +65,7 @@ static int adc_read(int adc, uint8_t * val); static int measure_lux(uint32_t * lux); /* libchardriver callbacks */ -static ssize_t tsl2550_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t tsl2550_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static void tsl2550_other(message * m, int ipc_status); @@ -274,10 +274,10 @@ tsl2550_init(void) } static ssize_t -tsl2550_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, +tsl2550_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { - u64_t dev_size; + uint64_t dev_size; int bytes, r; uint32_t lux; @@ -289,7 +289,7 @@ tsl2550_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt, memset(buffer, '\0', BUFFER_LEN + 1); snprintf(buffer, BUFFER_LEN, "%-16s: %d\n", "ILLUMINANCE", lux); - dev_size = (u64_t)strlen(buffer); + dev_size = (uint64_t)strlen(buffer); if (position >= dev_size) return 0; if (position + size > dev_size) size = (size_t)(dev_size - position); diff --git a/minix/drivers/storage/ahci/ahci.c b/minix/drivers/storage/ahci/ahci.c index 6e225f669..6a73f39d0 100644 --- a/minix/drivers/storage/ahci/ahci.c +++ b/minix/drivers/storage/ahci/ahci.c @@ -161,7 +161,7 @@ static struct port_state { phys_bytes pad_phys; /* sector padding buffer physical address */ vir_bytes pad_size; /* sector padding buffer size */ - u64_t lba_count; /* number of valid Logical Block Addresses */ + uint64_t lba_count; /* number of valid Logical Block Addresses */ uint32_t sector_size; /* medium sector size in bytes */ int open_count; /* number of times this port is opened */ @@ -238,7 +238,7 @@ static void port_disconnect(struct port_state *ps); static char *ahci_portname(struct port_state *ps); static int ahci_open(devminor_t minor, int access); static int ahci_close(devminor_t minor); -static ssize_t ahci_transfer(devminor_t minor, int do_write, u64_t position, +static ssize_t ahci_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, iovec_t *iovec, unsigned int count, int flags); static struct device *ahci_part(devminor_t minor); static void ahci_alarm(clock_t stamp); @@ -376,7 +376,7 @@ static int atapi_read_capacity(struct port_state *ps, int cmd) /* Store the number of LBA blocks and sector size. */ buf = ps->tmp_base; - ps->lba_count = (u64_t) ((buf[0] << 24) | (buf[1] << 16) | + ps->lba_count = (uint64_t) ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]) + 1; ps->sector_size = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; @@ -489,7 +489,7 @@ static int atapi_id_check(struct port_state *ps, uint16_t *buf) /*===========================================================================* * atapi_transfer * *===========================================================================*/ -static int atapi_transfer(struct port_state *ps, int cmd, u64_t start_lba, +static int atapi_transfer(struct port_state *ps, int cmd, uint64_t start_lba, unsigned int count, int write, prd_t *prdt, int nr_prds) { /* Perform data transfer from or to an ATAPI device. @@ -554,10 +554,10 @@ static int ata_id_check(struct port_state *ps, uint16_t *buf) } /* Get number of LBA blocks, and sector size. */ - ps->lba_count = ((u64_t) buf[ATA_ID_LBA3] << 48) | - ((u64_t) buf[ATA_ID_LBA2] << 32) | - ((u64_t) buf[ATA_ID_LBA1] << 16) | - (u64_t) buf[ATA_ID_LBA0]; + ps->lba_count = ((uint64_t) buf[ATA_ID_LBA3] << 48) | + ((uint64_t) buf[ATA_ID_LBA2] << 32) | + ((uint64_t) buf[ATA_ID_LBA1] << 16) | + (uint64_t) buf[ATA_ID_LBA0]; /* Determine the queue depth of the device. */ if (hba_state.has_ncq && @@ -603,7 +603,7 @@ static int ata_id_check(struct port_state *ps, uint16_t *buf) /*===========================================================================* * ata_transfer * *===========================================================================*/ -static int ata_transfer(struct port_state *ps, int cmd, u64_t start_lba, +static int ata_transfer(struct port_state *ps, int cmd, uint64_t start_lba, unsigned int count, int write, int force, prd_t *prdt, int nr_prds) { /* Perform data transfer from or to an ATA device. @@ -1136,7 +1136,7 @@ static int setup_prdt(struct port_state *ps, endpoint_t endpt, /*===========================================================================* * port_transfer * *===========================================================================*/ -static ssize_t port_transfer(struct port_state *ps, u64_t pos, u64_t eof, +static ssize_t port_transfer(struct port_state *ps, uint64_t pos, uint64_t eof, endpoint_t endpt, iovec_s_t *iovec, int nr_req, int write, int flags) { /* Perform an I/O transfer on a port. @@ -1144,7 +1144,7 @@ static ssize_t port_transfer(struct port_state *ps, u64_t pos, u64_t eof, prd_t prdt[NR_PRDS]; vir_bytes size, lead; unsigned int count, nr_prds; - u64_t start_lba; + uint64_t start_lba; int r, cmd; /* Get the total request size from the I/O vector. */ @@ -2592,14 +2592,14 @@ static int ahci_close(devminor_t minor) /*===========================================================================* * ahci_transfer * *===========================================================================*/ -static ssize_t ahci_transfer(devminor_t minor, int do_write, u64_t position, +static ssize_t ahci_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, iovec_t *iovec, unsigned int count, int flags) { /* Perform data transfer on the selected device. */ struct port_state *ps; struct device *dv; - u64_t pos, eof; + uint64_t pos, eof; ps = ahci_get_port(minor); dv = ahci_part(minor); diff --git a/minix/drivers/storage/at_wini/at_wini.c b/minix/drivers/storage/at_wini/at_wini.c index c41cb8574..f93de9096 100644 --- a/minix/drivers/storage/at_wini/at_wini.c +++ b/minix/drivers/storage/at_wini/at_wini.c @@ -118,7 +118,7 @@ static int w_identify(void); static char *w_name(void); static int w_specify(void); static int w_io_test(void); -static ssize_t w_transfer(devminor_t minor, int do_write, u64_t position, +static ssize_t w_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t proc_nr, iovec_t *iov, unsigned int nr_req, int flags); static int com_out(struct command *cmd); static int com_out_ext(struct command *cmd); @@ -141,7 +141,7 @@ static int atapi_sendpacket(uint8_t *packet, unsigned cnt, int do_dma); static int atapi_intr_wait(int dma, size_t max); static int atapi_open(void); static void atapi_close(void); -static int atapi_transfer(int do_write, u64_t position, endpoint_t +static int atapi_transfer(int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int nr_req); /* Entry points to this driver. */ @@ -742,7 +742,7 @@ static int w_identify(void) w_testing = 0; /* Size of the whole drive */ - wn->part[0].dv_size = (u64_t)size * SECTOR_SIZE; + wn->part[0].dv_size = (uint64_t)size * SECTOR_SIZE; /* Reset/calibrate (where necessary) */ if (w_specify() != OK && w_specify() != OK) { @@ -996,7 +996,7 @@ static int error_dma(const struct wini *wn) static ssize_t w_transfer( devminor_t minor, /* minor device to perform the transfer on */ int do_write, /* read or write? */ - u64_t position, /* offset on device to read or write */ + uint64_t position, /* offset on device to read or write */ endpoint_t proc_nr, /* process doing the request */ iovec_t *iov, /* pointer to read or write request vector */ unsigned int nr_req, /* length of request vector */ @@ -1008,7 +1008,7 @@ static ssize_t w_transfer( int r, s, errors, do_dma; unsigned long block; uint32_t w_status; - u64_t dv_size; + uint64_t dv_size; unsigned int n, nbytes; unsigned dma_buf_offset; ssize_t total = 0; @@ -1729,8 +1729,9 @@ static int atapi_open(void) /* Should load and lock the device and obtain its size. For now just set the * size of the device to something big. What is really needed is a generic * SCSI layer that does all this stuff for ATAPI and SCSI devices (kjb). (XXX) + * .."something big" is now the maximum size of the largest type of DVD. */ - w_wn->part[0].dv_size = (u64_t)(800L*1024) * 1024; + w_wn->part[0].dv_size = (uint64_t)(8500L*1024) * 1024; return(OK); } @@ -1777,7 +1778,7 @@ static void sense_request(void) *===========================================================================*/ static int atapi_transfer( int do_write, /* read or write? */ - u64_t position, /* offset on device to read or write */ + uint64_t position, /* offset on device to read or write */ endpoint_t proc_nr, /* process doing the request */ iovec_t *iov, /* pointer to read or write request vector */ unsigned int nr_req /* length of request vector */ @@ -1786,9 +1787,9 @@ static int atapi_transfer( struct wini *wn = w_wn; iovec_t *iop, *iov_end = iov + nr_req; int r, s, errors, fresh; - u64_t pos; + uint64_t pos; unsigned long block; - u64_t dv_size = w_dv->dv_size; + uint64_t dv_size = w_dv->dv_size; unsigned nbytes, nblocks, before, chunk; static uint8_t packet[ATAPI_PACKETSIZE]; size_t addr_offset = 0; diff --git a/minix/drivers/storage/fbd/action.c b/minix/drivers/storage/fbd/action.c index f25ef9332..81b243a5b 100644 --- a/minix/drivers/storage/fbd/action.c +++ b/minix/drivers/storage/fbd/action.c @@ -35,14 +35,14 @@ static uint32_t get_rand(uint32_t max) /*===========================================================================* * get_range * *===========================================================================*/ -static size_t get_range(struct fbd_rule *rule, u64_t pos, size_t *size, - u64_t *skip) +static size_t get_range(struct fbd_rule *rule, uint64_t pos, size_t *size, + uint64_t *skip) { /* Compute the range within the given request range that is affected * by the given rule, and optionally the number of bytes preceding * the range that are also affected by the rule. */ - u64_t delta; + uint64_t delta; size_t off; int to_eof; @@ -54,7 +54,7 @@ static size_t get_range(struct fbd_rule *rule, u64_t pos, size_t *size, off = 0; } else { - if (skip != NULL) *skip = ((u64_t)(0)); + if (skip != NULL) *skip = ((uint64_t)(0)); delta = rule->start - pos; @@ -105,9 +105,9 @@ static void limit_range(iovec_t *iov, unsigned *count, size_t size) * action_io_corrupt * *===========================================================================*/ static void action_io_corrupt(struct fbd_rule *rule, char *buf, size_t size, - u64_t pos, int UNUSED(flag)) + uint64_t pos, int UNUSED(flag)) { - u64_t skip; + uint64_t skip; uint32_t val; buf += get_range(rule, pos, &size, &skip); @@ -152,7 +152,7 @@ static void action_io_corrupt(struct fbd_rule *rule, char *buf, size_t size, * action_pre_error * *===========================================================================*/ static void action_pre_error(struct fbd_rule *rule, iovec_t *iov, - unsigned *count, size_t *size, u64_t *pos) + unsigned *count, size_t *size, uint64_t *pos) { /* Limit the request to the part that precedes the matched range. */ *size = get_range(rule, *pos, size, NULL); @@ -175,7 +175,7 @@ static void action_post_error(struct fbd_rule *rule, size_t UNUSED(osize), * action_pre_misdir * *===========================================================================*/ static void action_pre_misdir(struct fbd_rule *rule, iovec_t *UNUSED(iov), - unsigned *UNUSED(count), size_t *UNUSED(size), u64_t *pos) + unsigned *UNUSED(count), size_t *UNUSED(size), uint64_t *pos) { /* Randomize the request position to fall within the range (and have * the alignment) given by the rule. @@ -195,14 +195,14 @@ static void action_pre_misdir(struct fbd_rule *rule, iovec_t *UNUSED(iov), choice = 0; *pos = rule->params.misdir.start + - ((u64_t)choice * rule->params.misdir.align); + ((uint64_t)choice * rule->params.misdir.align); } /*===========================================================================* * action_pre_losttorn * *===========================================================================*/ static void action_pre_losttorn(struct fbd_rule *rule, iovec_t *iov, - unsigned *count, size_t *size, u64_t *UNUSED(pos)) + unsigned *count, size_t *size, uint64_t *UNUSED(pos)) { if (*size > rule->params.losttorn.lead) *size = rule->params.losttorn.lead; @@ -245,7 +245,7 @@ int action_mask(struct fbd_rule *rule) * action_pre_hook * *===========================================================================*/ void action_pre_hook(struct fbd_rule *rule, iovec_t *iov, - unsigned *count, size_t *size, u64_t *pos) + unsigned *count, size_t *size, uint64_t *pos) { switch (rule->action) { case FBD_ACTION_ERROR: @@ -269,7 +269,7 @@ void action_pre_hook(struct fbd_rule *rule, iovec_t *iov, * action_io_hook * *===========================================================================*/ void action_io_hook(struct fbd_rule *rule, char *buf, size_t size, - u64_t pos, int flag) + uint64_t pos, int flag) { switch (rule->action) { case FBD_ACTION_CORRUPT: diff --git a/minix/drivers/storage/fbd/action.h b/minix/drivers/storage/fbd/action.h index 1d7fca577..0d555a065 100644 --- a/minix/drivers/storage/fbd/action.h +++ b/minix/drivers/storage/fbd/action.h @@ -4,9 +4,9 @@ extern int action_mask(struct fbd_rule *rule); extern void action_pre_hook(struct fbd_rule *rule, iovec_t *iov, - unsigned *count, size_t *size, u64_t *pos); + unsigned *count, size_t *size, uint64_t *pos); extern void action_io_hook(struct fbd_rule *rule, char *buf, size_t size, - u64_t pos, int flag); + uint64_t pos, int flag); extern void action_post_hook(struct fbd_rule *rule, size_t osize, int *result); #endif /* _FBD_ACTION_H */ diff --git a/minix/drivers/storage/fbd/fbd.c b/minix/drivers/storage/fbd/fbd.c index 9861d3b21..8a6348c2c 100644 --- a/minix/drivers/storage/fbd/fbd.c +++ b/minix/drivers/storage/fbd/fbd.c @@ -17,7 +17,7 @@ /* Function declarations. */ static int fbd_open(devminor_t minor, int access); static int fbd_close(devminor_t minor); -static int fbd_transfer(devminor_t minor, int do_write, u64_t position, +static int fbd_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags); static int fbd_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt); @@ -227,7 +227,7 @@ static int fbd_ioctl(devminor_t UNUSED(minor), unsigned long request, /*===========================================================================* * fbd_transfer_direct * *===========================================================================*/ -static ssize_t fbd_transfer_direct(int do_write, u64_t position, +static ssize_t fbd_transfer_direct(int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int count, int flags) { /* Forward the entire transfer request, without any intervention. */ @@ -272,7 +272,7 @@ static ssize_t fbd_transfer_direct(int do_write, u64_t position, /*===========================================================================* * fbd_transfer_copy * *===========================================================================*/ -static ssize_t fbd_transfer_copy(int do_write, u64_t position, +static ssize_t fbd_transfer_copy(int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int count, size_t size, int flags) { @@ -393,7 +393,7 @@ static ssize_t fbd_transfer_copy(int do_write, u64_t position, /*===========================================================================* * fbd_transfer * *===========================================================================*/ -static int fbd_transfer(devminor_t UNUSED(minor), int do_write, u64_t position, +static int fbd_transfer(devminor_t UNUSED(minor), int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags) { /* Transfer data from or to the device. */ diff --git a/minix/drivers/storage/fbd/rule.c b/minix/drivers/storage/fbd/rule.c index a4a258bf5..915e174dd 100644 --- a/minix/drivers/storage/fbd/rule.c +++ b/minix/drivers/storage/fbd/rule.c @@ -85,7 +85,7 @@ int rule_ctl(unsigned long request, endpoint_t endpt, cp_grant_id_t grant) /*===========================================================================* * rule_match * *===========================================================================*/ -static int rule_match(struct fbd_rule *rule, u64_t pos, size_t size, int flag) +static int rule_match(struct fbd_rule *rule, uint64_t pos, size_t size, int flag) { /* Check whether the given rule matches the given parameters. As side * effect, update counters in the rule as appropriate. @@ -112,7 +112,7 @@ static int rule_match(struct fbd_rule *rule, u64_t pos, size_t size, int flag) /*===========================================================================* * rule_find * *===========================================================================*/ -int rule_find(u64_t pos, size_t size, int flag) +int rule_find(uint64_t pos, size_t size, int flag) { /* Find all matching rules, and return a hook mask. */ struct fbd_rule *rule; @@ -150,7 +150,7 @@ int rule_find(u64_t pos, size_t size, int flag) * rule_pre_hook * *===========================================================================*/ void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size, - u64_t *pos) + uint64_t *pos) { int i; @@ -162,7 +162,7 @@ void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size, /*===========================================================================* * rule_io_hook * *===========================================================================*/ -void rule_io_hook(char *buf, size_t size, u64_t pos, int flag) +void rule_io_hook(char *buf, size_t size, uint64_t pos, int flag) { int i; diff --git a/minix/drivers/storage/fbd/rule.h b/minix/drivers/storage/fbd/rule.h index 1f081c15b..a05760cbc 100644 --- a/minix/drivers/storage/fbd/rule.h +++ b/minix/drivers/storage/fbd/rule.h @@ -6,11 +6,11 @@ extern int rule_ctl(unsigned long request, endpoint_t endpt, cp_grant_id_t grant); -extern int rule_find(u64_t pos, size_t size, int flag); +extern int rule_find(uint64_t pos, size_t size, int flag); extern void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size, - u64_t *pos); -extern void rule_io_hook(char *buf, size_t size, u64_t pos, int flag); + uint64_t *pos); +extern void rule_io_hook(char *buf, size_t size, uint64_t pos, int flag); extern void rule_post_hook(size_t osize, int *result); #define PRE_HOOK 0x1 diff --git a/minix/drivers/storage/filter/driver.c b/minix/drivers/storage/filter/driver.c index a9e076008..5e5998623 100644 --- a/minix/drivers/storage/filter/driver.c +++ b/minix/drivers/storage/filter/driver.c @@ -9,7 +9,7 @@ static struct driverinfo driver[2]; static asynmsg_t amsgtable[2]; static int size_known = 0; -static u64_t disk_size; +static uint64_t disk_size; static int problem_stats[BD_LAST] = { 0 }; @@ -81,7 +81,7 @@ static int driver_open(int which) disk_size = part.size; size_known = 1; sectors = (unsigned long)(disk_size / SECTOR_SIZE); - if ((u64_t)sectors * SECTOR_SIZE != disk_size) { + if ((uint64_t)sectors * SECTOR_SIZE != disk_size) { printf("Filter: partition too large\n"); return RET_REDO; @@ -216,7 +216,7 @@ void driver_shutdown(void) /*===========================================================================* * get_raw_size * *===========================================================================*/ -u64_t get_raw_size(void) +uint64_t get_raw_size(void) { /* Return the size of the raw disks as used by the filter driver. */ @@ -903,7 +903,7 @@ static void paired_revoke(const cp_grant_id_t *gids, /*===========================================================================* * read_write * *===========================================================================*/ -int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request) +int read_write(uint64_t pos, char *bufa, char *bufb, size_t *sizep, int request) { iovec_s_t vectors[2][NR_IOREQS]; message m1, m2; diff --git a/minix/drivers/storage/filter/inc.h b/minix/drivers/storage/filter/inc.h index 48a42f2f9..65eccca08 100644 --- a/minix/drivers/storage/filter/inc.h +++ b/minix/drivers/storage/filter/inc.h @@ -100,17 +100,17 @@ extern int BACKUP_MINOR; /* sum.c */ extern void sum_init(void); -extern int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw); -extern u64_t convert(u64_t size); +extern int transfer(uint64_t pos, char *buffer, size_t *sizep, int flag_rw); +extern uint64_t convert(uint64_t size); /* driver.c */ extern void driver_init(void); extern void driver_shutdown(void); -extern u64_t get_raw_size(void); +extern uint64_t get_raw_size(void); extern void reset_kills(void); extern int check_driver(int which); extern int bad_driver(int which, int type, int error); -extern int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, +extern int read_write(uint64_t pos, char *bufa, char *bufb, size_t *sizep, int flag_rw); extern void ds_event(void); diff --git a/minix/drivers/storage/filter/main.c b/minix/drivers/storage/filter/main.c index 98124609b..c27853264 100644 --- a/minix/drivers/storage/filter/main.c +++ b/minix/drivers/storage/filter/main.c @@ -73,7 +73,7 @@ static void sef_cb_signal_handler(int signo); static int filter_open(devminor_t minor, int access); static int filter_close(devminor_t minor); -static ssize_t filter_transfer(devminor_t minor, int do_write, u64_t pos, +static ssize_t filter_transfer(devminor_t minor, int do_write, uint64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count, int flags); static int filter_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt); @@ -146,7 +146,7 @@ static int vcarry(endpoint_t endpt, unsigned int grants, iovec_t *iov, * filter_transfer * *===========================================================================*/ static ssize_t filter_transfer(devminor_t UNUSED(minor), int do_write, - u64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count, + uint64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count, int UNUSED(flags)) { size_t size, size_ret; diff --git a/minix/drivers/storage/filter/sum.c b/minix/drivers/storage/filter/sum.c index 236100b68..562283c59 100644 --- a/minix/drivers/storage/filter/sum.c +++ b/minix/drivers/storage/filter/sum.c @@ -9,7 +9,7 @@ #define LOG2PHYS(nr) ((nr)/NR_SUM_SEC*(NR_SUM_SEC+1) + (nr)%NR_SUM_SEC) #define POS2SEC(nr) (unsigned long)((nr) / SECTOR_SIZE) -#define SEC2POS(nr) ((u64_t)(nr) * SECTOR_SIZE) +#define SEC2POS(nr) ((uint64_t)(nr) * SECTOR_SIZE) /* Data buffers. */ static char *ext_array, *ext_buffer; /* interspersed buffer */ @@ -312,7 +312,7 @@ static int check_sum(sector_t current_sector, size_t bytes_left) /*===========================================================================* * check_write * *===========================================================================*/ -static int check_write(u64_t pos, size_t size) +static int check_write(uint64_t pos, size_t size) { /* Read back the data just written, from both disks if mirroring is * enabled, and check the result against the original. Return OK on @@ -486,7 +486,7 @@ static void collapse_size(sector_t first_sector, size_t *sizep) /*===========================================================================* * transfer * *===========================================================================*/ -int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw) +int transfer(uint64_t pos, char *buffer, size_t *sizep, int flag_rw) { /* Transfer data in interspersed-checksum format. When writing, first * compute checksums, and read back the written data afterwards. When @@ -494,7 +494,7 @@ int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw) */ sector_t first_sector, nr_sectors; size_t ext_size, req_size, res_size; - u64_t phys_pos; + uint64_t phys_pos; int r; /* If we don't use checksums or even checksum layout, simply pass on @@ -604,7 +604,7 @@ int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw) /*===========================================================================* * convert * *===========================================================================*/ -u64_t convert(u64_t size) +uint64_t convert(uint64_t size) { /* Given a raw disk size, subtract the amount of disk space used for * checksums, resulting in the user-visible disk size. diff --git a/minix/drivers/storage/floppy/floppy.c b/minix/drivers/storage/floppy/floppy.c index c4299f9f2..3952b5fb8 100644 --- a/minix/drivers/storage/floppy/floppy.c +++ b/minix/drivers/storage/floppy/floppy.c @@ -245,7 +245,7 @@ static void f_timeout(int arg); static struct device *f_prepare(devminor_t device); static struct device *f_part(devminor_t minor); static void f_cleanup(void); -static ssize_t f_transfer(devminor_t minor, int do_write, u64_t position, +static ssize_t f_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t proc_nr, iovec_t *iov, unsigned int nr_req, int flags); static int dma_setup(int do_write); static void start_motor(void); @@ -405,7 +405,7 @@ static struct device *f_prepare(devminor_t device) if (f_fp->fl_density < NT) { f_dp = &fdensity[f_fp->fl_density]; f_sectors = f_dp->secpt; - f_fp->fl_geom.dv_size = (u64_t)(NR_HEADS * f_sectors * f_dp->cyls) * + f_fp->fl_geom.dv_size = (uint64_t)(NR_HEADS * f_sectors * f_dp->cyls) * SECTOR_SIZE; } @@ -444,7 +444,7 @@ static void f_cleanup(void) static ssize_t f_transfer( devminor_t minor, /* minor device number */ int do_write, /* read or write? */ - u64_t pos64, /* offset on device to read or write */ + uint64_t pos64, /* offset on device to read or write */ endpoint_t proc_nr, /* process doing the request */ iovec_t *iov, /* pointer to read or write request vector */ unsigned int nr_req, /* length of request vector */ @@ -456,7 +456,7 @@ static ssize_t f_transfer( iovec_t *iop, *iov_end = iov + nr_req; int s, r, errors, nr; unsigned block, nbytes, count, chunk, sector; - u64_t dv_size; + uint64_t dv_size; vir_bytes user_offset, iov_offset = 0, iop_offset; unsigned long position; signed long uoffsets[MAX_SECTORS], *up; diff --git a/minix/drivers/storage/memory/memory.c b/minix/drivers/storage/memory/memory.c index 930fcc201..2014a95dd 100644 --- a/minix/drivers/storage/memory/memory.c +++ b/minix/drivers/storage/memory/memory.c @@ -45,15 +45,15 @@ static vir_bytes m_vaddrs[NR_DEVS]; static int openct[NR_DEVS]; -static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t m_char_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t m_char_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t m_char_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int m_char_open(devminor_t minor, int access, endpoint_t user_endpt); static int m_char_close(devminor_t minor); static struct device *m_block_part(devminor_t minor); -static ssize_t m_block_transfer(devminor_t minor, int do_write, u64_t position, +static ssize_t m_block_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags); static int m_block_open(devminor_t minor, int access); static int m_block_close(devminor_t minor); @@ -186,11 +186,11 @@ static int m_is_block(devminor_t minor) /*===========================================================================* * m_transfer_kmem * *===========================================================================*/ -static ssize_t m_transfer_kmem(devminor_t minor, int do_write, u64_t position, +static ssize_t m_transfer_kmem(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size) { /* Transfer from or to the KMEM device. */ - u64_t dv_size, dev_vaddr; + uint64_t dv_size, dev_vaddr; int r; dv_size = m_geom[minor].dv_size; @@ -215,7 +215,7 @@ static ssize_t m_transfer_kmem(devminor_t minor, int do_write, u64_t position, /*===========================================================================* * m_transfer_mem * *===========================================================================*/ -static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position, +static ssize_t m_transfer_mem(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size) { /* Transfer from or to the MEM device. */ @@ -224,7 +224,7 @@ static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position, static char *vaddr; phys_bytes mem_phys, pagestart; size_t off, page_off, subcount; - u64_t dv_size; + uint64_t dv_size; int r; dv_size = m_geom[minor].dv_size; @@ -284,7 +284,7 @@ static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position, /*===========================================================================* * m_char_read * *===========================================================================*/ -static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t m_char_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { @@ -323,7 +323,7 @@ static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt, /*===========================================================================* * m_char_write * *===========================================================================*/ -static ssize_t m_char_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t m_char_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { @@ -417,7 +417,7 @@ static struct device *m_block_part(devminor_t minor) static int m_block_transfer( devminor_t minor, /* minor device number */ int do_write, /* read or write? */ - u64_t position, /* offset on device to read or write */ + uint64_t position, /* offset on device to read or write */ endpoint_t endpt, /* process doing the request */ iovec_t *iov, /* pointer to read or write request vector */ unsigned int nr_req, /* length of request vector */ @@ -428,7 +428,7 @@ static int m_block_transfer( unsigned count; vir_bytes vir_offset = 0; struct device *dv; - u64_t dv_size; + uint64_t dv_size; int r; vir_bytes dev_vaddr; cp_grant_id_t grant; @@ -545,7 +545,7 @@ static int m_block_ioctl(devminor_t minor, unsigned long request, return s; if(is_imgrd) ramdev_size = 0; - if(m_vaddrs[minor] && dv->dv_size == (u64_t) ramdev_size) { + if(m_vaddrs[minor] && dv->dv_size == (uint64_t) ramdev_size) { return(OK); } /* openct is 1 for the ioctl(). */ @@ -556,7 +556,7 @@ static int m_block_ioctl(devminor_t minor, unsigned long request, } if(m_vaddrs[minor]) { uint32_t a, o; - u64_t size; + uint64_t size; int r; if(ex64hi(dv->dv_size)) { panic("huge old ramdisk"); diff --git a/minix/drivers/storage/mmc/mmcblk.c b/minix/drivers/storage/mmc/mmcblk.c index 631ebf17f..ea9031dc1 100644 --- a/minix/drivers/storage/mmc/mmcblk.c +++ b/minix/drivers/storage/mmc/mmcblk.c @@ -46,7 +46,7 @@ static int block_open(devminor_t minor, int access); static int block_close(devminor_t minor); static int block_transfer(devminor_t minor, int do_write, - u64_t position, + uint64_t position, endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags); static int block_ioctl(devminor_t minor, unsigned long request, @@ -280,7 +280,7 @@ static int block_transfer( devminor_t minor, /* minor device number */ int do_write, /* read or write? */ - u64_t position, /* offset on device to read or write */ + uint64_t position, /* offset on device to read or write */ endpoint_t endpt, /* process doing the request */ iovec_t * iov, /* pointer to read or write request vector */ unsigned int nr_req, /* length of request vector */ diff --git a/minix/drivers/storage/virtio_blk/virtio_blk.c b/minix/drivers/storage/virtio_blk/virtio_blk.c index 07f868a90..a5f8ea512 100644 --- a/minix/drivers/storage/virtio_blk/virtio_blk.c +++ b/minix/drivers/storage/virtio_blk/virtio_blk.c @@ -79,7 +79,7 @@ static phys_bytes status_phys; /* Prototypes */ static int virtio_blk_open(devminor_t minor, int access); static int virtio_blk_close(devminor_t minor); -static ssize_t virtio_blk_transfer(devminor_t minor, int write, u64_t position, +static ssize_t virtio_blk_transfer(devminor_t minor, int write, uint64_t position, endpoint_t endpt, iovec_t *iovec, unsigned int cnt, int flags); static int virtio_blk_ioctl(devminor_t minor, unsigned long req, @@ -235,7 +235,7 @@ prepare_vir_vec(endpoint_t endpt, struct vumap_vir *vir, iovec_s_t *iv, } static ssize_t -virtio_blk_transfer(devminor_t minor, int write, u64_t position, +virtio_blk_transfer(devminor_t minor, int write, uint64_t position, endpoint_t endpt, iovec_t *iovec, unsigned int cnt, int flags) { @@ -251,8 +251,8 @@ virtio_blk_transfer(devminor_t minor, int write, u64_t position, vir_bytes size = 0; vir_bytes size_tmp = 0; struct device *dv; - u64_t sector; - u64_t end_part; + uint64_t sector; + uint64_t end_part; int r, pcnt = sizeof(phys) / sizeof(phys[0]); iovec_s_t *iv = (iovec_s_t *)iovec; @@ -639,7 +639,7 @@ virtio_blk_config(void) /* capacity is always there */ sectors_low = virtio_sread32(blk_dev, 0); sectors_high = virtio_sread32(blk_dev, 4); - blk_config.capacity = ((u64_t)sectors_high << 32) | sectors_low; + blk_config.capacity = ((uint64_t)sectors_high << 32) | sectors_low; /* If this gets truncated, you have a big disk... */ size_mbs = (uint32_t)(blk_config.capacity * 512 / 1024 / 1024); diff --git a/minix/drivers/storage/virtio_blk/virtio_blk.h b/minix/drivers/storage/virtio_blk/virtio_blk.h index 3f26c7bbd..37b8c7428 100644 --- a/minix/drivers/storage/virtio_blk/virtio_blk.h +++ b/minix/drivers/storage/virtio_blk/virtio_blk.h @@ -46,7 +46,7 @@ struct virtio_blk_config { /* The capacity (in 512-byte sectors). */ - u64_t capacity; + uint64_t capacity; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ uint32_t size_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ @@ -107,7 +107,7 @@ struct virtio_blk_outhdr { /* io priority. */ uint32_t ioprio; /* Sector (ie. 512 byte offset) */ - u64_t sector; + uint64_t sector; }; struct virtio_scsi_inhdr { diff --git a/minix/drivers/storage/vnd/vnd.c b/minix/drivers/storage/vnd/vnd.c index c751f4a26..eb11103ce 100644 --- a/minix/drivers/storage/vnd/vnd.c +++ b/minix/drivers/storage/vnd/vnd.c @@ -28,7 +28,7 @@ static unsigned int instance; static int vnd_open(devminor_t, int); static int vnd_close(devminor_t); -static int vnd_transfer(devminor_t, int, u64_t, endpoint_t, iovec_t *, +static int vnd_transfer(devminor_t, int, uint64_t, endpoint_t, iovec_t *, unsigned int, int); static int vnd_ioctl(devminor_t, unsigned long, endpoint_t, cp_grant_id_t, endpoint_t); @@ -209,7 +209,7 @@ vnd_advance(iovec_s_t *iov, size_t *iov_offp, size_t bytes) * Perform data transfer on the selected device. */ static int -vnd_transfer(devminor_t minor, int do_write, u64_t position, +vnd_transfer(devminor_t minor, int do_write, uint64_t position, endpoint_t endpt, iovec_t *iovt, unsigned int nr_req, int flags) { struct device *dv; @@ -308,9 +308,9 @@ vnd_transfer(devminor_t minor, int do_write, u64_t position, * computed. */ static int -vnd_layout(u64_t size, struct vnd_ioctl *vnd) +vnd_layout(uint64_t size, struct vnd_ioctl *vnd) { - u64_t sectors; + uint64_t sectors; state.geom.base = 0ULL; @@ -323,7 +323,7 @@ vnd_layout(u64_t size, struct vnd_ioctl *vnd) state.geom.heads = vnd->vnd_geom.vng_ntracks; state.geom.sectors = vnd->vnd_geom.vng_nsectors; - state.geom.size = (u64_t) state.geom.cylinders * + state.geom.size = (uint64_t) state.geom.cylinders * state.geom.heads * state.geom.sectors * vnd->vnd_geom.vng_secsize; if (state.geom.size == 0 || state.geom.size > size) diff --git a/minix/drivers/system/log/log.c b/minix/drivers/system/log/log.c index 8869eedd2..d0f18da0c 100644 --- a/minix/drivers/system/log/log.c +++ b/minix/drivers/system/log/log.c @@ -20,9 +20,9 @@ struct logdevice logdevices[NR_DEVS]; -static ssize_t log_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t log_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t log_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t log_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int log_open(devminor_t minor, int access, endpoint_t user_endpt); static int log_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id); @@ -241,7 +241,7 @@ subread(struct logdevice *log, size_t size, endpoint_t endpt, /*===========================================================================* * log_read * *===========================================================================*/ -static ssize_t log_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t log_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { @@ -275,7 +275,7 @@ static ssize_t log_read(devminor_t minor, u64_t UNUSED(position), /*===========================================================================* * log_write * *===========================================================================*/ -static ssize_t log_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t log_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { diff --git a/minix/drivers/system/random/main.c b/minix/drivers/system/random/main.c index 057fe72c3..474e2bd18 100644 --- a/minix/drivers/system/random/main.c +++ b/minix/drivers/system/random/main.c @@ -21,9 +21,9 @@ static dev_t m_device; /* current device */ extern int errno; /* error number for PM calls */ static struct device *r_prepare(dev_t device); -static ssize_t r_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t r_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t r_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t r_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int r_open(devminor_t minor, int access, endpoint_t user_endpt); static void r_random(clock_t stamp); @@ -117,7 +117,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info)) /*===========================================================================* * r_read * *===========================================================================*/ -static ssize_t r_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t r_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { @@ -146,7 +146,7 @@ static ssize_t r_read(devminor_t minor, u64_t UNUSED(position), /*===========================================================================* * r_write * *===========================================================================*/ -static ssize_t r_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t r_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { diff --git a/minix/drivers/tty/pty/pty.c b/minix/drivers/tty/pty/pty.c index 9a1ec7a0e..acae5b289 100644 --- a/minix/drivers/tty/pty/pty.c +++ b/minix/drivers/tty/pty/pty.c @@ -92,10 +92,10 @@ static void pty_finish(pty_t *pp); static int pty_master_open(devminor_t minor, int access, endpoint_t user_endpt); static int pty_master_close(devminor_t minor); -static ssize_t pty_master_read(devminor_t minor, u64_t position, +static ssize_t pty_master_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t pty_master_write(devminor_t minor, u64_t position, +static ssize_t pty_master_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int pty_master_ioctl(devminor_t minor, unsigned long request, @@ -244,7 +244,7 @@ static int pty_master_close(devminor_t minor) /*===========================================================================* * pty_master_read * *===========================================================================*/ -static ssize_t pty_master_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t pty_master_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { @@ -292,7 +292,7 @@ static ssize_t pty_master_read(devminor_t minor, u64_t UNUSED(position), /*===========================================================================* * pty_master_write * *===========================================================================*/ -static ssize_t pty_master_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t pty_master_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { diff --git a/minix/drivers/tty/pty/tty.c b/minix/drivers/tty/pty/tty.c index b658c0092..708d223b4 100644 --- a/minix/drivers/tty/pty/tty.c +++ b/minix/drivers/tty/pty/tty.c @@ -36,9 +36,9 @@ static void tty_icancel(tty_t *tp); static int do_open(devminor_t minor, int access, endpoint_t user_endpt); static int do_close(devminor_t minor); -static ssize_t do_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t do_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t do_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t do_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int do_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id); static int do_select(devminor_t minor, unsigned int ops, endpoint_t endpt); @@ -223,7 +223,7 @@ static void tty_startup(void) /*===========================================================================* * do_read * *===========================================================================*/ -static ssize_t do_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t do_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { @@ -292,7 +292,7 @@ static ssize_t do_read(devminor_t minor, u64_t UNUSED(position), /*===========================================================================* * do_write * *===========================================================================*/ -static ssize_t do_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t do_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { diff --git a/minix/drivers/tty/tty/tty.c b/minix/drivers/tty/tty/tty.c index 7e07de46e..1f1e621c8 100644 --- a/minix/drivers/tty/tty/tty.c +++ b/minix/drivers/tty/tty/tty.c @@ -78,9 +78,9 @@ static void reset_color(tty_t *tp); static int do_open(devminor_t minor, int access, endpoint_t user_endpt); static int do_close(devminor_t minor); -static ssize_t do_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t do_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t do_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t do_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id); @@ -466,7 +466,7 @@ static void sef_cb_signal_handler(int signo) /*===========================================================================* * do_read * *===========================================================================*/ -static ssize_t do_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t do_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { @@ -535,7 +535,7 @@ static ssize_t do_read(devminor_t minor, u64_t UNUSED(position), /*===========================================================================* * do_write * *===========================================================================*/ -static ssize_t do_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t do_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { diff --git a/minix/drivers/usb/usb_storage/usb_storage.c b/minix/drivers/usb/usb_storage/usb_storage.c index c40789a37..1dc00c4df 100644 --- a/minix/drivers/usb/usb_storage/usb_storage.c +++ b/minix/drivers/usb/usb_storage/usb_storage.c @@ -66,7 +66,7 @@ static void mass_storage_task(void *); static int mass_storage_test(void); static int mass_storage_check_error(void); static int mass_storage_try_first_open(void); -static int mass_storage_transfer_restrictions(u64_t, unsigned long); +static int mass_storage_transfer_restrictions(uint64_t, unsigned long); static ssize_t mass_storage_write(unsigned long, endpoint_t, iovec_t *, unsigned int, unsigned long); static ssize_t mass_storage_read(unsigned long, endpoint_t, iovec_t *, @@ -75,7 +75,7 @@ static ssize_t mass_storage_read(unsigned long, endpoint_t, iovec_t *, /* Minix's libblockdriver callbacks */ static int mass_storage_open(devminor_t, int); static int mass_storage_close(devminor_t); -static ssize_t mass_storage_transfer(devminor_t, int, u64_t, endpoint_t, +static ssize_t mass_storage_transfer(devminor_t, int, uint64_t, endpoint_t, iovec_t *, unsigned int, int); static int mass_storage_ioctl(devminor_t, unsigned long, endpoint_t, cp_grant_id_t, endpoint_t); @@ -792,7 +792,7 @@ mass_storage_try_first_open() * mass_storage_transfer_restrictions * *===========================================================================*/ static int -mass_storage_transfer_restrictions(u64_t pos, unsigned long bytes) +mass_storage_transfer_restrictions(uint64_t pos, unsigned long bytes) { MASS_DEBUG_DUMP; @@ -1251,13 +1251,13 @@ static int mass_storage_close(devminor_t minor) static ssize_t mass_storage_transfer(devminor_t minor, /* device minor number */ int do_write, /* 1 write, 0 read */ - u64_t pos, /* position of starting point */ + uint64_t pos, /* position of starting point */ endpoint_t endpt, /* endpoint */ iovec_t * iov, /* vector */ unsigned int iov_count, /* how many vectors */ int UNUSED(flags)) /* transfer flags */ { - u64_t temp_sector_number; + uint64_t temp_sector_number; unsigned long bytes; unsigned long sector_number; unsigned int cur_iov_idx; diff --git a/minix/drivers/video/fb/fb.c b/minix/drivers/video/fb/fb.c index 946d3406c..013afcb93 100644 --- a/minix/drivers/video/fb/fb.c +++ b/minix/drivers/video/fb/fb.c @@ -25,9 +25,9 @@ */ static int fb_open(devminor_t minor, int access, endpoint_t user_endpt); static int fb_close(devminor_t minor); -static ssize_t fb_read(devminor_t minor, u64_t pos, endpoint_t ep, +static ssize_t fb_read(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid, size_t size, int flags, cdev_id_t id); -static ssize_t fb_write(devminor_t minor, u64_t pos, endpoint_t ep, +static ssize_t fb_write(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid, size_t size, int flags, cdev_id_t id); static int fb_ioctl(devminor_t minor, unsigned long request, endpoint_t ep, cp_grant_id_t gid, int flags, endpoint_t user_ep, cdev_id_t id); @@ -52,7 +52,7 @@ static struct chardriver fb_tab = /** Represents the /dev/fb device. */ static int has_restarted = 0; -static u64_t has_restarted_t1, has_restarted_t2; +static uint64_t has_restarted_t1, has_restarted_t2; static int open_counter[FB_DEV_NR]; /* Open count */ @@ -97,7 +97,7 @@ fb_close(devminor_t minor) } static ssize_t -fb_read(devminor_t minor, u64_t pos, endpoint_t ep, cp_grant_id_t gid, +fb_read(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { struct device dev; @@ -209,7 +209,7 @@ do_get_fixscreeninfo(int minor, endpoint_t ep, cp_grant_id_t gid) } static ssize_t -fb_write(devminor_t minor, u64_t pos, endpoint_t ep, cp_grant_id_t gid, +fb_write(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id)) { struct device dev; @@ -318,7 +318,7 @@ main(int argc, char *argv[]) static int keep_displaying_restarted() { - u64_t delta; + uint64_t delta; uint32_t micro_delta; read_frclock_64(&has_restarted_t2); diff --git a/minix/drivers/video/tda19988/tda19988.c b/minix/drivers/video/tda19988/tda19988.c index fdef73ad3..2145f2d95 100644 --- a/minix/drivers/video/tda19988/tda19988.c +++ b/minix/drivers/video/tda19988/tda19988.c @@ -160,7 +160,7 @@ static int read_edid(uint8_t * data, size_t count); /* libblockdriver callbacks */ static int tda19988_blk_open(devminor_t minor, int access); static int tda19988_blk_close(devminor_t minor); -static ssize_t tda19988_blk_transfer(devminor_t minor, int do_write, u64_t pos, +static ssize_t tda19988_blk_transfer(devminor_t minor, int do_write, uint64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags); static int tda19988_blk_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt); @@ -215,12 +215,12 @@ tda19988_blk_close(devminor_t minor) } static ssize_t -tda19988_blk_transfer(devminor_t minor, int do_write, u64_t pos64, +tda19988_blk_transfer(devminor_t minor, int do_write, uint64_t pos64, endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags) { unsigned count; struct device *dv; - u64_t dv_size; + uint64_t dv_size; int r; cp_grant_id_t grant; @@ -860,8 +860,8 @@ sef_cb_init(int type, sef_init_info_t * UNUSED(info)) lu_state_restore(); } - geom[TDA19988_DEV].dv_base = ((u64_t) (0)); - geom[TDA19988_DEV].dv_size = ((u64_t) (128)); + geom[TDA19988_DEV].dv_base = ((uint64_t) (0)); + geom[TDA19988_DEV].dv_size = ((uint64_t) (128)); /* * CEC Module diff --git a/minix/drivers/vmm_guest/vbox/hgcm.c b/minix/drivers/vmm_guest/vbox/hgcm.c index d98069195..d77b3af38 100644 --- a/minix/drivers/vmm_guest/vbox/hgcm.c +++ b/minix/drivers/vmm_guest/vbox/hgcm.c @@ -526,7 +526,7 @@ static int store_pages(int conn, int req, vbox_param_t *inp, size_t *offp) assert(!(pvec[j].vp_addr & (PAGE_SIZE - 1))); pagelist->addr[pagelist->count++] = - ((u64_t)(pvec[j].vp_addr)); + ((uint64_t)(pvec[j].vp_addr)); if (pvec[j].vp_size > PAGE_SIZE) { pvec[j].vp_addr += PAGE_SIZE; diff --git a/minix/drivers/vmm_guest/vbox/vmmdev.h b/minix/drivers/vmm_guest/vbox/vmmdev.h index e23b297ee..c3332e1d8 100644 --- a/minix/drivers/vmm_guest/vbox/vmmdev.h +++ b/minix/drivers/vmm_guest/vbox/vmmdev.h @@ -43,7 +43,7 @@ struct VMMDevReportGuestInfo { struct VMMDevReqHostTime { struct VMMDevRequestHeader header; - u64_t time; + uint64_t time; }; #define VMMDEV_EVENT_HGCM (1 << 1) @@ -84,7 +84,7 @@ struct VMMDevHGCMPageList { uint32_t flags; uint16_t offset; uint16_t count; - u64_t addr[1]; + uint64_t addr[1]; }; #define VMMDEV_HGCM_PARAM_U32 1 @@ -95,7 +95,7 @@ struct VMMDevHGCMParam { uint32_t type; union { uint32_t u32; - u64_t u64; + uint64_t u64; struct { uint32_t size; union { diff --git a/minix/fs/ext2/proto.h b/minix/fs/ext2/proto.h index 042d3da55..0fd6f963e 100644 --- a/minix/fs/ext2/proto.h +++ b/minix/fs/ext2/proto.h @@ -75,7 +75,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, off_t pos, int call); block_t rd_indir(struct buf *bp, int index); block_t read_map(struct inode *rip, off_t pos, int opportunistic); -struct buf *get_block_map(register struct inode *rip, u64_t position); +struct buf *get_block_map(register struct inode *rip, uint64_t position); ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, off_t *posp); diff --git a/minix/fs/ext2/read.c b/minix/fs/ext2/read.c index 26595c510..7ddb5be36 100644 --- a/minix/fs/ext2/read.c +++ b/minix/fs/ext2/read.c @@ -14,9 +14,9 @@ #include -static struct buf *rahead(struct inode *rip, block_t baseblock, u64_t +static struct buf *rahead(struct inode *rip, block_t baseblock, uint64_t position, unsigned bytes_ahead); -static int rw_chunk(struct inode *rip, u64_t position, unsigned off, +static int rw_chunk(struct inode *rip, uint64_t position, unsigned off, size_t chunk, unsigned left, int call, struct fsdriver_data *data, unsigned buf_off, unsigned int block_size, int *completed); @@ -69,7 +69,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes, } /* Read or write 'chunk' bytes. */ - r = rw_chunk(rip, ((u64_t)((unsigned long)position)), off, chunk, + r = rw_chunk(rip, ((uint64_t)((unsigned long)position)), off, chunk, nrbytes, call, data, cum_io, block_size, &completed); if (r != OK) break; @@ -106,7 +106,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes, static int rw_chunk(rip, position, off, chunk, left, call, data, buf_off, block_size, completed) register struct inode *rip; /* pointer to inode for file to be rd/wr */ -u64_t position; /* position within file to read or write */ +uint64_t position; /* position within file to read or write */ unsigned off; /* off within the current block */ size_t chunk; /* number of bytes to read or write */ unsigned left; /* max number of bytes wanted after position */ @@ -124,7 +124,7 @@ int *completed; /* number of bytes copied */ block_t b; dev_t dev; ino_t ino = VMC_NO_INODE; - u64_t ino_off = rounddown(position, block_size); + uint64_t ino_off = rounddown(position, block_size); *completed = 0; @@ -278,7 +278,7 @@ int opportunistic; return(b); } -struct buf *get_block_map(register struct inode *rip, u64_t position) +struct buf *get_block_map(register struct inode *rip, uint64_t position) { struct buf *bp; int r, block_size; @@ -315,7 +315,7 @@ int mindex; /* index into *bp */ static struct buf *rahead(rip, baseblock, position, bytes_ahead) register struct inode *rip; /* pointer to inode for file to be read */ block_t baseblock; /* block at current position */ -u64_t position; /* position within file */ +uint64_t position; /* position within file */ unsigned bytes_ahead; /* bytes beyond position for immediate use */ { /* Fetch a block from the cache or the device. If a physical read is @@ -334,7 +334,7 @@ unsigned bytes_ahead; /* bytes beyond position for immediate use */ dev_t dev; struct buf *bp = NULL; static block64_t read_q[LMFS_MAX_PREFETCH]; - u64_t position_running; + uint64_t position_running; dev = rip->i_dev; assert(dev != NO_DEV); diff --git a/minix/fs/ext2/super.c b/minix/fs/ext2/super.c index a6f183053..14bda759c 100644 --- a/minix/fs/ext2/super.c +++ b/minix/fs/ext2/super.c @@ -75,7 +75,7 @@ register struct super_block *sp; /* pointer to a superblock */ /* group descriptors, sp->s_group_desc points to this. */ static struct group_desc *group_descs; block_t gd_size; /* group descriptors table size in blocks */ - u64_t gdt_position; + uint64_t gdt_position; size_t off, chunk; ondisk_superblock = (struct super_block *)mmap(NULL, SUPER_SIZE_D, @@ -224,7 +224,7 @@ struct super_block *sp; /* pointer to a superblock */ /* Write a superblock and gdt. */ int r; block_t gd_size; /* group descriptors table size in blocks */ - u64_t gdt_position; + uint64_t gdt_position; size_t off, chunk; if (sp->s_rd_only) diff --git a/minix/fs/mfs/proto.h b/minix/fs/mfs/proto.h index d0598e897..963b9c7ec 100644 --- a/minix/fs/mfs/proto.h +++ b/minix/fs/mfs/proto.h @@ -71,7 +71,7 @@ int fs_chown(ino_t ino, uid_t uid, gid_t gid, mode_t *mode); ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, off_t pos, int call); block_t read_map(struct inode *rip, off_t pos, int opportunistic); -struct buf *get_block_map(register struct inode *rip, u64_t position); +struct buf *get_block_map(register struct inode *rip, uint64_t position); zone_t rd_indir(struct buf *bp, int index); ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, off_t *posp); diff --git a/minix/fs/mfs/read.c b/minix/fs/mfs/read.c index e4c0ed9ab..11a807540 100644 --- a/minix/fs/mfs/read.c +++ b/minix/fs/mfs/read.c @@ -10,9 +10,9 @@ #include -static struct buf *rahead(struct inode *rip, block_t baseblock, u64_t +static struct buf *rahead(struct inode *rip, block_t baseblock, uint64_t position, unsigned bytes_ahead); -static int rw_chunk(struct inode *rip, u64_t position, unsigned off, +static int rw_chunk(struct inode *rip, uint64_t position, unsigned off, size_t chunk, unsigned left, int call, struct fsdriver_data *data, unsigned buf_off, unsigned int block_size, int *completed); @@ -75,7 +75,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes, } /* Read or write 'chunk' bytes. */ - r = rw_chunk(rip, ((u64_t)((unsigned long)position)), off, chunk, + r = rw_chunk(rip, ((uint64_t)((unsigned long)position)), off, chunk, nrbytes, call, data, cum_io, block_size, &completed); if (r != OK) break; @@ -117,7 +117,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes, static int rw_chunk(rip, position, off, chunk, left, call, data, buf_off, block_size, completed) register struct inode *rip; /* pointer to inode for file to be rd/wr */ -u64_t position; /* position within file to read or write */ +uint64_t position; /* position within file to read or write */ unsigned off; /* off within the current block */ size_t chunk; /* number of bytes to read or write */ unsigned left; /* max number of bytes wanted after position */ @@ -134,7 +134,7 @@ int *completed; /* number of bytes copied */ block_t b; dev_t dev; ino_t ino = VMC_NO_INODE; - u64_t ino_off = rounddown(position, block_size); + uint64_t ino_off = rounddown(position, block_size); *completed = 0; @@ -278,7 +278,7 @@ int opportunistic; /* if nonzero, only use cache for metadata */ return(b); } -struct buf *get_block_map(register struct inode *rip, u64_t position) +struct buf *get_block_map(register struct inode *rip, uint64_t position) { struct buf *bp; int r, block_size; @@ -330,7 +330,7 @@ int index; /* index into *bp */ static struct buf *rahead(rip, baseblock, position, bytes_ahead) register struct inode *rip; /* pointer to inode for file to be read */ block_t baseblock; /* block at current position */ -u64_t position; /* position within file */ +uint64_t position; /* position within file */ unsigned bytes_ahead; /* bytes beyond position for immediate use */ { /* Fetch a block from the cache or the device. If a physical read is @@ -349,7 +349,7 @@ unsigned bytes_ahead; /* bytes beyond position for immediate use */ dev_t dev; struct buf *bp; static block64_t read_q[LMFS_MAX_PREFETCH]; - u64_t position_running; + uint64_t position_running; dev = rip->i_dev; assert(dev != NO_DEV); diff --git a/minix/include/arch/earm/include/multiboot.h b/minix/include/arch/earm/include/multiboot.h index 320006ba8..86a320a43 100644 --- a/minix/include/arch/earm/include/multiboot.h +++ b/minix/include/arch/earm/include/multiboot.h @@ -338,8 +338,8 @@ typedef struct multiboot_mod_list multiboot_module_t; struct multiboot_mmap_entry { uint32_t size; - u64_t mm_base_addr; - u64_t mm_length; + uint64_t mm_base_addr; + uint64_t mm_length; #define MULTIBOOT_MEMORY_AVAILABLE 1 #define MULTIBOOT_MEMORY_RESERVED 2 uint32_t type; diff --git a/minix/include/minix/bdev.h b/minix/include/minix/bdev.h index 7446e5509..79bf36fa9 100644 --- a/minix/include/minix/bdev.h +++ b/minix/include/minix/bdev.h @@ -8,13 +8,13 @@ extern void bdev_driver(dev_t dev, char *label); extern int bdev_open(dev_t dev, int access); extern int bdev_close(dev_t dev); -extern ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count, +extern ssize_t bdev_read(dev_t dev, uint64_t pos, char *buf, size_t count, int flags); -extern ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count, +extern ssize_t bdev_write(dev_t dev, uint64_t pos, char *buf, size_t count, int flags); -extern ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, +extern ssize_t bdev_gather(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags); -extern ssize_t bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count, +extern ssize_t bdev_scatter(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags); extern int bdev_ioctl(dev_t dev, unsigned long request, void *buf, endpoint_t user_endpt); @@ -28,13 +28,13 @@ typedef void (*bdev_callback_t)(dev_t dev, bdev_id_t id, bdev_param_t param, extern void bdev_flush_asyn(dev_t dev); -extern bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count, +extern bdev_id_t bdev_read_asyn(dev_t dev, uint64_t pos, char *buf, size_t count, int flags, bdev_callback_t callback, bdev_param_t param); -extern bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count, +extern bdev_id_t bdev_write_asyn(dev_t dev, uint64_t pos, char *buf, size_t count, int flags, bdev_callback_t callback, bdev_param_t param); -extern bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec, +extern bdev_id_t bdev_gather_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, bdev_callback_t callback, bdev_param_t param); -extern bdev_id_t bdev_scatter_asyn(dev_t dev, u64_t pos, iovec_t *vec, +extern bdev_id_t bdev_scatter_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, bdev_callback_t callback, bdev_param_t param); extern bdev_id_t bdev_ioctl_asyn(dev_t dev, unsigned long request, void *buf, endpoint_t user_endpt, bdev_callback_t callback, bdev_param_t param); diff --git a/minix/include/minix/blockdriver.h b/minix/include/minix/blockdriver.h index d7e1e7d89..64ba51153 100644 --- a/minix/include/minix/blockdriver.h +++ b/minix/include/minix/blockdriver.h @@ -17,7 +17,7 @@ struct blockdriver { blockdriver_type_t bdr_type; int (*bdr_open)(devminor_t minor, int access); int (*bdr_close)(devminor_t minor); - ssize_t (*bdr_transfer)(devminor_t minor, int do_write, u64_t pos, + ssize_t (*bdr_transfer)(devminor_t minor, int do_write, uint64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count, int flags); int (*bdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt); diff --git a/minix/include/minix/btrace.h b/minix/include/minix/btrace.h index d20445c7e..ef5427b97 100644 --- a/minix/include/minix/btrace.h +++ b/minix/include/minix/btrace.h @@ -25,7 +25,7 @@ enum { typedef struct { uint32_t request; /* request code; one of BTR_xxx */ uint32_t size; /* request size, ioctl request, or access */ - u64_t position; /* starting disk position */ + uint64_t position; /* starting disk position */ uint32_t flags; /* transfer flags */ i32_t result; /* request result; OK, bytes, or error */ uint32_t start_time; /* request service start time (us) */ diff --git a/minix/include/minix/chardriver.h b/minix/include/minix/chardriver.h index a6ac1dff6..162f27628 100644 --- a/minix/include/minix/chardriver.h +++ b/minix/include/minix/chardriver.h @@ -9,9 +9,9 @@ typedef unsigned int cdev_id_t; struct chardriver { int (*cdr_open)(devminor_t minor, int access, endpoint_t user_endpt); int (*cdr_close)(devminor_t minor); - ssize_t (*cdr_read)(devminor_t minor, u64_t position, endpoint_t endpt, + ssize_t (*cdr_read)(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); - ssize_t (*cdr_write)(devminor_t minor, u64_t position, endpoint_t endpt, + ssize_t (*cdr_write)(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); int (*cdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id); diff --git a/minix/include/minix/driver.h b/minix/include/minix/driver.h index 2995fef45..10bdaa028 100644 --- a/minix/include/minix/driver.h +++ b/minix/include/minix/driver.h @@ -28,8 +28,8 @@ /* Base and size of a partition in bytes. */ struct device { - u64_t dv_base; - u64_t dv_size; + uint64_t dv_base; + uint64_t dv_size; }; /* Generic receive function for all drivers. */ diff --git a/minix/include/minix/ipc.h b/minix/include/minix/ipc.h index 8cb5de0f4..0b68abbcc 100644 --- a/minix/include/minix/ipc.h +++ b/minix/include/minix/ipc.h @@ -83,7 +83,7 @@ typedef struct { _ASSERT_MSG_SIZE(mess_9); typedef struct { - u64_t m10ull1; + uint64_t m10ull1; int m10i1, m10i2, m10i3, m10i4; long m10l1, m10l2, m10l3; uint8_t padding[20]; @@ -1712,8 +1712,8 @@ typedef struct { _ASSERT_MSG_SIZE(mess_netdrv_net_dl_task); typedef struct { - u64_t timestamp; /* valid for every notify msg */ - u64_t interrupts; /* raised interrupts; valid if from HARDWARE */ + uint64_t timestamp; /* valid for every notify msg */ + uint64_t interrupts; /* raised interrupts; valid if from HARDWARE */ sigset_t sigset; /* raised signals; valid if from SYSTEM */ uint8_t padding[24]; } mess_notify; diff --git a/minix/include/minix/libminixfs.h b/minix/include/minix/libminixfs.h index 617ca3294..e9e5e12f0 100644 --- a/minix/include/minix/libminixfs.h +++ b/minix/include/minix/libminixfs.h @@ -27,7 +27,7 @@ struct buf { * If none, VMC_NO_INODE */ ino_t lmfs_inode; - u64_t lmfs_inode_offset; + uint64_t lmfs_inode_offset; }; void lmfs_markdirty(struct buf *bp); @@ -41,10 +41,10 @@ void lmfs_set_blocksize(size_t blocksize); void lmfs_buf_pool(int new_nr_bufs); int lmfs_get_block(struct buf **bpp, dev_t dev, block64_t block, int how); int lmfs_get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how, - ino_t ino, u64_t off); + ino_t ino, uint64_t off); void lmfs_put_block(struct buf *bp); void lmfs_free_block(dev_t dev, block64_t block); -void lmfs_zero_block_ino(dev_t dev, ino_t ino, u64_t off); +void lmfs_zero_block_ino(dev_t dev, ino_t ino, uint64_t off); void lmfs_invalidate(dev_t device); void lmfs_prefetch(dev_t dev, const block64_t *blockset, unsigned int nblocks); void lmfs_setquiet(int q); diff --git a/minix/include/minix/minlib.h b/minix/include/minix/minlib.h index 28bd3dac2..b7c45b03e 100644 --- a/minix/include/minix/minlib.h +++ b/minix/include/minix/minlib.h @@ -21,7 +21,7 @@ const char *servxfile(const char *file); /* read_tsc() and friends */ void read_tsc(uint32_t *hi, uint32_t *lo); -void read_tsc_64(u64_t *t); +void read_tsc_64(uint64_t *t); /* return values for fsversion */ #define FSVERSION_MFS1 0x00001 diff --git a/minix/include/minix/partition.h b/minix/include/minix/partition.h index 2e9b431d0..370156522 100644 --- a/minix/include/minix/partition.h +++ b/minix/include/minix/partition.h @@ -10,11 +10,11 @@ #include -int minix_sizeup(char *name, u64_t *bytes); +int minix_sizeup(char *name, uint64_t *bytes); struct part_geom { - u64_t base; /* byte offset to the partition start */ - u64_t size; /* number of bytes in the partition */ + uint64_t base; /* byte offset to the partition start */ + uint64_t size; /* number of bytes in the partition */ unsigned cylinders; /* disk geometry */ unsigned heads; unsigned sectors; diff --git a/minix/include/minix/sffs.h b/minix/include/minix/sffs.h index 83ef08498..5e4c2f181 100644 --- a/minix/include/minix/sffs.h +++ b/minix/include/minix/sffs.h @@ -13,7 +13,7 @@ typedef void *sffs_dir_t; /* handle to directory search */ struct sffs_attr { uint32_t a_mask; /* which fields to retrieve/set */ mode_t a_mode; /* file type and permissions */ - u64_t a_size; /* file size */ + uint64_t a_size; /* file size */ struct timespec a_crtime; /* file creation time */ struct timespec a_atime; /* file access time */ struct timespec a_mtime; /* file modification time */ @@ -29,8 +29,8 @@ struct sffs_attr { struct sffs_table { int (*t_open)(const char *path, int flags, int mode, sffs_file_t *handle); - ssize_t (*t_read)(sffs_file_t handle, char *buf, size_t size, u64_t pos); - ssize_t (*t_write)(sffs_file_t handle, char *buf, size_t size, u64_t pos); + ssize_t (*t_read)(sffs_file_t handle, char *buf, size_t size, uint64_t pos); + ssize_t (*t_write)(sffs_file_t handle, char *buf, size_t size, uint64_t pos); int (*t_close)(sffs_file_t handle); size_t (*t_readbuf)(char **ptr); @@ -49,7 +49,7 @@ struct sffs_table { int (*t_rmdir)(const char *path); int (*t_rename)(const char *opath, const char *npath); - int (*t_queryvol)(const char *path, u64_t *free, u64_t *total); + int (*t_queryvol)(const char *path, uint64_t *free, uint64_t *total); }; struct sffs_params { diff --git a/minix/include/minix/spin.h b/minix/include/minix/spin.h index 80c172dcc..5c6fc6506 100644 --- a/minix/include/minix/spin.h +++ b/minix/include/minix/spin.h @@ -6,7 +6,7 @@ typedef struct { int s_state; uint32_t s_usecs; - u64_t s_base_tsc; + uint64_t s_base_tsc; clock_t s_base_uptime; int s_timeout; } spin_t; diff --git a/minix/include/minix/sysutil.h b/minix/include/minix/sysutil.h index 4d2db0008..966d75be5 100644 --- a/minix/include/minix/sysutil.h +++ b/minix/include/minix/sysutil.h @@ -61,7 +61,7 @@ uint32_t sys_hz(void); double getidle(void); void util_stacktrace(void); int micro_delay(uint32_t micros); -uint32_t tsc_64_to_micros(u64_t tsc); +uint32_t tsc_64_to_micros(uint64_t tsc); uint32_t tsc_to_micros(uint32_t low, uint32_t high); uint32_t tsc_get_khz(void); uint32_t micros_to_ticks(uint32_t micros); @@ -70,9 +70,9 @@ time_t clock_time(struct timespec *tv); void read_frclock(uint32_t *frclk); uint32_t delta_frclock(uint32_t base, uint32_t cur); #endif -void read_frclock_64(u64_t *frclk); -u64_t delta_frclock_64(u64_t base, u64_t cur); -uint32_t frclock_64_to_micros(u64_t tsc); +void read_frclock_64(uint64_t *frclk); +uint64_t delta_frclock_64(uint64_t base, uint64_t cur); +uint32_t frclock_64_to_micros(uint64_t tsc); void ser_putc(char c); void get_randomness(struct k_randomness *, int); uint32_t sqrt_approx(uint32_t); diff --git a/minix/include/minix/timers.h b/minix/include/minix/timers.h index 9c8ab8520..4109a00e7 100644 --- a/minix/include/minix/timers.h +++ b/minix/include/minix/timers.h @@ -88,9 +88,9 @@ int tmrs_exptimers(minix_timer_t **tmrs, clock_t now, clock_t *new_head); } #define TIME_BLOCK_VAR(timed_code_block, time_interval) do { \ - static u64_t _cum_spenttime, _cum_starttime; \ + static uint64_t _cum_spenttime, _cum_starttime; \ static int _cum_instances; \ - u64_t _next_cum_spent, _starttime, _endtime, _dt, _cum_dt; \ + uint64_t _next_cum_spent, _starttime, _endtime, _dt, _cum_dt; \ uint32_t _dt_micros; \ read_tsc_64(&_starttime); \ do { timed_code_block } while(0); \ diff --git a/minix/include/minix/type.h b/minix/include/minix/type.h index b9b70f2cd..01c9455e5 100644 --- a/minix/include/minix/type.h +++ b/minix/include/minix/type.h @@ -195,7 +195,7 @@ struct k_randomness { /* ARM free-running timer information. */ struct arm_frclock { - u64_t hz; /* tcrr frequency */ + uint64_t hz; /* tcrr frequency */ uint32_t tcrr; /* tcrr address */ }; diff --git a/minix/include/minix/u64.h b/minix/include/minix/u64.h index 6cc8bed6a..6c723321f 100644 --- a/minix/include/minix/u64.h +++ b/minix/include/minix/u64.h @@ -7,19 +7,19 @@ #include -static inline unsigned long ex64lo(u64_t i) +static inline unsigned long ex64lo(uint64_t i) { return (unsigned long)i; } -static inline unsigned long ex64hi(u64_t i) +static inline unsigned long ex64hi(uint64_t i) { return (unsigned long)(i>>32); } -static inline u64_t make64(unsigned long lo, unsigned long hi) +static inline uint64_t make64(unsigned long lo, unsigned long hi) { - return ((u64_t)hi << 32) | (u64_t)lo; + return ((uint64_t)hi << 32) | (uint64_t)lo; } #endif /* _MINIX__U64_H */ diff --git a/minix/include/minix/vbox.h b/minix/include/minix/vbox.h index 721b220c7..ae720856c 100644 --- a/minix/include/minix/vbox.h +++ b/minix/include/minix/vbox.h @@ -13,14 +13,14 @@ extern int vbox_call(vbox_conn_t conn, uint32_t function, vbox_param_t *param, int count, int *code); extern void vbox_set_u32(vbox_param_t *param, uint32_t value); -extern void vbox_set_u64(vbox_param_t *param, u64_t value); +extern void vbox_set_u64(vbox_param_t *param, uint64_t value); extern void vbox_set_ptr(vbox_param_t *param, void *ptr, size_t size, unsigned int dir); extern void vbox_set_grant(vbox_param_t *param, endpoint_t endpt, cp_grant_id_t grant, size_t off, size_t size, unsigned int dir); extern uint32_t vbox_get_u32(vbox_param_t *param); -extern u64_t vbox_get_u64(vbox_param_t *param); +extern uint64_t vbox_get_u64(vbox_param_t *param); extern void vbox_put(vbox_param_t *param, int count); diff --git a/minix/include/minix/vboxtype.h b/minix/include/minix/vboxtype.h index f5cf9c1cb..31aa1de68 100644 --- a/minix/include/minix/vboxtype.h +++ b/minix/include/minix/vboxtype.h @@ -23,7 +23,7 @@ typedef struct { vbox_type_t type; union { uint32_t u32; - u64_t u64; + uint64_t u64; struct { cp_grant_id_t grant; size_t off; diff --git a/minix/include/sys/ioc_fbd.h b/minix/include/sys/ioc_fbd.h index aca51d421..12d773f90 100644 --- a/minix/include/sys/ioc_fbd.h +++ b/minix/include/sys/ioc_fbd.h @@ -11,8 +11,8 @@ typedef int fbd_rulenum_t; struct fbd_rule { fbd_rulenum_t num; /* rule number (1-based) */ - u64_t start; /* start position of area to match */ - u64_t end; /* end position (exclusive) (0 = up to EOF) */ + uint64_t start; /* start position of area to match */ + uint64_t end; /* end position (exclusive) (0 = up to EOF) */ int flags; /* match read and/or write requests */ unsigned int skip; /* # matches to skip before activating */ unsigned int count; /* # times left to trigger (0 = no limit) */ @@ -28,8 +28,8 @@ struct fbd_rule { } error; struct { - u64_t start; /* start position of target area */ - u64_t end; /* end position of area (excl) */ + uint64_t start; /* start position of target area */ + uint64_t end; /* end position of area (excl) */ uint32_t align; /* alignment to use in target area */ } misdir; diff --git a/minix/kernel/arch/earm/arch_clock.c b/minix/kernel/arch/earm/arch_clock.c index ead7b6725..83944a08e 100644 --- a/minix/kernel/arch/earm/arch_clock.c +++ b/minix/kernel/arch/earm/arch_clock.c @@ -70,8 +70,8 @@ void cycles_accounting_init(void) void context_stop(struct proc * p) { - u64_t tsc, tsc_delta; - u64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch); + uint64_t tsc, tsc_delta; + uint64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch); unsigned int cpu, tpt, counter; #ifdef CONFIG_SMP @@ -184,27 +184,27 @@ int register_local_timer_handler(const irq_handler_t handler) return bsp_register_timer_handler(handler); } -u64_t ms_2_cpu_time(unsigned ms) +uint64_t ms_2_cpu_time(unsigned ms) { - return (u64_t)tsc_per_ms[cpuid] * ms; + return (uint64_t)tsc_per_ms[cpuid] * ms; } -unsigned cpu_time_2_ms(u64_t cpu_time) +unsigned cpu_time_2_ms(uint64_t cpu_time) { return (unsigned long)(cpu_time / tsc_per_ms[cpuid]); } short cpu_load(void) { - u64_t current_tsc, *current_idle; - u64_t tsc_delta, idle_delta, busy; + uint64_t current_tsc, *current_idle; + uint64_t tsc_delta, idle_delta, busy; struct proc *idle; short load; #ifdef CONFIG_SMP unsigned cpu = cpuid; #endif - u64_t *last_tsc, *last_idle; + uint64_t *last_tsc, *last_idle; last_tsc = get_cpu_var_ptr(cpu, cpu_last_tsc); last_idle = get_cpu_var_ptr(cpu, cpu_last_idle); diff --git a/minix/kernel/arch/earm/bsp/ti/omap_timer.c b/minix/kernel/arch/earm/bsp/ti/omap_timer.c index c96a67044..7eb1d354d 100644 --- a/minix/kernel/arch/earm/bsp/ti/omap_timer.c +++ b/minix/kernel/arch/earm/bsp/ti/omap_timer.c @@ -16,7 +16,7 @@ /* interrupt handler hook */ static irq_hook_t omap3_timer_hook; -static u64_t high_frc; +static uint64_t high_frc; struct omap_timer_registers; @@ -387,10 +387,10 @@ bsp_timer_int_handler(void) /* Use the free running clock as TSC */ void -read_tsc_64(u64_t * t) +read_tsc_64(uint64_t * t) { uint32_t now; now = read_frc(); frc_overflow_check(now); - *t = (u64_t) now + (high_frc << 32); + *t = (uint64_t) now + (high_frc << 32); } diff --git a/minix/kernel/arch/earm/include/arch_proto.h b/minix/kernel/arch/earm/include/arch_proto.h index 1fe3fce64..344c5ae6f 100644 --- a/minix/kernel/arch/earm/include/arch_proto.h +++ b/minix/kernel/arch/earm/include/arch_proto.h @@ -33,7 +33,7 @@ struct tss_s { } __attribute__((packed)); int tss_init(unsigned cpu, void * kernel_stack); -void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len); +void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len); phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len); void vm_enable_paging(void); void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end); diff --git a/minix/kernel/arch/earm/pg_utils.c b/minix/kernel/arch/earm/pg_utils.c index 872735c15..ad076f958 100644 --- a/minix/kernel/arch/earm/pg_utils.c +++ b/minix/kernel/arch/earm/pg_utils.c @@ -65,7 +65,7 @@ void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end) } } -void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len) +void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len) { int m; #define LIMIT 0xFFFFF000 diff --git a/minix/kernel/arch/i386/acpi.h b/minix/kernel/arch/i386/acpi.h index fb25c99d4..898261a35 100644 --- a/minix/kernel/arch/i386/acpi.h +++ b/minix/kernel/arch/i386/acpi.h @@ -35,7 +35,7 @@ struct acpi_generic_address { uint8_t register_bit_width; uint8_t register_bit_offset; uint8_t access_size; - u64_t address; + uint64_t address; }; struct acpi_fadt_header @@ -82,8 +82,8 @@ struct acpi_fadt_header struct acpi_generic_address reset_reg; uint8_t reset_value; uint8_t reserved2[3]; - u64_t xfacs; - u64_t xdsdt; + uint64_t xfacs; + uint64_t xdsdt; struct acpi_generic_address xpm1a_evt_blk; struct acpi_generic_address xpm1b_evt_blk; struct acpi_generic_address xpm1a_cnt_blk; diff --git a/minix/kernel/arch/i386/apic.c b/minix/kernel/arch/i386/apic.c index 7a4c6ac03..abf33447b 100644 --- a/minix/kernel/arch/i386/apic.c +++ b/minix/kernel/arch/i386/apic.c @@ -148,7 +148,7 @@ vir_bytes lapic_eoi_addr; int bsp_lapic_id; static volatile unsigned probe_ticks; -static u64_t tsc0, tsc1; +static uint64_t tsc0, tsc1; static uint32_t lapic_tctr0, lapic_tctr1; static unsigned apic_imcrp; @@ -410,7 +410,7 @@ unsigned int apicid(void) static int calib_clk_handler(irq_hook_t * UNUSED(hook)) { uint32_t tcrt; - u64_t tsc; + uint64_t tsc; probe_ticks++; read_tsc_64(&tsc); @@ -443,8 +443,8 @@ static int spurious_irq_handler(irq_hook_t * UNUSED(hook)) static void apic_calibrate_clocks(unsigned cpu) { uint32_t lvtt, val, lapic_delta; - u64_t tsc_delta; - u64_t cpu_freq; + uint64_t tsc_delta; + uint64_t cpu_freq; irq_hook_t calib_clk, spurious_irq; diff --git a/minix/kernel/arch/i386/arch_clock.c b/minix/kernel/arch/i386/arch_clock.c index 8573e42f7..0caeede76 100644 --- a/minix/kernel/arch/i386/arch_clock.c +++ b/minix/kernel/arch/i386/arch_clock.c @@ -35,7 +35,7 @@ static irq_hook_t pic_timer_hook; /* interrupt handler hook */ static unsigned probe_ticks; -static u64_t tsc0, tsc1; +static uint64_t tsc0, tsc1; #define PROBE_TICKS (system_hz / 10) static unsigned tsc_per_ms[CONFIG_MAX_CPUS]; @@ -75,7 +75,7 @@ void arch_timer_int_handler(void) static int calib_cpu_handler(irq_hook_t * UNUSED(hook)) { - u64_t tsc; + uint64_t tsc; probe_ticks++; read_tsc_64(&tsc); @@ -95,8 +95,8 @@ static int calib_cpu_handler(irq_hook_t * UNUSED(hook)) static void estimate_cpu_freq(void) { - u64_t tsc_delta; - u64_t cpu_freq; + uint64_t tsc_delta; + uint64_t cpu_freq; irq_hook_t calib_cpu; @@ -207,8 +207,8 @@ void cycles_accounting_init(void) void context_stop(struct proc * p) { - u64_t tsc, tsc_delta; - u64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch); + uint64_t tsc, tsc_delta; + uint64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch); unsigned int cpu, tpt, counter; #ifdef CONFIG_SMP int must_bkl_unlock = 0; @@ -224,7 +224,7 @@ void context_stop(struct proc * p) * for IDLE we must not hold the lock */ if (p == proc_addr(KERNEL)) { - u64_t tmp; + uint64_t tmp; read_tsc_64(&tsc); tmp = tsc - *__tsc_ctr_switch; @@ -232,7 +232,7 @@ void context_stop(struct proc * p) p->p_cycles = p->p_cycles + tmp; must_bkl_unlock = 1; } else { - u64_t bkl_tsc; + uint64_t bkl_tsc; atomic_t succ; read_tsc_64(&bkl_tsc); @@ -368,27 +368,27 @@ void context_stop_idle(void) #endif } -u64_t ms_2_cpu_time(unsigned ms) +uint64_t ms_2_cpu_time(unsigned ms) { - return (u64_t)tsc_per_ms[cpuid] * ms; + return (uint64_t)tsc_per_ms[cpuid] * ms; } -unsigned cpu_time_2_ms(u64_t cpu_time) +unsigned cpu_time_2_ms(uint64_t cpu_time) { return (unsigned long)(cpu_time / tsc_per_ms[cpuid]); } short cpu_load(void) { - u64_t current_tsc, *current_idle; - u64_t tsc_delta, idle_delta, busy; + uint64_t current_tsc, *current_idle; + uint64_t tsc_delta, idle_delta, busy; struct proc *idle; short load; #ifdef CONFIG_SMP unsigned cpu = cpuid; #endif - u64_t *last_tsc, *last_idle; + uint64_t *last_tsc, *last_idle; last_tsc = get_cpu_var_ptr(cpu, cpu_last_tsc); last_idle = get_cpu_var_ptr(cpu, cpu_last_idle); @@ -418,7 +418,7 @@ short cpu_load(void) void busy_delay_ms(int ms) { - u64_t cycles = ms_2_cpu_time(ms), tsc0, tsc, tsc1; + uint64_t cycles = ms_2_cpu_time(ms), tsc0, tsc, tsc1; read_tsc_64(&tsc0); tsc1 = tsc0 + cycles; do { read_tsc_64(&tsc); } while(tsc < tsc1); diff --git a/minix/kernel/arch/i386/arch_watchdog.c b/minix/kernel/arch/i386/arch_watchdog.c index efd869d2d..9abad461c 100644 --- a/minix/kernel/arch/i386/arch_watchdog.c +++ b/minix/kernel/arch/i386/arch_watchdog.c @@ -16,7 +16,7 @@ static struct arch_watchdog amd_watchdog; static void intel_arch_watchdog_init(const unsigned cpu) { - u64_t cpuf; + uint64_t cpuf; uint32_t val; ia32_msr_write(INTEL_MSR_PERFMON_CRT0, 0, 0); @@ -153,7 +153,7 @@ int i386_watchdog_start(void) static int intel_arch_watchdog_profile_init(const unsigned freq) { - u64_t cpuf; + uint64_t cpuf; /* FIXME works only if all CPUs have the same freq */ cpuf = cpu_get_freq(cpuid); @@ -186,7 +186,7 @@ static struct arch_watchdog intel_arch_watchdog = { static void amd_watchdog_init(const unsigned cpu) { - u64_t cpuf; + uint64_t cpuf; uint32_t val; ia32_msr_write(AMD_MSR_EVENT_CTR0, 0, 0); @@ -217,7 +217,7 @@ static void amd_watchdog_reinit(const unsigned cpu) static int amd_watchdog_profile_init(const unsigned freq) { - u64_t cpuf; + uint64_t cpuf; /* FIXME works only if all CPUs have the same freq */ cpuf = cpu_get_freq(cpuid); diff --git a/minix/kernel/arch/i386/include/arch_proto.h b/minix/kernel/arch/i386/include/arch_proto.h index 069b850cf..57d14c380 100644 --- a/minix/kernel/arch/i386/include/arch_proto.h +++ b/minix/kernel/arch/i386/include/arch_proto.h @@ -200,7 +200,7 @@ uint32_t read_cs(void); uint32_t read_ds(void); uint32_t read_ss(void); -void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len); +void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len); phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len); void vm_enable_paging(void); void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end); diff --git a/minix/kernel/arch/i386/pg_utils.c b/minix/kernel/arch/i386/pg_utils.c index b7654aa66..b671522da 100644 --- a/minix/kernel/arch/i386/pg_utils.c +++ b/minix/kernel/arch/i386/pg_utils.c @@ -83,7 +83,7 @@ phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len) return lowest; } -void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len) +void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len) { int m; #define LIMIT 0xFFFFF000 diff --git a/minix/kernel/clock.h b/minix/kernel/clock.h index 871504cac..7fcde909b 100644 --- a/minix/kernel/clock.h +++ b/minix/kernel/clock.h @@ -16,7 +16,7 @@ void stop_local_timer(void); void restart_local_timer(void); int register_local_timer_handler(irq_handler_t handler); -u64_t ms_2_cpu_time(unsigned ms); -unsigned cpu_time_2_ms(u64_t cpu_time); +uint64_t ms_2_cpu_time(unsigned ms); +unsigned cpu_time_2_ms(uint64_t cpu_time); #endif /* __CLOCK_H__ */ diff --git a/minix/kernel/cpulocals.h b/minix/kernel/cpulocals.h index 588196e5e..9bb522a2d 100644 --- a/minix/kernel/cpulocals.h +++ b/minix/kernel/cpulocals.h @@ -62,11 +62,11 @@ extern struct __cpu_local_vars { int idle_interrupted; /* to interrupt busy-idle while profiling */ - u64_t tsc_ctr_switch; /* when did we switched time accounting */ + uint64_t tsc_ctr_switch; /* when did we switched time accounting */ /* last values read from cpu when sending ooq msg to scheduler */ - u64_t cpu_last_tsc; - u64_t cpu_last_idle; + uint64_t cpu_last_tsc; + uint64_t cpu_last_idle; char fpu_presence; /* whether the cpu has FPU or not */ diff --git a/minix/kernel/glo.h b/minix/kernel/glo.h index 938105d79..4905b0f2d 100644 --- a/minix/kernel/glo.h +++ b/minix/kernel/glo.h @@ -61,7 +61,7 @@ EXTERN int config_no_apic; /* optionally turn off apic */ EXTERN int config_apic_timer_x; /* apic timer slowdown factor */ #endif -EXTERN u64_t cpu_hz[CONFIG_MAX_CPUS]; +EXTERN uint64_t cpu_hz[CONFIG_MAX_CPUS]; #define cpu_set_freq(cpu, freq) do {cpu_hz[cpu] = freq;} while (0) #define cpu_get_freq(cpu) cpu_hz[cpu] @@ -83,8 +83,8 @@ EXTERN volatile int serial_debug_active; EXTERN struct cpu_info cpu_info[CONFIG_MAX_CPUS]; /* BKL stats */ -EXTERN u64_t kernel_ticks[CONFIG_MAX_CPUS]; -EXTERN u64_t bkl_ticks[CONFIG_MAX_CPUS]; +EXTERN uint64_t kernel_ticks[CONFIG_MAX_CPUS]; +EXTERN uint64_t bkl_ticks[CONFIG_MAX_CPUS]; EXTERN unsigned bkl_tries[CONFIG_MAX_CPUS]; EXTERN unsigned bkl_succ[CONFIG_MAX_CPUS]; diff --git a/minix/kernel/main.c b/minix/kernel/main.c index 3198aba73..4481517f1 100644 --- a/minix/kernel/main.c +++ b/minix/kernel/main.c @@ -509,7 +509,7 @@ char *env_get(const char *name) void cpu_print_freq(unsigned cpu) { - u64_t freq; + uint64_t freq; freq = cpu_get_freq(cpu); DEBUGBASIC(("CPU %d freq %lu MHz\n", cpu, (unsigned long)(freq / 1000000))); diff --git a/minix/kernel/proc.c b/minix/kernel/proc.c index da74c409b..0073aaef6 100644 --- a/minix/kernel/proc.c +++ b/minix/kernel/proc.c @@ -1726,7 +1726,7 @@ void dequeue(struct proc *rp) int q = rp->p_priority; /* queue to use */ struct proc **xpp; /* iterate over queue */ struct proc *prev_xp; - u64_t tsc, tsc_delta; + uint64_t tsc, tsc_delta; struct proc **rdy_tail; diff --git a/minix/kernel/proc.h b/minix/kernel/proc.h index a5f1f51e5..ba8c826ea 100644 --- a/minix/kernel/proc.h +++ b/minix/kernel/proc.h @@ -28,7 +28,7 @@ struct proc { volatile uint32_t p_misc_flags; /* flags that do not suspend the process */ char p_priority; /* current process priority */ - u64_t p_cpu_time_left; /* time left to use the cpu */ + uint64_t p_cpu_time_left; /* time left to use the cpu */ unsigned p_quantum_size_ms; /* assigned time quantum in ms FIXME remove this */ struct proc *p_scheduler; /* who should get out of quantum msg */ @@ -46,8 +46,8 @@ struct proc { /* Accounting statistics that get passed to the process' scheduler */ struct { - u64_t enter_queue; /* time when enqueued (cycles) */ - u64_t time_in_queue; /* time spent in queue */ + uint64_t enter_queue; /* time when enqueued (cycles) */ + uint64_t time_in_queue; /* time spent in queue */ unsigned long dequeues; unsigned long ipc_sync; unsigned long ipc_async; @@ -62,11 +62,11 @@ struct proc { clock_t p_virt_left; /* number of ticks left on virtual timer */ clock_t p_prof_left; /* number of ticks left on profile timer */ - u64_t p_cycles; /* how many cycles did the process use */ - u64_t p_kcall_cycles; /* kernel cycles caused by this proc (kcall) */ - u64_t p_kipc_cycles; /* cycles caused by this proc (ipc) */ + uint64_t p_cycles; /* how many cycles did the process use */ + uint64_t p_kcall_cycles; /* kernel cycles caused by this proc (kcall) */ + uint64_t p_kipc_cycles; /* cycles caused by this proc (ipc) */ - u64_t p_tick_cycles; /* cycles accumulated for up to a clock tick */ + uint64_t p_tick_cycles; /* cycles accumulated for up to a clock tick */ struct cpuavg p_cpuavg; /* running CPU average, for ps(1) */ struct proc *p_nextready; /* pointer to next ready process */ diff --git a/minix/kernel/watchdog.h b/minix/kernel/watchdog.h index 24041450b..9a85455c6 100644 --- a/minix/kernel/watchdog.h +++ b/minix/kernel/watchdog.h @@ -20,9 +20,9 @@ struct arch_watchdog { arch_watchdog_method_t init; /* initial setup */ arch_watchdog_method_t reinit; /* reinit after a tick */ arch_watchdog_profile_init_t profile_init; - u64_t resetval; - u64_t watchdog_resetval; - u64_t profile_resetval; + uint64_t resetval; + uint64_t watchdog_resetval; + uint64_t profile_resetval; }; extern struct arch_watchdog *watchdog; diff --git a/minix/lib/libaudiodriver/audio_fw.c b/minix/lib/libaudiodriver/audio_fw.c index bebf8e5d7..15c1e1d49 100644 --- a/minix/lib/libaudiodriver/audio_fw.c +++ b/minix/lib/libaudiodriver/audio_fw.c @@ -30,9 +30,9 @@ static int msg_open(devminor_t minor_dev_nr, int access, endpoint_t user_endpt); static int msg_close(int minor_dev_nr); -static ssize_t msg_read(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t msg_read(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); -static ssize_t msg_write(devminor_t minor, u64_t position, endpoint_t endpt, +static ssize_t msg_write(devminor_t minor, uint64_t position, endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id); static int msg_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id); @@ -391,7 +391,7 @@ static int msg_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt, } -static ssize_t msg_write(devminor_t minor, u64_t UNUSED(position), +static ssize_t msg_write(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t id) { @@ -441,7 +441,7 @@ static ssize_t msg_write(devminor_t minor, u64_t UNUSED(position), } -static ssize_t msg_read(devminor_t minor, u64_t UNUSED(position), +static ssize_t msg_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t id) { diff --git a/minix/lib/libbdev/bdev.c b/minix/lib/libbdev/bdev.c index 36413efbe..bdffd0543 100644 --- a/minix/lib/libbdev/bdev.c +++ b/minix/lib/libbdev/bdev.c @@ -109,7 +109,7 @@ int bdev_close(dev_t dev) return r; } -static int bdev_rdwt_setup(int req, dev_t dev, u64_t pos, char *buf, +static int bdev_rdwt_setup(int req, dev_t dev, uint64_t pos, char *buf, size_t count, int flags, message *m) { /* Set up a single-buffer read/write request. @@ -151,7 +151,7 @@ static void bdev_rdwt_cleanup(const message *m) cpf_revoke(m->m_lbdev_lblockdriver_msg.grant); } -static ssize_t bdev_rdwt(int req, dev_t dev, u64_t pos, char *buf, +static ssize_t bdev_rdwt(int req, dev_t dev, uint64_t pos, char *buf, size_t count, int flags) { /* Perform a synchronous read or write call using a single buffer. @@ -171,7 +171,7 @@ static ssize_t bdev_rdwt(int req, dev_t dev, u64_t pos, char *buf, return r; } -static int bdev_vrdwt_setup(int req, dev_t dev, u64_t pos, iovec_t *vec, +static int bdev_vrdwt_setup(int req, dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, message *m, iovec_s_t *gvec) { /* Set up a vectored read/write request. @@ -249,7 +249,7 @@ static void bdev_vrdwt_cleanup(const message *m, iovec_s_t *gvec) cpf_revoke(gvec[i].iov_grant); } -static ssize_t bdev_vrdwt(int req, dev_t dev, u64_t pos, iovec_t *vec, +static ssize_t bdev_vrdwt(int req, dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags) { /* Perform a synchronous read or write call using a vector of buffers. @@ -271,7 +271,7 @@ static ssize_t bdev_vrdwt(int req, dev_t dev, u64_t pos, iovec_t *vec, return r; } -ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count, int flags) +ssize_t bdev_read(dev_t dev, uint64_t pos, char *buf, size_t count, int flags) { /* Perform a synchronous read call into a single buffer. */ @@ -279,7 +279,7 @@ ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count, int flags) return bdev_rdwt(BDEV_READ, dev, pos, buf, count, flags); } -ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count, int flags) +ssize_t bdev_write(dev_t dev, uint64_t pos, char *buf, size_t count, int flags) { /* Perform a synchronous write call from a single buffer. */ @@ -287,7 +287,7 @@ ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count, int flags) return bdev_rdwt(BDEV_WRITE, dev, pos, buf, count, flags); } -ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) +ssize_t bdev_gather(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags) { /* Perform a synchronous read call into a vector of buffers. */ @@ -295,7 +295,7 @@ ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) return bdev_vrdwt(BDEV_GATHER, dev, pos, vec, count, flags); } -ssize_t bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) +ssize_t bdev_scatter(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags) { /* Perform a synchronous write call from a vector of buffers. */ @@ -383,7 +383,7 @@ void bdev_flush_asyn(dev_t dev) (void) bdev_wait_asyn(call->id); } -static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, u64_t pos, char *buf, +static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, uint64_t pos, char *buf, size_t count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous read or write call using a single buffer. @@ -420,7 +420,7 @@ static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, u64_t pos, char *buf, return call->id; } -static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, u64_t pos, iovec_t *vec, +static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous read or write call using a vector of buffers. @@ -456,7 +456,7 @@ static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, u64_t pos, iovec_t *vec, return call->id; } -bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count, +bdev_id_t bdev_read_asyn(dev_t dev, uint64_t pos, char *buf, size_t count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous read call into a single buffer. @@ -466,7 +466,7 @@ bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count, param); } -bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count, +bdev_id_t bdev_write_asyn(dev_t dev, uint64_t pos, char *buf, size_t count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous write call from a single buffer. @@ -476,7 +476,7 @@ bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count, param); } -bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count, +bdev_id_t bdev_gather_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous read call into a vector of buffers. @@ -486,7 +486,7 @@ bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count, param); } -bdev_id_t bdev_scatter_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count, +bdev_id_t bdev_scatter_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags, bdev_callback_t callback, bdev_param_t param) { /* Perform an asynchronous write call into a vector of buffers. diff --git a/minix/lib/libblockdriver/driver.c b/minix/lib/libblockdriver/driver.c index 1ccb090f2..970ab2fe6 100644 --- a/minix/lib/libblockdriver/driver.c +++ b/minix/lib/libblockdriver/driver.c @@ -194,7 +194,7 @@ static int do_rdwt(struct blockdriver *bdp, message *mp) { /* Carry out a single read or write request. */ iovec_t iovec1; - u64_t position; + uint64_t position; int do_write; ssize_t r; @@ -224,7 +224,7 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id) /* Carry out an device read or write to/from a vector of buffers. */ iovec_t iovec[NR_IOREQS]; unsigned int i, nr_req; - u64_t position; + uint64_t position; int do_write; ssize_t r, size; diff --git a/minix/lib/libblockdriver/drvlib.c b/minix/lib/libblockdriver/drvlib.c index a82682b44..71c56ce7e 100644 --- a/minix/lib/libblockdriver/drvlib.c +++ b/minix/lib/libblockdriver/drvlib.c @@ -114,8 +114,8 @@ static void parse_part_table( if (pe->lowsec < base) pe->lowsec = base; if (part_limit < pe->lowsec) part_limit = pe->lowsec; - dv->dv_base = (u64_t)pe->lowsec * SECTOR_SIZE; - dv->dv_size = (u64_t)(part_limit - pe->lowsec) * SECTOR_SIZE; + dv->dv_base = (uint64_t)pe->lowsec * SECTOR_SIZE; + dv->dv_size = (uint64_t)(part_limit - pe->lowsec) * SECTOR_SIZE; if (style == P_PRIMARY) { /* Each Minix primary partition can be subpartitioned. */ @@ -169,9 +169,9 @@ static void extpartition( if (pe->sysind != NO_PART) { if ((dv = (*bdp->bdr_part)(subdev)) == NULL) return; - dv->dv_base = (u64_t)(extbase + offset + pe->lowsec) * + dv->dv_base = (uint64_t)(extbase + offset + pe->lowsec) * SECTOR_SIZE; - dv->dv_size = (u64_t)pe->size * SECTOR_SIZE; + dv->dv_size = (uint64_t)pe->size * SECTOR_SIZE; /* Out of devices? */ if (++subdev % NR_PARTITIONS == 0) return; @@ -194,10 +194,10 @@ static int get_part_table( * errors. */ iovec_t iovec1; - u64_t position; + uint64_t position; int r; - position = (u64_t)offset * SECTOR_SIZE; + position = (uint64_t)offset * SECTOR_SIZE; iovec1.iov_addr = (vir_bytes) tmp_buf; iovec1.iov_size = CD_SECTOR_SIZE; r = (*bdp->bdr_transfer)(device, FALSE /*do_write*/, position, SELF, diff --git a/minix/lib/libblockdriver/trace.c b/minix/lib/libblockdriver/trace.c index 723589c60..d650b247d 100644 --- a/minix/lib/libblockdriver/trace.c +++ b/minix/lib/libblockdriver/trace.c @@ -19,7 +19,7 @@ static btrace_entry *trace_buf = NULL; static size_t trace_size = 0; static size_t trace_pos; static size_t trace_next; -static u64_t trace_tsc; +static uint64_t trace_tsc; /* Pointers to in-progress trace entries for each thread (all worker threads, * plus one for the main thread). Each pointer is set to NULL whenever no @@ -34,7 +34,7 @@ static uint32_t trace_gettime(void) { /* Return the current time, in microseconds since the start of the trace. */ - u64_t tsc; + uint64_t tsc; assert(trace_enabled); @@ -170,7 +170,7 @@ void trace_start(thread_id_t id, message *m_ptr) */ btrace_entry *entry; int req; - u64_t pos; + uint64_t pos; size_t size; int flags; diff --git a/minix/lib/libc/gen/read_tsc_64.c b/minix/lib/libc/gen/read_tsc_64.c index 482a01645..e7c97795d 100644 --- a/minix/lib/libc/gen/read_tsc_64.c +++ b/minix/lib/libc/gen/read_tsc_64.c @@ -2,11 +2,11 @@ #include #include -/* Utility function to work directly with u64_t +/* Utility function to work directly with uint64_t * By Antonio Mancina */ void read_tsc_64(t) -u64_t* t; +uint64_t* t; { uint32_t lo, hi; read_tsc (&hi, &lo); diff --git a/minix/lib/libc/sys/sizeup.c b/minix/lib/libc/sys/sizeup.c index 11df1e96b..1dd5f4f9e 100644 --- a/minix/lib/libc/sys/sizeup.c +++ b/minix/lib/libc/sys/sizeup.c @@ -27,7 +27,7 @@ *===============================================================*/ int minix_sizeup(device, bytes) char *device; -u64_t *bytes; +uint64_t *bytes; { int fd; struct part_geom entry; @@ -42,9 +42,9 @@ u64_t *bytes; perror("sizeup ioctl"); if(fstat(fd, &st) < 0) { perror("fstat"); - entry.size = ((u64_t)(0)); + entry.size = ((uint64_t)(0)); } else { - entry.size = ((u64_t)(st.st_size)); + entry.size = ((uint64_t)(st.st_size)); } } close(fd); diff --git a/minix/lib/libhgfs/file.c b/minix/lib/libhgfs/file.c index ad987f35c..fcbe46c2e 100644 --- a/minix/lib/libhgfs/file.c +++ b/minix/lib/libhgfs/file.c @@ -55,7 +55,7 @@ ssize_t hgfs_read( sffs_file_t handle, /* handle to open file */ char *buf, /* data buffer or NULL */ size_t size, /* maximum number of bytes to read */ - u64_t off /* file offset */ + uint64_t off /* file offset */ ) { /* Read from an open file. Upon success, return the number of bytes read. @@ -91,7 +91,7 @@ ssize_t hgfs_write( sffs_file_t handle, /* handle to open file */ char *buf, /* data buffer or NULL */ size_t len, /* number of bytes to write */ - u64_t off /* file offset */ + uint64_t off /* file offset */ ) { /* Write to an open file. Upon success, return the number of bytes written. diff --git a/minix/lib/libhgfs/info.c b/minix/lib/libhgfs/info.c index db5a21a42..e4cda2cd0 100644 --- a/minix/lib/libhgfs/info.c +++ b/minix/lib/libhgfs/info.c @@ -5,7 +5,7 @@ /*===========================================================================* * hgfs_queryvol * *===========================================================================*/ -int hgfs_queryvol(const char *path, u64_t *free, u64_t *total) +int hgfs_queryvol(const char *path, uint64_t *free, uint64_t *total) { /* Retrieve information about available and total volume space associated with * a given path. diff --git a/minix/lib/libhgfs/proto.h b/minix/lib/libhgfs/proto.h index e618fba8a..992c21ac6 100644 --- a/minix/lib/libhgfs/proto.h +++ b/minix/lib/libhgfs/proto.h @@ -36,14 +36,14 @@ int error_convert(int err); /* file.c */ int hgfs_open(const char *path, int flags, int mode, sffs_file_t *handle); -ssize_t hgfs_read(sffs_file_t handle, char *buf, size_t size, u64_t offset); -ssize_t hgfs_write(sffs_file_t handle, char *buf, size_t len, u64_t offset); +ssize_t hgfs_read(sffs_file_t handle, char *buf, size_t size, uint64_t offset); +ssize_t hgfs_write(sffs_file_t handle, char *buf, size_t len, uint64_t offset); int hgfs_close(sffs_file_t handle); size_t hgfs_readbuf(char **ptr); size_t hgfs_writebuf(char **ptr); /* info.c */ -int hgfs_queryvol(const char *path, u64_t *free, u64_t *total); +int hgfs_queryvol(const char *path, uint64_t *free, uint64_t *total); /* link.c */ int hgfs_mkdir(const char *path, int mode); diff --git a/minix/lib/libhgfs/time.c b/minix/lib/libhgfs/time.c index 84f86645d..aa9c03f6a 100644 --- a/minix/lib/libhgfs/time.c +++ b/minix/lib/libhgfs/time.c @@ -2,7 +2,7 @@ #include "inc.h" -static u64_t time_offset; +static uint64_t time_offset; /*===========================================================================* * time_init * @@ -18,7 +18,7 @@ void time_init(void) * the difference between that time and the UNIX epoch, in 100ns units. */ /* FIXME: we currently do not take into account timezones. */ - time_offset = (u64_t)116444736 * 1000000000; + time_offset = (uint64_t)116444736 * 1000000000; } /*===========================================================================* @@ -30,10 +30,10 @@ void time_put(struct timespec *tsp) * in HGFS timestamp format. If a NULL pointer is given, store a timestamp of * zero instead. */ - u64_t hgfstime; + uint64_t hgfstime; if (tsp != NULL) { - hgfstime = ((u64_t)tsp->tv_sec * 10000000) + (tsp->tv_nsec / 100); + hgfstime = ((uint64_t)tsp->tv_sec * 10000000) + (tsp->tv_nsec / 100); hgfstime += time_offset; RPC_NEXT32 = ex64lo(hgfstime); @@ -53,7 +53,7 @@ void time_get(struct timespec *tsp) * and store the result in the given time pointer. If the given pointer is * NULL, however, simply skip over the timestamp in the RPC buffer. */ - u64_t hgfstime; + uint64_t hgfstime; uint32_t time_lo, time_hi; if (tsp != NULL) { diff --git a/minix/lib/libminixfs/cache.c b/minix/lib/libminixfs/cache.c index a358317cf..41f829cb5 100644 --- a/minix/lib/libminixfs/cache.c +++ b/minix/lib/libminixfs/cache.c @@ -92,12 +92,12 @@ static int fs_bufs_heuristic(int minbufs, fsblkcnt_t btotal, /* remaining free memory is unused memory plus memory in used for cache, * as the cache can be evicted */ - kbytes_remain_mem = (u64_t)(vsi.vsi_free + vsi.vsi_cached) * + kbytes_remain_mem = (uint64_t)(vsi.vsi_free + vsi.vsi_cached) * vsi.vsi_pagesize / 1024; /* check fs usage. */ - kbytes_used_fs = (unsigned long)(((u64_t)bused * blocksize) / 1024); - kbytes_total_fs = (unsigned long)(((u64_t)btotal * blocksize) / 1024); + kbytes_used_fs = (unsigned long)(((uint64_t)bused * blocksize) / 1024); + kbytes_total_fs = (unsigned long)(((uint64_t)btotal * blocksize) / 1024); /* heuristic for a desired cache size based on FS usage; * but never bigger than half of the total filesystem @@ -296,7 +296,7 @@ static struct buf *find_block(dev_t dev, block64_t block) * get_block_ino * *===========================================================================*/ static int get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how, - ino_t ino, u64_t ino_off, size_t block_size) + ino_t ino, uint64_t ino_off, size_t block_size) { /* Check to see if the requested block is in the block cache. The requested * block is identified by the block number in 'block' on device 'dev', counted @@ -492,7 +492,7 @@ static int get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how, * lmfs_get_block_ino * *===========================================================================*/ int lmfs_get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how, - ino_t ino, u64_t ino_off) + ino_t ino, uint64_t ino_off) { return get_block_ino(bpp, dev, block, how, ino, ino_off, fs_block_size); } @@ -652,7 +652,7 @@ void lmfs_free_block(dev_t dev, block64_t block) /*===========================================================================* * lmfs_zero_block_ino * *===========================================================================*/ -void lmfs_zero_block_ino(dev_t dev, ino_t ino, u64_t ino_off) +void lmfs_zero_block_ino(dev_t dev, ino_t ino, uint64_t ino_off) { /* Files may have holes. From an application perspective, these are just file * regions filled with zeroes. From a file system perspective however, holes diff --git a/minix/lib/libsffs/misc.c b/minix/lib/libsffs/misc.c index 566ddb350..0797d266d 100644 --- a/minix/lib/libsffs/misc.c +++ b/minix/lib/libsffs/misc.c @@ -20,7 +20,7 @@ int do_statvfs(struct statvfs *st) */ struct inode *ino; char path[PATH_MAX]; - u64_t bfree, btotal; + uint64_t bfree, btotal; int r; /* Unfortunately, we cannot be any more specific than this, because we are diff --git a/minix/lib/libsys/arch/earm/frclock_util.c b/minix/lib/libsys/arch/earm/frclock_util.c index 58d80d231..33d1160e0 100644 --- a/minix/lib/libsys/arch/earm/frclock_util.c +++ b/minix/lib/libsys/arch/earm/frclock_util.c @@ -13,13 +13,13 @@ #define MICROHZ 1000000ULL /* number of micros per second */ #define MICROSPERTICK(h) (MICROHZ/(h)) /* number of micros per HZ tick */ -static u64_t Hz; +static uint64_t Hz; int micro_delay(uint32_t micros) { struct minix_kerninfo *minix_kerninfo; - u64_t start, delta, delta_end; + uint64_t start, delta, delta_end; Hz = sys_hz(); minix_kerninfo = get_minix_kerninfo(); @@ -48,7 +48,7 @@ micro_delay(uint32_t micros) return 0; } -uint32_t frclock_64_to_micros(u64_t tsc) +uint32_t frclock_64_to_micros(uint64_t tsc) { return (uint32_t) (tsc / (get_minix_kerninfo()->arm_frclock->hz / MICROHZ)); @@ -84,14 +84,14 @@ delta_frclock(uint32_t base, uint32_t cur) } void -read_frclock_64(u64_t *frclk) +read_frclock_64(uint64_t *frclk) { read_frclock((uint32_t *) frclk); } -u64_t -delta_frclock_64(u64_t base, u64_t cur) +uint64_t +delta_frclock_64(uint64_t base, uint64_t cur) { - return (u64_t) delta_frclock((uint32_t) base, (uint32_t) cur); + return (uint64_t) delta_frclock((uint32_t) base, (uint32_t) cur); } diff --git a/minix/lib/libsys/arch/earm/spin.c b/minix/lib/libsys/arch/earm/spin.c index a22d2a142..449972d64 100644 --- a/minix/lib/libsys/arch/earm/spin.c +++ b/minix/lib/libsys/arch/earm/spin.c @@ -45,7 +45,7 @@ int spin_check(spin_t *s) * implementation assumes that it is okay to spin a little bit too long * (up to a full clock tick extra). */ - u64_t cur_tsc, tsc_delta; + uint64_t cur_tsc, tsc_delta; clock_t now, micro_delta; switch (s->s_state) { diff --git a/minix/lib/libsys/arch/earm/tsc_util.c b/minix/lib/libsys/arch/earm/tsc_util.c index 87a74819e..37ba10c6d 100644 --- a/minix/lib/libsys/arch/earm/tsc_util.c +++ b/minix/lib/libsys/arch/earm/tsc_util.c @@ -20,9 +20,9 @@ static uint32_t calib_hz = 600000000; -uint32_t tsc_64_to_micros(u64_t tsc) +uint32_t tsc_64_to_micros(uint64_t tsc) { - u64_t tmp; + uint64_t tmp; tmp = tsc / calib_hz; return (uint32_t) tmp; diff --git a/minix/lib/libsys/arch/i386/getidle.c b/minix/lib/libsys/arch/i386/getidle.c index 566305211..a2bc5c258 100644 --- a/minix/lib/libsys/arch/i386/getidle.c +++ b/minix/lib/libsys/arch/i386/getidle.c @@ -22,10 +22,10 @@ #include #include -static u64_t start, idle; +static uint64_t start, idle; static int running = 0; -static double make_double(u64_t d) +static double make_double(uint64_t d) { /* Convert a 64-bit fixed point value into a double. * This whole thing should be replaced by something better eventually. @@ -44,8 +44,8 @@ static double make_double(u64_t d) double getidle(void) { - u64_t stop, idle2; - u64_t idelta, tdelta; + uint64_t stop, idle2; + uint64_t idelta, tdelta; double ifp, tfp, rfp; int r; diff --git a/minix/lib/libsys/arch/i386/spin.c b/minix/lib/libsys/arch/i386/spin.c index 9a10100a2..55ae660d8 100644 --- a/minix/lib/libsys/arch/i386/spin.c +++ b/minix/lib/libsys/arch/i386/spin.c @@ -45,7 +45,7 @@ int spin_check(spin_t *s) * implementation assumes that it is okay to spin a little bit too long * (up to a full clock tick extra). */ - u64_t cur_tsc, tsc_delta; + uint64_t cur_tsc, tsc_delta; clock_t now, micro_delta; switch (s->s_state) { diff --git a/minix/lib/libsys/arch/i386/tsc_util.c b/minix/lib/libsys/arch/i386/tsc_util.c index 0387d1809..9a5745678 100644 --- a/minix/lib/libsys/arch/i386/tsc_util.c +++ b/minix/lib/libsys/arch/i386/tsc_util.c @@ -55,7 +55,7 @@ tsc_calibrate(void) int micro_delay(uint32_t micros) { - u64_t now, end; + uint64_t now, end; /* Start of delay. */ read_tsc_64(&now); @@ -63,7 +63,7 @@ micro_delay(uint32_t micros) CALIBRATE; /* We have to know when to end the delay. */ - end = now + ((u64_t)micros * calib_mhz); + end = now + ((uint64_t)micros * calib_mhz); /* If we have to wait for at least one HZ tick, use the regular * tickdelay first. Round downwards on purpose, so the average @@ -81,9 +81,9 @@ micro_delay(uint32_t micros) return OK; } -uint32_t tsc_64_to_micros(u64_t tsc) +uint32_t tsc_64_to_micros(uint64_t tsc) { - u64_t tmp; + uint64_t tmp; CALIBRATE; @@ -111,7 +111,7 @@ uint32_t tsc_get_khz(void) #define frclock_64_to_micros tsc_64_to_micros #define read_frclock_64 read_tsc_64 -u64_t delta_frclock_64(u64_t base, u64_t cur) +uint64_t delta_frclock_64(uint64_t base, uint64_t cur) { return cur - base; } diff --git a/minix/lib/libsys/arch/i386/vbox.c b/minix/lib/libsys/arch/i386/vbox.c index 092889414..23fee5d12 100644 --- a/minix/lib/libsys/arch/i386/vbox.c +++ b/minix/lib/libsys/arch/i386/vbox.c @@ -162,7 +162,7 @@ void vbox_set_u32(vbox_param_t *param, uint32_t value) param->u32 = value; } -void vbox_set_u64(vbox_param_t *param, u64_t value) +void vbox_set_u64(vbox_param_t *param, uint64_t value) { /* Set the given parameter to a 32-bit value. */ @@ -246,7 +246,7 @@ uint32_t vbox_get_u32(vbox_param_t *param) return param->u32; } -u64_t vbox_get_u64(vbox_param_t *param) +uint64_t vbox_get_u64(vbox_param_t *param) { /* Retrieve the 64-bit value from the given parameter. */ diff --git a/minix/lib/libsys/sys_hz.c b/minix/lib/libsys/sys_hz.c index ffd0df12c..35c2fdea8 100644 --- a/minix/lib/libsys/sys_hz.c +++ b/minix/lib/libsys/sys_hz.c @@ -31,7 +31,7 @@ micros_to_ticks(uint32_t micros) { uint32_t ticks; - ticks = (uint32_t)(((u64_t)micros * sys_hz()) / 1000000); + ticks = (uint32_t)(((uint64_t)micros * sys_hz()) / 1000000); if(ticks < 1) ticks = 1; return ticks; diff --git a/minix/lib/libvboxfs/attr.c b/minix/lib/libvboxfs/attr.c index e0ef7631c..f272e41bd 100644 --- a/minix/lib/libvboxfs/attr.c +++ b/minix/lib/libvboxfs/attr.c @@ -7,7 +7,7 @@ * VirtualBox' timestamps are in nanoseconds since the UNIX epoch. */ static void -get_time(struct timespec *tsp, u64_t nsecs) +get_time(struct timespec *tsp, uint64_t nsecs) { tsp->tv_sec = (unsigned long)(nsecs / 1000000000); @@ -17,11 +17,11 @@ get_time(struct timespec *tsp, u64_t nsecs) /* * Convert a POSIX timespec structure to a VirtualBox timestamp. */ -static u64_t +static uint64_t set_time(struct timespec *tsp) { - return ((u64_t)tsp->tv_sec * 1000000000) + tsp->tv_nsec; + return ((uint64_t)tsp->tv_sec * 1000000000) + tsp->tv_nsec; } /* @@ -92,7 +92,7 @@ vboxfs_getattr(const char *path, struct sffs_attr *attr) * Set file size. */ static int -set_size(const char *path, u64_t size) +set_size(const char *path, uint64_t size) { vboxfs_objinfo_t info; vboxfs_handle_t h; diff --git a/minix/lib/libvboxfs/file.c b/minix/lib/libvboxfs/file.c index a99f16d61..1a2b4e007 100644 --- a/minix/lib/libvboxfs/file.c +++ b/minix/lib/libvboxfs/file.c @@ -43,7 +43,7 @@ vboxfs_open(const char *path, int flags, int mode, sffs_file_t *handle) * Read or write a chunk from or to a file. */ static ssize_t -read_write(vboxfs_handle_t handle, char *buf, size_t size, u64_t pos, +read_write(vboxfs_handle_t handle, char *buf, size_t size, uint64_t pos, int write) { vbox_param_t param[5]; @@ -68,7 +68,7 @@ read_write(vboxfs_handle_t handle, char *buf, size_t size, u64_t pos, * Read from a file. */ ssize_t -vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos) +vboxfs_read(sffs_file_t handle, char *buf, size_t size, uint64_t pos) { vboxfs_handle_t *handlep; @@ -81,7 +81,7 @@ vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos) * Write to a file. */ ssize_t -vboxfs_write(sffs_file_t handle, char *buf, size_t len, u64_t pos) +vboxfs_write(sffs_file_t handle, char *buf, size_t len, uint64_t pos) { vboxfs_handle_t *handlep; diff --git a/minix/lib/libvboxfs/info.c b/minix/lib/libvboxfs/info.c index 74c44e813..1635ac037 100644 --- a/minix/lib/libvboxfs/info.c +++ b/minix/lib/libvboxfs/info.c @@ -44,7 +44,7 @@ vboxfs_query_vol(const char *path, vboxfs_volinfo_t *volinfo) * Query volume information. */ int -vboxfs_queryvol(const char *path, u64_t *free, u64_t *total) +vboxfs_queryvol(const char *path, uint64_t *free, uint64_t *total) { vboxfs_volinfo_t volinfo; int r; diff --git a/minix/lib/libvboxfs/proto.h b/minix/lib/libvboxfs/proto.h index 344db64f4..54d2f99d2 100644 --- a/minix/lib/libvboxfs/proto.h +++ b/minix/lib/libvboxfs/proto.h @@ -16,8 +16,8 @@ int vboxfs_closedir(sffs_dir_t handle); /* file.c */ int vboxfs_open(const char *path, int flags, int mode, sffs_file_t *handle); -ssize_t vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos); -ssize_t vboxfs_write(sffs_file_t handle, char *buf, size_t len, u64_t pos); +ssize_t vboxfs_read(sffs_file_t handle, char *buf, size_t size, uint64_t pos); +ssize_t vboxfs_write(sffs_file_t handle, char *buf, size_t len, uint64_t pos); int vboxfs_close(sffs_file_t handle); size_t vboxfs_buffer(char **ptr); @@ -30,7 +30,7 @@ void vboxfs_close_file(vboxfs_handle_t handle); int vboxfs_getset_info(vboxfs_handle_t handle, uint32_t flags, void *data, size_t size); int vboxfs_query_vol(const char *path, vboxfs_volinfo_t *volinfo); -int vboxfs_queryvol(const char *path, u64_t *free, u64_t *total); +int vboxfs_queryvol(const char *path, uint64_t *free, uint64_t *total); /* link.c */ int vboxfs_mkdir(const char *path, int mode); diff --git a/minix/lib/libvboxfs/vboxfs.h b/minix/lib/libvboxfs/vboxfs.h index 6bf2283e8..d8ece5db4 100644 --- a/minix/lib/libvboxfs/vboxfs.h +++ b/minix/lib/libvboxfs/vboxfs.h @@ -18,7 +18,7 @@ #define VBOXFS_INVALID_HANDLE ((vboxfs_handle_t) ~0LL) typedef uint32_t vboxfs_root_t; -typedef u64_t vboxfs_handle_t; +typedef uint64_t vboxfs_handle_t; typedef struct { uint16_t size; @@ -46,13 +46,13 @@ typedef struct { uint32_t gid; uint32_t nlinks; uint32_t dev; - u64_t inode; + uint64_t inode; uint32_t flags; uint32_t gen; uint32_t rdev; }; struct { - u64_t easize; + uint64_t easize; }; }; } vboxfs_objattr_t; @@ -62,12 +62,12 @@ typedef struct { #define VBOXFS_SET_MODE(type, perm) ((type) | ((perm) & ALLPERMS)) typedef struct { - u64_t size; - u64_t disksize; - u64_t atime; - u64_t mtime; - u64_t ctime; - u64_t crtime; + uint64_t size; + uint64_t disksize; + uint64_t atime; + uint64_t mtime; + uint64_t ctime; + uint64_t crtime; vboxfs_objattr_t attr; } vboxfs_objinfo_t; @@ -126,8 +126,8 @@ typedef struct { } vboxfs_fsprops_t; typedef struct { - u64_t total; - u64_t free; + uint64_t total; + uint64_t free; uint32_t blocksize; uint32_t sectorsize; uint32_t serial; diff --git a/minix/lib/libvirtio/virtio_ring.h b/minix/lib/libvirtio/virtio_ring.h index 0f603ce0f..2275354fc 100644 --- a/minix/lib/libvirtio/virtio_ring.h +++ b/minix/lib/libvirtio/virtio_ring.h @@ -60,7 +60,7 @@ /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ struct vring_desc { /* Address (guest-physical). */ - u64_t addr; + uint64_t addr; /* Length. */ uint32_t len; /* The flags as indicated above. */ diff --git a/minix/man/man2/fcntl.2 b/minix/man/man2/fcntl.2 index 7d7590181..96950602b 100644 --- a/minix/man/man2/fcntl.2 +++ b/minix/man/man2/fcntl.2 @@ -212,7 +212,7 @@ zeros. (Other than sharing the flock structure, this call has nothing to do with locking.) (This call is common among UNIX(-like) systems.) .RE .SP -.BI "fcntl(" fd ", F_SEEK, u64_t " pos ")" +.BI "fcntl(" fd ", F_SEEK, uint64_t " pos ")" .RS This Minix-vmd specific call sets the file position of the file associated with file descriptor diff --git a/minix/man/man4/controller.4 b/minix/man/man4/controller.4 index 66fa6251c..20576e341 100644 --- a/minix/man/man4/controller.4 +++ b/minix/man/man4/controller.4 @@ -155,8 +155,8 @@ a partition. This is what looks like: .nf .ta +2n +25n struct part_geom { - u64_t base; /* byte offset to the partition start */ - u64_t size; /* number of bytes in the partition */ + uint64_t base; /* byte offset to the partition start */ + uint64_t size; /* number of bytes in the partition */ unsigned cylinders; /* disk geometry for partitioning */ unsigned heads; unsigned sectors; diff --git a/minix/servers/input/input.c b/minix/servers/input/input.c index 503834b8d..8f583f926 100644 --- a/minix/servers/input/input.c +++ b/minix/servers/input/input.c @@ -11,7 +11,7 @@ static int input_open(devminor_t, int, endpoint_t); static int input_close(devminor_t); -static ssize_t input_read(devminor_t, u64_t, endpoint_t, cp_grant_id_t, size_t, +static ssize_t input_read(devminor_t, uint64_t, endpoint_t, cp_grant_id_t, size_t, int, cdev_id_t); static int input_ioctl(devminor_t, unsigned long, endpoint_t, cp_grant_id_t, int, endpoint_t, cdev_id_t); @@ -160,7 +160,7 @@ input_copy_events(endpoint_t endpt, cp_grant_id_t grant, * Read from an input device. */ static ssize_t -input_read(devminor_t minor, u64_t UNUSED(position), endpoint_t endpt, +input_read(devminor_t minor, uint64_t UNUSED(position), endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags, cdev_id_t id) { unsigned int event_count; diff --git a/minix/servers/pm/utility.c b/minix/servers/pm/utility.c index 7d061c47c..64fdf5cf8 100644 --- a/minix/servers/pm/utility.c +++ b/minix/servers/pm/utility.c @@ -144,7 +144,7 @@ message *m_ptr; void set_rusage_times(struct rusage * r_usage, clock_t user_time, clock_t sys_time) { - u64_t usec; + uint64_t usec; usec = user_time * 1000000 / sys_hz(); r_usage->ru_utime.tv_sec = usec / 1000000; diff --git a/minix/servers/vfs/misc.c b/minix/servers/vfs/misc.c index e179a8a0b..eff3c2ea6 100644 --- a/minix/servers/vfs/misc.c +++ b/minix/servers/vfs/misc.c @@ -388,7 +388,7 @@ int do_vm_call(void) int req_fd = job_m_in.VFS_VMCALL_FD; uint32_t req_id = job_m_in.VFS_VMCALL_REQID; endpoint_t ep = job_m_in.VFS_VMCALL_ENDPOINT; - u64_t offset = job_m_in.VFS_VMCALL_OFFSET; + uint64_t offset = job_m_in.VFS_VMCALL_OFFSET; uint32_t length = job_m_in.VFS_VMCALL_LENGTH; int result = OK; int slot; diff --git a/minix/servers/vm/cache.c b/minix/servers/vm/cache.c index 67a93407c..0bf78ca90 100644 --- a/minix/servers/vm/cache.c +++ b/minix/servers/vm/cache.c @@ -73,7 +73,7 @@ void cache_lru_touch(struct cached_page *hb) lru_add(hb); } -static __inline uint32_t makehash(uint32_t p1, u64_t p2) +static __inline uint32_t makehash(uint32_t p1, uint64_t p2) { uint32_t offlo = ex64lo(p2), offhi = ex64hi(p2), v = 0x12345678; @@ -161,7 +161,7 @@ static void addcache_byino(struct cached_page *hb) } static void -update_inohash(struct cached_page *hb, ino_t ino, u64_t ino_off) +update_inohash(struct cached_page *hb, ino_t ino, uint64_t ino_off) { assert(ino != VMC_NO_INODE); if(hb->ino != VMC_NO_INODE) { @@ -174,7 +174,7 @@ update_inohash(struct cached_page *hb, ino_t ino, u64_t ino_off) } struct cached_page * -find_cached_page_bydev(dev_t dev, u64_t dev_off, ino_t ino, u64_t ino_off, int touchlru) +find_cached_page_bydev(dev_t dev, uint64_t dev_off, ino_t ino, uint64_t ino_off, int touchlru) { struct cached_page *hb; @@ -195,7 +195,7 @@ find_cached_page_bydev(dev_t dev, u64_t dev_off, ino_t ino, u64_t ino_off, int t return NULL; } -struct cached_page *find_cached_page_byino(dev_t dev, ino_t ino, u64_t ino_off, int touchlru) +struct cached_page *find_cached_page_byino(dev_t dev, ino_t ino, uint64_t ino_off, int touchlru) { struct cached_page *hb; @@ -213,7 +213,7 @@ struct cached_page *find_cached_page_byino(dev_t dev, ino_t ino, u64_t ino_off, return NULL; } -int addcache(dev_t dev, u64_t dev_off, ino_t ino, u64_t ino_off, int flags, +int addcache(dev_t dev, uint64_t dev_off, ino_t ino, uint64_t ino_off, int flags, struct phys_block *pb) { int hv_dev; diff --git a/minix/servers/vm/cache.h b/minix/servers/vm/cache.h index 0b5301d18..cd4faa2ef 100644 --- a/minix/servers/vm/cache.h +++ b/minix/servers/vm/cache.h @@ -8,10 +8,10 @@ struct cached_page { * - ino may be unknown, i.e. VMC_NO_INODE */ dev_t dev; /* which dev is it on */ - u64_t dev_offset; /* offset within dev */ + uint64_t dev_offset; /* offset within dev */ ino_t ino; /* which ino is it about */ - u64_t ino_offset; /* offset within ino */ + uint64_t ino_offset; /* offset within ino */ int flags; /* currently only VMSF_ONCE or 0 */ struct phys_block *page; /* page ptr */ struct cached_page *older; /* older in lru chain */ diff --git a/minix/servers/vm/mem_file.c b/minix/servers/vm/mem_file.c index 9ad3336aa..7aa4cd71a 100644 --- a/minix/servers/vm/mem_file.c +++ b/minix/servers/vm/mem_file.c @@ -98,7 +98,7 @@ static int mappedfile_pagefault(struct vmproc *vmp, struct vir_region *region, /* Totally new block? Create it. */ if(ph->ph->phys == MAP_NONE) { struct cached_page *cp; - u64_t referenced_offset = + uint64_t referenced_offset = region->param.file.offset + ph->offset; if(region->param.file.fdref->ino == VMC_NO_INODE) { cp = find_cached_page_bydev(region->param.file.fdref->dev, @@ -189,7 +189,7 @@ int mappedfile_copy(struct vir_region *vr, struct vir_region *newvr) } int mappedfile_setfile(struct vmproc *owner, - struct vir_region *region, int fd, u64_t offset, + struct vir_region *region, int fd, uint64_t offset, dev_t dev, ino_t ino, uint16_t clearend, int prefill, int mayclosefd) { vir_bytes vaddr; @@ -210,7 +210,7 @@ int mappedfile_setfile(struct vmproc *owner, for(vaddr = 0; vaddr < region->length; vaddr+=VM_PAGE_SIZE) { struct cached_page *cp = NULL; struct phys_region *pr; - u64_t referenced_offset = offset + vaddr; + uint64_t referenced_offset = offset + vaddr; if(roundup(vaddr+region->param.file.clearend, VM_PAGE_SIZE) >= region->length) { diff --git a/minix/servers/vm/mmap.c b/minix/servers/vm/mmap.c index 9365bd4b1..4228d4be7 100644 --- a/minix/servers/vm/mmap.c +++ b/minix/servers/vm/mmap.c @@ -83,12 +83,12 @@ static struct vir_region *mmap_region(struct vmproc *vmp, vir_bytes addr, static int mmap_file(struct vmproc *vmp, int vmfd, off_t file_offset, int flags, - ino_t ino, dev_t dev, u64_t filesize, vir_bytes addr, vir_bytes len, + ino_t ino, dev_t dev, uint64_t filesize, vir_bytes addr, vir_bytes len, vir_bytes *retaddr, uint16_t clearend, int writable, int mayclosefd) { /* VFS has replied to a VMVFSREQ_FDLOOKUP request. */ struct vir_region *vr; - u64_t page_offset; + uint64_t page_offset; int result = OK; uint32_t vrflags = 0; @@ -109,7 +109,7 @@ static int mmap_file(struct vmproc *vmp, #if 0 /* XXX ld.so relies on longer-than-file mapping */ - if((u64_t) len + file_offset > filesize) { + if((uint64_t) len + file_offset > filesize) { printf("VM: truncating mmap dev 0x%x ino %d beyond file size in %d; offset %llu, len %lu, size %llu; ", dev, ino, vmp->vm_endpoint, file_offset, len, filesize); @@ -152,7 +152,7 @@ int do_vfs_mmap(message *m) return mmap_file(vmp, m->m_vm_vfs_mmap.fd, m->m_vm_vfs_mmap.offset, MAP_PRIVATE | MAP_FIXED, m->m_vm_vfs_mmap.ino, m->m_vm_vfs_mmap.dev, - (u64_t) LONG_MAX * VM_PAGE_SIZE, + (uint64_t) LONG_MAX * VM_PAGE_SIZE, m->m_vm_vfs_mmap.vaddr, m->m_vm_vfs_mmap.len, &v, clearend, flags, 0); } @@ -180,7 +180,7 @@ static void mmap_file_cont(struct vmproc *vmp, message *replymsg, void *cbarg, result = mmap_file(vmp, replymsg->VMV_FD, origmsg->m_mmap.offset, origmsg->m_mmap.flags, replymsg->VMV_INO, replymsg->VMV_DEV, - (u64_t) replymsg->VMV_SIZE_PAGES*PAGE_SIZE, + (uint64_t) replymsg->VMV_SIZE_PAGES*PAGE_SIZE, (vir_bytes) origmsg->m_mmap.addr, origmsg->m_mmap.len, &v, 0, writable, 1); } diff --git a/minix/servers/vm/proto.h b/minix/servers/vm/proto.h index 61492d1f2..8ac59ada7 100644 --- a/minix/servers/vm/proto.h +++ b/minix/servers/vm/proto.h @@ -221,10 +221,10 @@ int do_forgetcache(message *m); int do_clearcache(message *m); /* cache.c */ -struct cached_page *find_cached_page_bydev(dev_t dev, u64_t dev_off, - ino_t ino, u64_t ino_off, int touchlru); -struct cached_page *find_cached_page_byino(dev_t dev, ino_t ino, u64_t ino_off, int touchlru); -int addcache(dev_t dev, u64_t def_off, ino_t ino, u64_t ino_off, int flags, +struct cached_page *find_cached_page_bydev(dev_t dev, uint64_t dev_off, + ino_t ino, uint64_t ino_off, int touchlru); +struct cached_page *find_cached_page_byino(dev_t dev, ino_t ino, uint64_t ino_off, int touchlru); +int addcache(dev_t dev, uint64_t def_off, ino_t ino, uint64_t ino_off, int flags, struct phys_block *pb); void cache_sanitycheck_internal(void); int cache_freepages(int pages); @@ -234,14 +234,14 @@ void rmcache(struct cached_page *cp); void clear_cache_bydev(dev_t dev); /* vfs.c */ -int vfs_request(int reqno, int fd, struct vmproc *vmp, u64_t offset, +int vfs_request(int reqno, int fd, struct vmproc *vmp, uint64_t offset, uint32_t len, vfs_callback_t reply_callback, void *cbarg, void *state, int statelen); int do_vfs_reply(message *m); /* mem_file.c */ int mappedfile_setfile(struct vmproc *owner, struct vir_region *region, - int fd, u64_t offset, + int fd, uint64_t offset, dev_t dev, ino_t ino, uint16_t clearend, int prefill, int mayclose); /* fdref.c */ diff --git a/minix/servers/vm/region.h b/minix/servers/vm/region.h index 713544874..216e92375 100644 --- a/minix/servers/vm/region.h +++ b/minix/servers/vm/region.h @@ -55,7 +55,7 @@ typedef struct vir_region { struct { int inited; struct fdref *fdref; - u64_t offset; + uint64_t offset; uint16_t clearend; } file; } param; diff --git a/minix/servers/vm/vfs.c b/minix/servers/vm/vfs.c index 13dbb63a0..fc09b2504 100644 --- a/minix/servers/vm/vfs.c +++ b/minix/servers/vm/vfs.c @@ -57,7 +57,7 @@ static void activate(void) /*===========================================================================* * vfs_request * *===========================================================================*/ -int vfs_request(int reqno, int fd, struct vmproc *vmp, u64_t offset, uint32_t len, +int vfs_request(int reqno, int fd, struct vmproc *vmp, uint64_t offset, uint32_t len, vfs_callback_t reply_callback, void *cbarg, void *state, int statelen) { /* Perform an asynchronous request to VFS. diff --git a/minix/servers/vm/vmproc.h b/minix/servers/vm/vmproc.h index 1a562d508..ab9b15d10 100644 --- a/minix/servers/vm/vmproc.h +++ b/minix/servers/vm/vmproc.h @@ -27,8 +27,8 @@ struct vmproc { #endif vir_bytes vm_total; vir_bytes vm_total_max; - u64_t vm_minor_page_fault; - u64_t vm_major_page_fault; + uint64_t vm_minor_page_fault; + uint64_t vm_major_page_fault; }; /* Bits for vm_flags */ diff --git a/minix/tests/blocktest/blocktest.c b/minix/tests/blocktest/blocktest.c index d0acbdd93..ffa441ea0 100644 --- a/minix/tests/blocktest/blocktest.c +++ b/minix/tests/blocktest/blocktest.c @@ -292,7 +292,7 @@ static int sendrec_driver(message *m_ptr, ssize_t exp, result_t *res) return set_result(res, RESULT_OK, 0); } -static void raw_xfer(dev_t minor, u64_t pos, iovec_s_t *iovec, int nr_req, +static void raw_xfer(dev_t minor, uint64_t pos, iovec_s_t *iovec, int nr_req, int write, ssize_t exp, result_t *res) { /* Perform a transfer with a safecopy iovec already supplied. @@ -335,7 +335,7 @@ static void raw_xfer(dev_t minor, u64_t pos, iovec_s_t *iovec, int nr_req, exp - m.m_lblockdriver_lbdev_reply.status); } -static void vir_xfer(dev_t minor, u64_t pos, iovec_t *iovec, int nr_req, +static void vir_xfer(dev_t minor, uint64_t pos, iovec_t *iovec, int nr_req, int write, ssize_t exp, result_t *res) { /* Perform a transfer, creating and revoking grants for the I/O vector. @@ -364,7 +364,7 @@ static void vir_xfer(dev_t minor, u64_t pos, iovec_t *iovec, int nr_req, } } -static void simple_xfer(dev_t minor, u64_t pos, uint8_t *buf, size_t size, +static void simple_xfer(dev_t minor, uint64_t pos, uint8_t *buf, size_t size, int write, ssize_t exp, result_t *res) { /* Perform a transfer involving a single buffer. @@ -878,7 +878,7 @@ static void bad_write(void) buf2_sum = fill_rand(buf2_ptr, buf2_size); buf3_sum = fill_rand(buf3_ptr, buf3_size); - raw_xfer(driver_minor, (u64_t)sector_unalign, iov, 3, TRUE, + raw_xfer(driver_minor, (uint64_t)sector_unalign, iov, 3, TRUE, EINVAL, &res); test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res); @@ -942,11 +942,11 @@ static void vector_and_large_sub(size_t small_size) size_t large_size, buf_size, buf2_size; uint8_t *buf_ptr, *buf2_ptr; iovec_t iovec[NR_IOREQS]; - u64_t base_pos; + uint64_t base_pos; result_t res; int i; - base_pos = (u64_t)sector_size; + base_pos = (uint64_t)sector_size; large_size = small_size * NR_IOREQS; @@ -1202,7 +1202,7 @@ static void misc_ioctl(void) got_result(&res, "ioctl to get partition"); /* The other tests do not check whether there is sufficient room. */ - if (res.type == RESULT_OK && part.size < (u64_t)max_size * 2) + if (res.type == RESULT_OK && part.size < (uint64_t)max_size * 2) output("WARNING: small partition, some tests may fail\n"); /* Test retrieving global driver open count. */ @@ -1264,7 +1264,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* Read one sector up to the partition limit. */ fill_rand(buf_ptr, buf_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, sector_size, FALSE, sector_size, &res); sum = get_sum(buf_ptr, sector_size); @@ -1274,7 +1274,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* Read three sectors up to the partition limit. */ fill_rand(buf_ptr, buf_size); - simple_xfer(sub0_minor, (u64_t)sub_size - buf_size, buf_ptr, buf_size, + simple_xfer(sub0_minor, (uint64_t)sub_size - buf_size, buf_ptr, buf_size, FALSE, buf_size, &res); test_sum(buf_ptr + sector_size * 2, sector_size, sum, TRUE, &res); @@ -1287,7 +1287,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) fill_rand(buf_ptr, buf_size); sum3 = get_sum(buf_ptr + sector_size * 2, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size * 2, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size * 2, buf_ptr, buf_size, FALSE, sector_size * 2, &res); test_sum(buf_ptr, sector_size * 2, sum2, TRUE, &res); @@ -1299,7 +1299,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) fill_rand(buf_ptr, buf_size); sum2 = get_sum(buf_ptr + sector_size, sector_size * 2); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, buf_size, FALSE, sector_size, &res); test_sum(buf_ptr, sector_size, sum, TRUE, &res); @@ -1311,7 +1311,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) sum = fill_rand(buf_ptr, buf_size); sum2 = get_sum(buf_ptr, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size, buf_ptr, sector_size, FALSE, + simple_xfer(sub0_minor, (uint64_t)sub_size, buf_ptr, sector_size, FALSE, 0, &res); test_sum(buf_ptr, sector_size, sum2, TRUE, &res); @@ -1319,7 +1319,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) got_result(&res, "one sector read at partition end"); /* Read three sectors starting at the partition end. */ - simple_xfer(sub0_minor, (u64_t)sub_size, buf_ptr, buf_size, FALSE, 0, + simple_xfer(sub0_minor, (uint64_t)sub_size, buf_ptr, buf_size, FALSE, 0, &res); test_sum(buf_ptr, buf_size, sum, TRUE, &res); @@ -1327,7 +1327,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) got_result(&res, "multisector read at partition end"); /* Read one sector beyond the partition end. */ - simple_xfer(sub0_minor, (u64_t)sub_size + sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size + sector_size, buf_ptr, buf_size, FALSE, 0, &res); test_sum(buf_ptr, sector_size, sum2, TRUE, &res); @@ -1391,7 +1391,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* Write one sector, up to the partition limit. */ sum = fill_rand(buf_ptr, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, sector_size, TRUE, sector_size, &res); got_result(&res, "write up to partition end"); @@ -1399,7 +1399,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* Read back to make sure the results have persisted. */ fill_rand(buf_ptr, sector_size * 2); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size * 2, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size * 2, buf_ptr, sector_size * 2, FALSE, sector_size * 2, &res); test_sum(buf_ptr + sector_size, sector_size, sum, TRUE, &res); @@ -1411,7 +1411,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) sum = get_sum(buf_ptr + sector_size, sector_size); sum3 = get_sum(buf_ptr, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size * 2, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size * 2, buf_ptr, buf_size, TRUE, sector_size * 2, &res); got_result(&res, "write somewhat across partition end"); @@ -1420,7 +1420,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) fill_rand(buf_ptr, buf_size); sum2 = get_sum(buf_ptr + sector_size, sector_size * 2); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, buf_size, FALSE, sector_size, &res); test_sum(buf_ptr, sector_size, sum, TRUE, &res); @@ -1432,7 +1432,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) fill_rand(buf_ptr, buf_size); sum = get_sum(buf_ptr, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, buf_size, TRUE, sector_size, &res); got_result(&res, "write mostly across partition end"); @@ -1440,7 +1440,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) fill_rand(buf_ptr, buf_size); sum2 = get_sum(buf_ptr + sector_size * 2, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size * 2, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size * 2, buf_ptr, buf_size, FALSE, sector_size * 2, &res); test_sum(buf_ptr, sector_size, sum3, TRUE, &res); @@ -1452,13 +1452,13 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* Write one sector at the end of the partition. */ fill_rand(buf_ptr, sector_size); - simple_xfer(sub0_minor, (u64_t)sub_size, buf_ptr, sector_size, TRUE, 0, + simple_xfer(sub0_minor, (uint64_t)sub_size, buf_ptr, sector_size, TRUE, 0, &res); got_result(&res, "write at partition end"); /* Write one sector beyond the end of the partition. */ - simple_xfer(sub0_minor, (u64_t)sub_size + sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size + sector_size, buf_ptr, sector_size, TRUE, 0, &res); got_result(&res, "write beyond partition end"); @@ -1486,7 +1486,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) /* If the last request erroneously succeeded, it would have overwritten * the last sector of the first subpartition. */ - simple_xfer(sub0_minor, (u64_t)sub_size - sector_size, buf_ptr, + simple_xfer(sub0_minor, (uint64_t)sub_size - sector_size, buf_ptr, sector_size, FALSE, sector_size, &res); test_sum(buf_ptr, sector_size, sum, TRUE, &res); @@ -1519,7 +1519,7 @@ static void vir_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs) /* Set, and check, the size of the first subpartition. */ subpart = part; - subpart.size = (u64_t)sub_size; + subpart.size = (uint64_t)sub_size; vir_ioctl(sub0_minor, DIOCSETP, &subpart, OK, &res); @@ -1538,7 +1538,7 @@ static void vir_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs) /* Set, and check, the base and size of the second subpartition. */ subpart = part; subpart.base += sub_size; - subpart.size = (u64_t)sub_size; + subpart.size = (uint64_t)sub_size; vir_ioctl(sub1_minor, DIOCSETP, &subpart, OK, &res); @@ -1669,7 +1669,7 @@ static void real_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs) if (res.type == RESULT_OK && (subpart.base != part.base + sector_size || - subpart.size != (u64_t)part_secs * sector_size)) { + subpart.size != (uint64_t)part_secs * sector_size)) { res.type = RESULT_BADVALUE; res.value = 0; @@ -1681,7 +1681,7 @@ static void real_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs) if (res.type == RESULT_OK && (subpart.base != part.base + (1 + part_secs) * sector_size || - subpart.size != (u64_t)part_secs * sector_size)) { + subpart.size != (uint64_t)part_secs * sector_size)) { res.type = RESULT_BADVALUE; res.value = 0; @@ -1738,7 +1738,7 @@ static void part_limits(void) } -static void unaligned_size_io(u64_t base_pos, uint8_t *buf_ptr, size_t buf_size, +static void unaligned_size_io(uint64_t base_pos, uint8_t *buf_ptr, size_t buf_size, uint8_t *sec_ptr[2], int sectors, int pattern, uint32_t ssum[5]) { /* Perform a single small-element I/O read, write, readback test. @@ -1915,7 +1915,7 @@ static void unaligned_size(void) uint8_t *buf_ptr, *sec_ptr[2]; size_t buf_size; uint32_t sum = 0L, ssum[5]; - u64_t base_pos; + uint64_t base_pos; result_t res; int i; @@ -1933,7 +1933,7 @@ static void unaligned_size(void) */ buf_size = sector_size * 5; - base_pos = (u64_t)sector_size * 2; + base_pos = (uint64_t)sector_size * 2; buf_ptr = alloc_dma_memory(buf_size); sec_ptr[0] = alloc_dma_memory(sector_size); @@ -2013,7 +2013,7 @@ static void unaligned_pos1(void) uint8_t *buf_ptr, *buf2_ptr; size_t buf_size, buf2_size, size; uint32_t sum, sum2; - u64_t base_pos; + uint64_t base_pos; result_t res; test_group("sector-unaligned positions, part one", @@ -2032,7 +2032,7 @@ static void unaligned_pos1(void) */ buf_size = buf2_size = sector_size * 3; - base_pos = (u64_t)sector_size * 3; + base_pos = (uint64_t)sector_size * 3; buf_ptr = alloc_dma_memory(buf_size); buf2_ptr = alloc_dma_memory(buf2_size); @@ -2162,7 +2162,7 @@ static void unaligned_pos2(void) uint8_t *buf_ptr, *buf2_ptr; size_t buf_size, buf2_size, max_block; uint32_t sum = 0L, sum2 = 0L, rsum[NR_IOREQS]; - u64_t base_pos; + uint64_t base_pos; iovec_t iov[NR_IOREQS]; result_t res; int i; @@ -2177,7 +2177,7 @@ static void unaligned_pos2(void) buf_size = buf2_size = max_size + sector_size; - base_pos = (u64_t)sector_size * 3; + base_pos = (uint64_t)sector_size * 3; buf_ptr = alloc_dma_memory(buf_size); buf2_ptr = alloc_dma_memory(buf2_size); @@ -2293,7 +2293,7 @@ static void unaligned_pos2(void) free_dma_memory(buf_ptr, buf_size); } -static void sweep_area(u64_t base_pos) +static void sweep_area(uint64_t base_pos) { /* Go over an eight-sector area from left (low address) to right (high * address), reading and optionally writing in three-sector chunks, and @@ -2382,7 +2382,7 @@ static void sweep_area(u64_t base_pos) free_dma_memory(buf_ptr, buf_size); } -static void sweep_and_check(u64_t pos, int check_integ) +static void sweep_and_check(uint64_t pos, int check_integ) { /* Perform an area sweep at the given position. If asked for, get an * integrity checksum over the beginning of the disk (first writing @@ -2443,7 +2443,7 @@ static void basic_sweep(void) test_group("basic area sweep", TRUE); - sweep_area((u64_t)sector_size); + sweep_area((uint64_t)sector_size); } static void high_disk_pos(void) @@ -2456,7 +2456,7 @@ static void high_disk_pos(void) * this test, the partition must start below 4GB and end above 4GB, * with at least four sectors on each side. */ - u64_t base_pos; + uint64_t base_pos; base_pos = 0x100000000ULL | (sector_size * 4); base_pos -= base_pos % sector_size; @@ -2490,7 +2490,7 @@ static void high_part_pos(void) * This requires the partition to be more than 4GB in size; we need an * additional 4 sectors, to be exact. */ - u64_t base_pos; + uint64_t base_pos; /* If the partition starts at the beginning of the disk, this test is * no different from the high disk position test. @@ -2526,7 +2526,7 @@ static void high_lba_pos1(void) * the other side. The partition that we're operating on, must cover * this area. */ - u64_t base_pos; + uint64_t base_pos; base_pos = (1ULL << 24) * sector_size; @@ -2560,7 +2560,7 @@ static void high_lba_pos2(void) * same considerations as above apply, except that we now need a 128+GB * partition. */ - u64_t base_pos; + uint64_t base_pos; base_pos = (1ULL << 28) * sector_size; diff --git a/minix/tests/test53.c b/minix/tests/test53.c index 48f7c6e42..123cbfdd6 100644 --- a/minix/tests/test53.c +++ b/minix/tests/test53.c @@ -15,7 +15,7 @@ int max_error = 4; static volatile int expect_SIGFPE; -static u64_t i, j, k; +static uint64_t i, j, k; static jmp_buf jmpbuf_SIGFPE, jmpbuf_main; static void err(int line) @@ -33,7 +33,7 @@ static void err(int line) #define LENGTHOF(arr) (sizeof(arr) / sizeof(arr[0])) -static u64_t getargval(int index, int *done) +static uint64_t getargval(int index, int *done) { uint32_t values[] = { /* corner cases */ @@ -110,10 +110,10 @@ static void handler_SIGFPE(int signum) exit(-1); } -static inline int bsr64(u64_t i) +static inline int bsr64(uint64_t i) { int index; - u64_t mask; + uint64_t mask; for (index = 63, mask = 1ULL << 63; index >= 0; --index, mask >>= 1) { if (i & mask) @@ -127,7 +127,7 @@ static void testmul(void) { int kdone, kidx; uint32_t ilo = ex64lo(i), jlo = ex64lo(j); - u64_t prod = i * j; + uint64_t prod = i * j; int prodbits; /* compute maximum index of highest-order bit */ @@ -137,7 +137,7 @@ static void testmul(void) /* compare to 32-bit multiplication if possible */ if (ex64hi(i) == 0 && ex64hi(j) == 0) { - if (prod != (u64_t)ilo * jlo) ERR; + if (prod != (uint64_t)ilo * jlo) ERR; /* if there is no overflow we can check against pure 32-bit */ if (prodbits < 32 && prod != ilo * jlo) ERR; @@ -166,7 +166,7 @@ static void testmul(void) } } -static void do_not_optimize_away(volatile u64_t * ptr) +static void do_not_optimize_away(volatile uint64_t * ptr) { /* TODO: does this actually do the job? */ @@ -176,7 +176,7 @@ static void do_not_optimize_away(volatile u64_t * ptr) static void testdiv0(void) { int funcidx; - u64_t res; + uint64_t res; assert(j == 0); @@ -194,7 +194,7 @@ static void testdiv0(void) default: assert(0); ERR; break; } - do_not_optimize_away((volatile u64_t *)&res); + do_not_optimize_away((volatile uint64_t *)&res); /* if we reach this point there was no signal and an * error has been recorded @@ -211,7 +211,7 @@ static void testdiv0(void) static void testdiv(void) { - u64_t q, r; + uint64_t q, r; #if TIMED struct timeval tvstart, tvend; diff --git a/minix/tests/test71.c b/minix/tests/test71.c index 13f93d522..2d7c57cdd 100644 --- a/minix/tests/test71.c +++ b/minix/tests/test71.c @@ -26,7 +26,7 @@ int dowriteblock(int b, int blocksize, uint32_t seed, char *data) { - u64_t offset; + uint64_t offset; int fd; get_fd_offset(b, blocksize, &offset, &fd); @@ -42,7 +42,7 @@ dowriteblock(int b, int blocksize, uint32_t seed, char *data) int readblock(int b, int blocksize, uint32_t seed, char *data) { - u64_t offset; + uint64_t offset; int fd; get_fd_offset(b, blocksize, &offset, &fd); diff --git a/minix/tests/test72.c b/minix/tests/test72.c index dec7c2c6b..5f25a655d 100644 --- a/minix/tests/test72.c +++ b/minix/tests/test72.c @@ -104,7 +104,7 @@ static void allocate(int b) /* Fake some libblockdriver functions */ ssize_t -bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) +bdev_gather(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags) { int i, block; size_t size, block_off; @@ -133,7 +133,7 @@ bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) } ssize_t -bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) +bdev_scatter(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags) { int i, block; size_t size, block_off; @@ -162,7 +162,7 @@ bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags) } ssize_t -bdev_read(dev_t dev, u64_t pos, char *data, size_t count, int flags) +bdev_read(dev_t dev, uint64_t pos, char *data, size_t count, int flags) { int block; diff --git a/minix/tests/test74.c b/minix/tests/test74.c index 3ea440ef1..61459f4ec 100644 --- a/minix/tests/test74.c +++ b/minix/tests/test74.c @@ -53,7 +53,7 @@ int max_error = 0; /* make all e()'s fatal */ int dowriteblock(int b, int blocksize, uint32_t seed, char *data) { - u64_t offset; + uint64_t offset; int fd; get_fd_offset(b, blocksize, &offset, &fd); @@ -69,7 +69,7 @@ dowriteblock(int b, int blocksize, uint32_t seed, char *data) int readblock(int b, int blocksize, uint32_t seed, char *data) { - u64_t offset; + uint64_t offset; int fd; char *mmapdata; int pread_first = random() % 2; diff --git a/minix/tests/testcache.c b/minix/tests/testcache.c index 4a8526ec8..e3d285aed 100644 --- a/minix/tests/testcache.c +++ b/minix/tests/testcache.c @@ -147,7 +147,7 @@ dotest(int blocksize, int nblocks, int iterations) assert(nblocks > 0 && nblocks <= MAXBLOCKS); - mb = (int) ((u64_t) blocksize * nblocks / 1024 / 1024); + mb = (int) ((uint64_t) blocksize * nblocks / 1024 / 1024); if(!quietflag) { fprintf(stderr, "test: %d * %d = %dMB\n", blocksize, nblocks, mb); } @@ -213,9 +213,9 @@ dotest(int blocksize, int nblocks, int iterations) } void -get_fd_offset(int b, int blocksize, u64_t *file_offset, int *fd) +get_fd_offset(int b, int blocksize, uint64_t *file_offset, int *fd) { - u64_t offset = (u64_t) b * blocksize; + uint64_t offset = (uint64_t) b * blocksize; int filenumber; filenumber = offset / MB / MBPERFILE; diff --git a/minix/tests/testcache.h b/minix/tests/testcache.h index 93285d9d9..798738236 100644 --- a/minix/tests/testcache.h +++ b/minix/tests/testcache.h @@ -16,7 +16,7 @@ int readblock(int b, int blocksize, uint32_t seed, char *block); void testend(void); int dotest(int blocksize, int nblocks, int iterations); void cachequiet(int quiet); -void get_fd_offset(int b, int blocksize, u64_t *file_offset, int *fd); +void get_fd_offset(int b, int blocksize, uint64_t *file_offset, int *fd); void makefiles(int n); #define OK_BLOCK_GONE -999 @@ -30,7 +30,7 @@ void makefiles(int n); */ #define MBPERFILE 2000 #define MB (1024*1024) -#define MAXFILES ((u64_t) MAXBLOCKS * MAXBLOCKSIZE / MB / MBPERFILE + 1) +#define MAXFILES ((uint64_t) MAXBLOCKS * MAXBLOCKSIZE / MB / MBPERFILE + 1) extern int fds[MAXFILES], bigflag; diff --git a/minix/tests/testvm.c b/minix/tests/testvm.c index f29be593d..1cd843d4c 100644 --- a/minix/tests/testvm.c +++ b/minix/tests/testvm.c @@ -29,7 +29,7 @@ int dowriteblock(int b, int blocksize, uint32_t seed, char *block) int r; char *bdata; int mustset = 0; - u64_t dev_off = (u64_t) b * blocksize; + uint64_t dev_off = (uint64_t) b * blocksize; if((bdata = vm_map_cacheblock(MYDEV, dev_off, VMC_NO_INODE, 0, NULL, blocksize)) == MAP_FAILED) { @@ -60,7 +60,7 @@ int dowriteblock(int b, int blocksize, uint32_t seed, char *block) int readblock(int b, int blocksize, uint32_t seed, char *block) { char *bdata; - u64_t dev_off = (u64_t) b * blocksize; + uint64_t dev_off = (uint64_t) b * blocksize; if((bdata = vm_map_cacheblock(MYDEV, dev_off, VMC_NO_INODE, 0, NULL, blocksize)) == MAP_FAILED) { diff --git a/minix/usr.bin/mtop/mtop.c b/minix/usr.bin/mtop/mtop.c index 0bbfe0e18..df8e48652 100644 --- a/minix/usr.bin/mtop/mtop.c +++ b/minix/usr.bin/mtop/mtop.c @@ -74,7 +74,7 @@ struct proc { int p_flags; endpoint_t p_endpoint; pid_t p_pid; - u64_t p_cpucycles[CPUTIMENAMES]; + uint64_t p_cpucycles[CPUTIMENAMES]; int p_priority; endpoint_t p_blocked; clock_t p_user_time; @@ -258,7 +258,7 @@ static int print_proc_summary(struct proc *pproc) struct tp { struct proc *p; - u64_t ticks; + uint64_t ticks; }; static int cmp_procs(const void *v1, const void *v2) @@ -316,7 +316,7 @@ static struct tp *lookup(endpoint_t who, struct tp *tptab, int np) double ktotal = 0; -static void print_proc(struct tp *tp, u64_t total_ticks) +static void print_proc(struct tp *tp, uint64_t total_ticks) { int euid = 0; static struct passwd *who = NULL; @@ -369,10 +369,10 @@ static char *cputimemodename(int cputimemode) return name; } -static u64_t cputicks(struct proc *p1, struct proc *p2, int timemode) +static uint64_t cputicks(struct proc *p1, struct proc *p2, int timemode) { int i; - u64_t t = 0; + uint64_t t = 0; for(i = 0; i < CPUTIMENAMES; i++) { if(!CPUTIME(timemode, i)) continue; @@ -399,11 +399,11 @@ static void print_procs(int maxlines, struct proc *proc1, struct proc *proc2, int cputimemode) { int p, nprocs; - u64_t idleticks = 0; - u64_t kernelticks = 0; - u64_t systemticks = 0; - u64_t userticks = 0; - u64_t total_ticks = 0; + uint64_t idleticks = 0; + uint64_t kernelticks = 0; + uint64_t systemticks = 0; + uint64_t userticks = 0; + uint64_t total_ticks = 0; int blockedseen = 0; static struct tp *tick_procs = NULL; @@ -417,7 +417,7 @@ static void print_procs(int maxlines, } for(p = nprocs = 0; p < nr_total; p++) { - u64_t uticks; + uint64_t uticks; if(!(proc2[p].p_flags & USED)) continue; tick_procs[nprocs].p = proc2 + p; diff --git a/minix/usr.sbin/fbdctl/fbdctl.c b/minix/usr.sbin/fbdctl/fbdctl.c index 9c29df780..08b1d6f5b 100644 --- a/minix/usr.sbin/fbdctl/fbdctl.c +++ b/minix/usr.sbin/fbdctl/fbdctl.c @@ -112,7 +112,7 @@ do_list(int fd) } static int -scan_hex64(char * input, u64_t * val) +scan_hex64(char * input, uint64_t * val) { uint32_t lo, hi; char buf[9]; @@ -139,7 +139,7 @@ scan_hex64(char * input, u64_t * val) } static int -scan_range(char * input, u64_t * start, u64_t * end, int need_end) +scan_range(char * input, uint64_t * start, uint64_t * end, int need_end) { char *p;