carta
fuswintr(9freebsd)

fuswintr9freebsd

Fetch data from user-space

Part of fetch(9freebsd).

Usage

int

long

int

int32_t

int64_t

long

int32_t

int64_t

int

Overview

The fetch functions are designed to copy small amounts of data from user-space of the current process. If read is successful, it is performed atomically. The data read must be naturally aligned.

The fetch routines provide the following functionality:

fubyte()

Fetches a byte of data from the user-space address base. The byte read is zero-extended into the results variable.

fuword()

Fetches a word of data (long) from the user-space address base.

fuword16()

Fetches 16 bits of data from the user-space address base. The half-word read is zero-extended into the results variable.

fuword32()

Fetches 32 bits of data from the user-space address base.

fuword64()

Fetches 64 bits of data from the user-space address base.

fuswintr()

Fetches a short word of data from the user-space address base. This function is safe to call during an interrupt context.

fueword()

Fetches a word of data (long) from the user-space address base and stores the result in the variable pointed by val.

fueword32()

Fetches 32 bits of data from the user-space address base and stores the result in the variable pointed by val.

fueword64()

Fetches 64 bits of data from the user-space address base and stores the result in the variable pointed by val.

The callers of fuword(), fuword32() and fuword64() functions cannot distinguish between -1 read from userspace and function failure.

Return values

The fubyte(), fuword(), fuword16(), fuword32(), fuword64(), and fuswintr() functions return the data fetched or -1 on failure. The fueword(), fueword32() and fueword64() functions return 0 on success and -1 on failure.

History

  • Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)

From freebsd-manpages 11.0-1 in Debian 9 (Stretch). Parsed by carta from the page's mdoc source.