#include <kern/arithmetic_128.h>

kern/arithmetic_128.h Kernel.framework

Code duplicated from Libc/gen/nanosleep.c
includes: Kernel/stdint.h
1 function

functionmulti_overflow

static __inline uint64_t multi_overflow(uint64_t a, uint64_t b)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/arithmetic_128.h
Returns the high-order 64 bits of the 128-bit product a * b. Returns zero when the multiplication does not overflow 64 bits, making it useful as an overflow check before a 64x64-bit multiply. On LP64 the product is computed with the compiler's native __uint128_t; on 32-bit configurations the header carries an equivalent 64x64->128 decomposed multiply.