*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: bemtoh32 | Section: 9 | Source: OpenBSD | File: bemtoh32.9
BEMTOH32(9) FreeBSD Kernel Developer's Manual BEMTOH32(9) NAME bemtoh16, bemtoh32, bemtoh64, lemtoh16, lemtoh32, lemtoh64, htobem16, htobem32, htobem64, htolem16, htolem32, htolem64 - byte swapping memory load and store operations SYNOPSIS #include <sys/types.h> uint16_t bemtoh16(volatile const uint16_t *m); uint32_t bemtoh32(volatile const uint32_t *m); uint64_t bemtoh64(volatile const uint64_t *m); uint16_t lemtoh16(volatile const uint16_t *m); uint32_t lemtoh32(volatile const uint32_t *m); uint64_t lemtoh64(volatile const uint64_t *m); void htobem16(volatile uint16_t *m, uint16_t v); void htobem32(volatile uint32_t *m, uint32_t v); void htobem64(volatile uint64_t *m, uint64_t v); void htolem16(volatile uint16_t *m, uint16_t v); void htolem32(volatile uint32_t *m, uint32_t v); void htolem64(volatile uint64_t *m, uint64_t v); DESCRIPTION This API provides a way to take advantage of an architecture's ability to load and store words in memory of different endians. If an architecture has no specialised support for these operations, they will be implemented as a wrapper around the htobe64(3) API. These operations are subject to the same alignment restrictions as the host's normal memory loads and stores. bemtoh16(), bemtoh32(), and bemtoh64() read a big endian value from the memory located at m into the host's native byte order. lemtoh16(), lemtoh32(), and lemtoh64() read a little endian value from the memory located at m into the host's native byte order. htobem16(), htobem32(), and htobem64() store the host's native byte ordered value of v as a big endian value in the memory located at m. htolem16(), htolem32(), and htolem64() store the host's native byte ordered value of v as a little endian value in the memory located at m. CONTEXT bemtoh16(), bemtoh32(), bemtoh64(), lemtoh16(), lemtoh32(), lemtoh64(), htobem16(), htobem32(), htobem64(), htolem16(), htolem32(), and htolem64() can be called during autoconf, from process context, or from interrupt context. RETURN VALUES bemtoh16(), bemtoh32(), bemtoh64(), lemtoh16(), lemtoh32(), and lemtoh64() return the host's native byte ordered value of the memory at m after the appropriate byteswapping has occurred. htobem16(), htobem32(), htobem64(), htolem16(), htolem32(), and htolem64() do not return a value. SEE ALSO htobe64(3) HISTORY These functions first appeared in OpenBSD 5.6. FreeBSD 14.1-RELEASE-p8 March 31, 2022 FreeBSD 14.1-RELEASE-p8

Navigation Options