fuword Kernel Service
Purpose
Retrieves a word of data from user memory.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
int fuword ( uaddr)
int *uaddr;
int *uaddr;
Parameter
Item | Description |
---|---|
uaddr | Specifies the address of user data. |
Description
The fuword kernel service retrieves a word 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 fuword service ensures that the user had the appropriate authority to:
- Access the data.
- Protect the operating system from paging I/O errors on user data.
The fuword service should be called only while executing in kernel mode in the user process.
Execution Environment
The fuword kernel service can be called from the process environment only.
Return Values
When successful, the fuword service returns the specified word of data.
Item | Description |
---|---|
-1 | Indicates a uaddr parameter that is not valid. |
The access is not valid under the following circumstances:
- The user does not have sufficient authority to access the data.
- The address is not valid.
- An I/O error occurred while referencing the user data.
For the fuword service, a retrieved value of -1 and a return code of -1 are indistinguishable.