Retrieves a word of data from user memory.
#include <sys/types.h>
#include <sys/errno.h>
int fuword ( uaddr)
int *uaddr;
Item | Description |
---|---|
uaddr | Specifies the address of user data. |
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:
The fuword service should be called only while executing in kernel mode in the user process.
The fuword kernel service can be called from the process environment only.
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:
For the fuword service, a retrieved value of -1 and a return code of -1 are indistinguishable.