Convert one of our main caddr_t consumers, uiomove(9), to void *.
This commit is contained in:
parent
f9be0dee1e
commit
d5279f20c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111739
@ -126,7 +126,7 @@ vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr,
|
|||||||
#endif /* ZERO_COPY_SOCKETS */
|
#endif /* ZERO_COPY_SOCKETS */
|
||||||
|
|
||||||
int
|
int
|
||||||
uiomove(caddr_t cp, int n, struct uio *uio)
|
uiomove(void *cp, int n, struct uio *uio)
|
||||||
{
|
{
|
||||||
struct thread *td = curthread;
|
struct thread *td = curthread;
|
||||||
struct iovec *iov;
|
struct iovec *iov;
|
||||||
@ -183,7 +183,7 @@ uiomove(caddr_t cp, int n, struct uio *uio)
|
|||||||
iov->iov_len -= cnt;
|
iov->iov_len -= cnt;
|
||||||
uio->uio_resid -= cnt;
|
uio->uio_resid -= cnt;
|
||||||
uio->uio_offset += cnt;
|
uio->uio_offset += cnt;
|
||||||
cp += cnt;
|
cp = (char *)cp + cnt;
|
||||||
n -= cnt;
|
n -= cnt;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
@ -202,7 +202,7 @@ uiomove(caddr_t cp, int n, struct uio *uio)
|
|||||||
* Experimental support for zero-copy I/O
|
* Experimental support for zero-copy I/O
|
||||||
*/
|
*/
|
||||||
static int
|
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)
|
int disposable)
|
||||||
{
|
{
|
||||||
struct iovec *iov;
|
struct iovec *iov;
|
||||||
@ -281,7 +281,7 @@ userspaceco(caddr_t cp, u_int cnt, struct uio *uio, struct vm_object *obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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)
|
int disposable)
|
||||||
{
|
{
|
||||||
struct iovec *iov;
|
struct iovec *iov;
|
||||||
@ -329,7 +329,7 @@ uiomoveco(caddr_t cp, int n, struct uio *uio, struct vm_object *obj,
|
|||||||
iov->iov_len -= cnt;
|
iov->iov_len -= cnt;
|
||||||
uio->uio_resid -= cnt;
|
uio->uio_resid -= cnt;
|
||||||
uio->uio_offset += cnt;
|
uio->uio_offset += cnt;
|
||||||
cp += cnt;
|
cp = (char *)cp + cnt;
|
||||||
n -= cnt;
|
n -= cnt;
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -86,8 +86,8 @@ struct uio {
|
|||||||
struct vm_object;
|
struct vm_object;
|
||||||
|
|
||||||
void uio_yield(void);
|
void uio_yield(void);
|
||||||
int uiomove(caddr_t, int, struct uio *);
|
int uiomove(void *, int, struct uio *);
|
||||||
int uiomoveco(caddr_t, int, struct uio *, struct vm_object *, int);
|
int uiomoveco(void *, int, struct uio *, struct vm_object *, int);
|
||||||
int uioread(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 copyinfrom(const void *src, void *dst, size_t len, int seg);
|
||||||
int copyinstrfrom(const void *src, void *dst, size_t len,
|
int copyinstrfrom(const void *src, void *dst, size_t len,
|
||||||
|
Loading…
Reference in New Issue
Block a user