[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

getuerror Kernel Service

Purpose

Allows kernel extensions to retrieve the current value of the u t _error field.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int getuerror ()

Description

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.

Execution Environment

The getuerror kernel service can be called from the process environment only.

Return Values

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.

Implementation Specifics

The getuerror kernel service is part of Base Operating System (BOS) Runtime.

Related Information

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.


[ Previous | Next | Contents | Home | Search ]