.TH set_user_error() "" "" "DDI/DKI Kernel Function"
.PC "Set an error code in the user space"
.B "#include <sys/errno.h>"
\fBvoid set_user_error(\fIerror\^\fB)\fR
\fBint \fIerror\^\fB;\fR
.PP
Function
.B set_user_error()
writes code
.I error
into the user space, where it can be examined by the process
that owns that space.
.PP
This function replaces setting field
.B u_error
in the
.B UPROC
structure.
Note that this field no longer exists, and therefore can no longer be
modified or examined directly.
.SH "See Also"
.B
DDI/DKI kernel routines
.R
.SH Notes
Please note that like sleeping and some other situation,
your driver can set the user error status only when
user control is valid.
A driver can call
.B set_user_error()
only from within driver functions invoked through the system calls
.BR open() ,
.BR close() ,	
.BR read() ,
.BR write() ,
.BR ioctl() ,
and
.BR poll() .
