tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Reusing of struct uio in soo_read()



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




Home | Main Index | Thread Index | Old Index