fuword(9) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

fuword(9)

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

NAME
     fetch, fubyte, fuword, fuword16, fuword32, fuword64, fueword, fueword32,
     fueword64 — fetch data from user-space

SYNOPSIS
     #include <sys/types.h>
     #include <sys/systm.h>

     int
     fubyte(volatile const void *base);

     long
     fuword(volatile const void *base);

     int
     fuword16(volatile const void *base);

     int32_t
     fuword32(volatile const void *base);

     int64_t
     fuword64(volatile const void *base);

     long
     fueword(volatile const void *base, long *val);

     int32_t
     fueword32(volatile const void *base, int32_t *val);

     int64_t
     fueword64(volatile const void *base, int64_t *val);

     #include <sys/resourcevar.h>

DESCRIPTION
     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 vari‐
                  able.

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

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

     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 dis‐
     tinguish between -1 read from userspace and function failure.

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

SEE ALSO
     copy(9), store(9)

BSD                             April 17, 2018                             BSD
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3