diff options
author | des <des@FreeBSD.org> | 2003-03-02 15:29:13 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-03-02 15:29:13 +0000 |
commit | 19059f175da473ecef83a9691f493219cb06fe58 (patch) | |
tree | 3d0912e36e74a2ab2e21179eede696a320e16a33 | |
parent | 12921dbf827b4063b6fd0fee5595e1304de9311f (diff) | |
download | FreeBSD-src-19059f175da473ecef83a9691f493219cb06fe58.zip FreeBSD-src-19059f175da473ecef83a9691f493219cb06fe58.tar.gz |
Convert one of our main caddr_t consumers, uiomove(9), to void *.
-rw-r--r-- | sys/kern/kern_subr.c | 10 | ||||
-rw-r--r-- | sys/sys/uio.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index c8d3ed0..a4bbcee 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -126,7 +126,7 @@ vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr, #endif /* ZERO_COPY_SOCKETS */ int -uiomove(caddr_t cp, int n, struct uio *uio) +uiomove(void *cp, int n, struct uio *uio) { struct thread *td = curthread; struct iovec *iov; @@ -183,7 +183,7 @@ uiomove(caddr_t cp, int n, struct uio *uio) iov->iov_len -= cnt; uio->uio_resid -= cnt; uio->uio_offset += cnt; - cp += cnt; + cp = (char *)cp + cnt; n -= cnt; } out: @@ -202,7 +202,7 @@ out: * Experimental support for zero-copy I/O */ static int -userspaceco(caddr_t cp, u_int cnt, struct uio *uio, struct vm_object *obj, +userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj, int disposable) { struct iovec *iov; @@ -281,7 +281,7 @@ userspaceco(caddr_t cp, u_int cnt, struct uio *uio, struct vm_object *obj, } int -uiomoveco(caddr_t cp, int n, struct uio *uio, struct vm_object *obj, +uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj, int disposable) { struct iovec *iov; @@ -329,7 +329,7 @@ uiomoveco(caddr_t cp, int n, struct uio *uio, struct vm_object *obj, iov->iov_len -= cnt; uio->uio_resid -= cnt; uio->uio_offset += cnt; - cp += cnt; + cp = (char *)cp + cnt; n -= cnt; } return (0); diff --git a/sys/sys/uio.h b/sys/sys/uio.h index 88575ac..8604360 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -86,8 +86,8 @@ struct uio { struct vm_object; void uio_yield(void); -int uiomove(caddr_t, int, struct uio *); -int uiomoveco(caddr_t, int, struct uio *, struct vm_object *, int); +int uiomove(void *, int, struct uio *); +int uiomoveco(void *, int, struct uio *, struct vm_object *, int); int uioread(int, struct uio *, struct vm_object *, int *); int copyinfrom(const void *src, void *dst, size_t len, int seg); int copyinstrfrom(const void *src, void *dst, size_t len, |