Reusing of struct uio in soo_read()

Peter Skvarka <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Organization Soft in Engines
Message-ID <[email protected]>
Hello,

I am using function soo_read() in kernel thread:

struct uio my_uio;
...initializing my_uio
while(...) {
   soo_recv(file_fd, NULL, &my_uio, NULL, 0);
   ...
}

I use it in a loop for receiving small messages.

How to reuse struct uio after soo_recv() to receive next data again on 
the beginning of iovec.iov_base buffer ? (if possible)

Reseting members:
.uio_resid
.uio_iov.iovec.iov_len
.uio_offset

to originally initialized values does not help.
Only way I found is to put another initialized struct uio like third 
parameter.

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.