FETCH(9) Kernel Developer's Manual FETCH(9)

fetch, fubyte, fuibyte, fuiword, fulong, fuulong, fuwordfetch data from user-space

#include <sys/types.h>
#include <sys/time.h>
#include <sys/systm.h>
#include <sys/resourcevar.h>

int
fubyte(const user_addr_t addr);

int
fuibyte(const user_addr_t addr);

int
fuiword(user_addr_t addr);

int64_t
fulong(user_addr_t addr);

uint64_t
fuulong(user_addr_t addr);

int
fuword(user_addr_t addr);

The fetch functions are designed to copy small amounts of data from user-space.

The fetch routines provide the following functionality:

()
Fetches a byte of data from the user-space address addr.
()
Fetches a byte of data from the user-space address addr. This function is safe to call during an interrupt context.
()
Fetches a word of data from the user-space address addr. This function is safe to call during an interrupt context.
()
Fetches a long word of data from the user-space address addr.
()
Fetches a unsigned long word of data from the user-space address addr.
()
Fetches a word of data from the user-space address addr.

The fetch functions return the data fetched or -1 on failure.

copy(9), store(9)

December 16, 2004 macOS 14.5