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

Technical Reference: Kernel and Subsystems, Volume 1

suword Kernel Service

Purpose

Stores a word of data in user memory.

Syntax

#include <sys/types.h>
#include <sys/errno.h>


int suword ( uaddr, w)
int *uaddr;
int w;

Parameters

uaddr Specifies the address of user data.
w Specifies the word to store.

Description

The suword kernel service stores a word of data at the specified address in user memory. It is provided so that system calls and device heads can safely access user data. The suword service ensures that the user had the appropriate authority to:

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

Execution Environment

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

Return Values

0 Indicates successful completion.
-1 Indicates a uaddr parameter that is not valid for one of these reasons:
  • The user does not have sufficient authority to access the data.
  • The address is not valid.
  • An I/O error occurs when the user data is referenced.

Related Information

The fubyte kernel service, fuword kernel service, subyte kernel service.

Memory Kernel Services and Accessing User-Mode Data While in Kernel Mode 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 ]