#include <libkern/arm/_OSByteOrder.h>

libkern/arm/_OSByteOrder.h Kernel.framework

Generic byte swapping functions.
includes: sys/_types.h
3 functions

function_OSSwapInt16

__DARWIN_OS_INLINE
__uint16_t _OSSwapInt16(__uint16_t _data)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/libkern/arm/_OSByteOrder.h
Returns _data with its two bytes exchanged. Written so clang reduces it to a single rev16 instruction on arm. Underlies the OSSwapInt16/OSSwapConstInt16 macros.

function_OSSwapInt32

__DARWIN_OS_INLINE
__uint32_t _OSSwapInt32(__uint32_t _data)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/libkern/arm/_OSByteOrder.h
Returns _data with its four bytes reversed, via __builtin_bswap32 (a rev instruction on arm). Underlies the OSSwapInt32/OSSwapConstInt32 macros.

function_OSSwapInt64

__DARWIN_OS_INLINE
__uint64_t _OSSwapInt64(__uint64_t _data)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/libkern/arm/_OSByteOrder.h
Returns _data with its eight bytes reversed, via __builtin_bswap64 (a rev instruction on arm64). Underlies the OSSwapInt64/OSSwapConstInt64 macros.