diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-28 12:16:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-28 12:16:35 +0000 |
commit | b37b81cfca9ff2e0e829ab2cea5294a307877e82 (patch) | |
tree | af2a1a88a7cc3ab490635f0eb97487a27d16b68e /sys/vm/device_pager.c | |
parent | e03354c0b9b1329837646f6357a67ba29949753a (diff) |
thread changes
Diffstat (limited to 'sys/vm/device_pager.c')
-rw-r--r-- | sys/vm/device_pager.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index f9ed52ca747..c62bf53cc20 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -108,7 +108,7 @@ dev_pager_alloc(handle, size, prot, foff) { dev_t dev; vm_pager_t pager; - int (*mapfunc)(); + int (*mapfunc) __P((dev_t, int, int)); vm_object_t object; dev_pager_t devp; int npages, off; @@ -131,7 +131,9 @@ dev_pager_alloc(handle, size, prot, foff) */ dev = (dev_t)(long)handle; mapfunc = cdevsw[major(dev)].d_mmap; - if (mapfunc == NULL || mapfunc == enodev || mapfunc == nullop) + if (mapfunc == NULL || + mapfunc == (int (*) __P((dev_t, int, int))) enodev || + mapfunc == (int (*) __P((dev_t, int, int))) nullop) return(NULL); /* @@ -194,7 +196,7 @@ top: TAILQ_INSERT_TAIL(&dev_pager_list, pager, pg_list); #ifdef DEBUG if (dpagerdebug & DDB_ALLOC) { - printf("dev_pager_alloc: pager %x devp %x object %x\n", + printf("dev_pager_alloc: pager %p devp %p object %p\n", pager, devp, object); vm_object_print(object, FALSE); } @@ -224,7 +226,7 @@ dev_pager_dealloc(pager) #ifdef DEBUG if (dpagerdebug & DDB_FOLLOW) - printf("dev_pager_dealloc(%x)\n", pager); + printf("dev_pager_dealloc(%p)\n", pager); #endif TAILQ_REMOVE(&dev_pager_list, pager, pg_list); /* @@ -236,7 +238,7 @@ dev_pager_dealloc(pager) object = devp->devp_object; #ifdef DEBUG if (dpagerdebug & DDB_ALLOC) - printf("dev_pager_dealloc: devp %x object %x\n", devp, object); + printf("dev_pager_dealloc: devp %p object %p\n", devp, object); #endif /* * Free up our fake pages. @@ -260,12 +262,12 @@ dev_pager_getpage(pager, mlist, npages, sync) vm_offset_t offset, paddr; vm_page_t page; dev_t dev; - int (*mapfunc)(), prot; + int (*mapfunc) __P((dev_t, int, int)), prot; vm_page_t m; #ifdef DEBUG if (dpagerdebug & DDB_FOLLOW) - printf("dev_pager_getpage(%x, %x, %x, %x)\n", + printf("dev_pager_getpage(%p, %p, %x, %x)\n", pager, mlist, npages, sync); #endif @@ -279,7 +281,9 @@ dev_pager_getpage(pager, mlist, npages, sync) prot = PROT_READ; /* XXX should pass in? */ mapfunc = cdevsw[major(dev)].d_mmap; #ifdef DIAGNOSTIC - if (mapfunc == NULL || mapfunc == enodev || mapfunc == nullop) + if (mapfunc == NULL || + mapfunc == (int (*) __P((dev_t, int, int))) enodev || + mapfunc == (int (*) __P((dev_t, int, int))) nullop) panic("dev_pager_getpage: no map function"); #endif paddr = pmap_phys_address((*mapfunc)(dev, (int)offset, prot)); @@ -316,7 +320,7 @@ dev_pager_putpage(pager, mlist, npages, sync) { #ifdef DEBUG if (dpagerdebug & DDB_FOLLOW) - printf("dev_pager_putpage(%x, %x, %x, %x)\n", + printf("dev_pager_putpage(%p, %p, %x, %x)\n", pager, mlist, npages, sync); #endif if (pager == NULL) |