put_user(9)

put_user9

Write a simple value into user space.

Usage

put_user(x, ptr);

Arguments

x

Value to copy to user space.

ptr

Destination address, in user space.

Context

User context only. This function may sleep.

Overview

This macro copies a single simple value from kernel space to user space. It supports simple types like char and int, but not larger data types like structures or arrays.

ptr must have pointer-to-simple-variable type, and x must be assignable to the result of dereferencing ptr.

Returns zero on success, or -EFAULT on error.

Releases

2 releases since Debian 4.0 (Etch); the text changed 1 time.

  1. 4.0
  2. 5.0

From linux-manual-2.6.26 2.6.26-29 in Debian 5.0 (Lenny). Parsed by carta from the page's man source.