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

setuerror Kernel Service

Purpose

Allows kernel extensions to set the u t _error field in the u area.

Syntax

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

Parameter

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.

Description

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.

Execution Environment

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

Return Codes

The setuerror kernel service returns the errno parameter.

Implementation Specifics

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

Related Information

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.


[ Previous | Next | Contents | Home | Search ]