fubyte Kernel Service

Purpose

Retrieves a byte of data from user memory.

Syntax

#include <sys/types.h> #include <sys/errno.h> int fubyte ( uaddr) uchar *uaddr;

Parameter

Item Description
uaddr Specifies the address of the user data.

Description

The fubyte kernel service fetches, or retrieves, a byte of data from the specified address in user memory. It is provided so that system calls and device heads can safely access user data. The fubyte service ensures that the user has the appropriate authority to:

The fubyte service should be called only while executing in kernel mode in the user process.

Execution Environment

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

Return Values

When successful, the fubyte service returns the specified byte.

Item Description
-1 Indicates a uaddr parameter that is not valid.

The access is not valid under the following circumstances: