[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

setuerror Kernel Service

Purpose

Allows kernel extensions to set the ut_error field for the current thread.

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 ut_error field.

Description

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.

Execution Environment

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

Return Codes

The setuerror kernel service returns the errno parameter.

Related Information

The getuerror kernel service.

Kernel Extension and Device Driver Management Kernel Services and Understanding System Call Execution in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]