Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/fetch.9
Show All 28 Lines | |||||
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||||
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||||
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 23, 2020 | .Dd July 22, 2021 | ||||
.Dt FETCH 9 | .Dt FETCH 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm fetch , | .Nm fetch , | ||||
.Nm fubyte , | .Nm fubyte , | ||||
.Nm fuword , | .Nm fuword , | ||||
.Nm fuword16 , | .Nm fuword16 , | ||||
.Nm fuword32 , | .Nm fuword32 , | ||||
Show All 21 Lines | |||||
.Fn fueword32 "volatile const void *base" "int32_t *val" | .Fn fueword32 "volatile const void *base" "int32_t *val" | ||||
.Ft int | .Ft int | ||||
.Fn fueword64 "volatile const void *base" "int64_t *val" | .Fn fueword64 "volatile const void *base" "int64_t *val" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
functions are designed to copy small amounts of data from user-space | functions are designed to copy small amounts of data from user-space | ||||
of the current process. | of the current process. | ||||
If read is successful, it is performed atomically. | If the user address is naturally aligned, then the operation will be | ||||
The data read must be naturally aligned. | performed atomically. | ||||
Otherwise it may fail or be performed non-atomically, depending on | |||||
the platform. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
routines provide the following functionality: | routines provide the following functionality: | ||||
.Bl -tag -width "fueword32()" | .Bl -tag -width "fueword32()" | ||||
.It Fn fubyte | .It Fn fubyte | ||||
Fetches a byte of data from the user-space address | Fetches a byte of data from the user-space address | ||||
.Pa base . | .Pa base . | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |