Allows kernel extensions to set the ut_error field for the current thread.
#include <sys/types.h>
#include <sys/errno.h>
int setuerror ( errno)
int errno;
Item | Description |
---|---|
errno | Contains a value found in the /usr/include/sys/errno.h file that is to be copied to the current thread ut_error field. |
The setuerror kernel service allows a kernel extension in a process environment to set the ut_error field in current thread's uthread structure. Kernel extensions providing system calls available to user-mode applications typically use this service. For system calls, the value of the ut_error field in the per thread uthread structure is copied to the errno global variable by the system call handler before returning to the caller.
The setuerror kernel service can be called from the process environment only.
The setuerror kernel service returns the errno parameter.