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

Item Description
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.