#include <sys/uio.h> #include <sys/ddi.h>
int uwritec(uio_t *uiop);
uio_segflg member of the uio structure specifies
the type of space from which the copy is made.
uio_segflg is set to UIO_SYSSPACE the character is
copied from a kernel address.
uio_segflg is set to UIO_USERSPACE the character is
copied from a user address.
If the character is successfully copied, uwritec updates the
appropriate members of the uio and
structures to reflect the copy (
are incremented and
iov_len are decremented)
and returns the character to the caller.
uio_segflgis set to UIO_USERSPACE.
Non-blockable, interrupt, user, or blockable
uio_segflg is set to UIO_SYSSPACE.
When holding locks across calls to this function, multithreaded drivers must be careful to avoid creating a deadlock. During the data transfer, page fault resolution might result in another I/O to the same device. For example, this could occur if the driver controls the disk drive used as the swap device.