Allows kernel extensions to set the u t _error field in the u area.
#include <sys/types.h> #include <sys/errno.h>
int setuerror (errno) int errno;
errno | Contains a value found in the /usr/include/sys/errno.h file that is to be copied to the current thread u t _error field. |
The setuerror kernel service allows a kernel extension in a process environment to set the u t _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 u t _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.
The setuerror kernel service is part of Base Operating System (BOS) Runtime.
The getuerror kernel service.
Kernel Extension and Device Driver Management Kernel Services and Understanding System Call Execution in AIX Kernel Extensions and Device Support Programming Concepts.