Allows kernel extensions to retrieve the current value of the u t _error field.
#include <sys/types.h> #include <sys/errno.h>
int getuerror ()
The getuerror kernel service allows a kernel extension in a process environment to retrieve the current value of the current thread's ut_error field. Kernel extensions can use the getuerror service when using system calls or other kernel services that return error information in the u t _error field.
For system calls, the system call handler copies the value of the u t _error field in the per thread uthread structure to the errno global variable before returning to the caller. However, when kernel services use available system calls, the system call handler is bypassed. The getuerror service must then be used to obtain error information.
The getuerror kernel service can be called from the process environment only.
0 | Indicates a successful operation. |
When an error occurs, the getuerror kernel service returns the current value of the u t _error field in the per thread uthread structure. Possible return values for this field are defined in the /usr/include/sys/errno.h file.
The getuerror kernel service is part of Base Operating System (BOS) Runtime.
The setuerror kernel service.
Kernel Extension and Device Driver Management Kernel Services and Understanding System Call Execution in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.