Manual browser: fubyte(9)
|FETCH(9)||Kernel Developer's Manual||FETCH(9)|
NAMEfetch, fubyte, fuibyte, fusword, fuswintr, fuword, fuiword — fetch data from user-space
fubyte(const void *base);
fusword(const void *base);
fuswintr(const void *base);
fuword(const void *base);
DESCRIPTIONThe 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 base.
- Fetches a short word of data from the user-space address base.
- Fetches a short word of data from the user-space address base. This function is safe to call during an interrupt context.
- Fetches a word of data from the user-space address base.
RETURN VALUESThe fetch functions return the data fetched or -1 on failure. Note that these functions all do "unsigned" access, and therefore will never sign extend byte or short values. This prevents ambiguity with the error return value for all functions except fuword().
BUGSThe function fuword() has no way to unambiguously signal an error, because the data it reads might legitimately be the same as the -1 used to indicate an error. The other functions do not have this problem because the unsigned values returned by those can never match the -1 error return value.
|January 7, 1996||NetBSD 7.0|