1 /* Public domain. */ 2 3 #ifndef _ASM_DIV64_H 4 #define _ASM_DIV64_H 5 6 #include <sys/types.h> 7 8 #define do_div(n, base) ({ \ 9 uint32_t __base = (base); \ 10 uint32_t __rem = ((uint64_t)(n)) % __base; \ 11 (n) = ((uint64_t)(n)) / __base; \ 12 __rem; \ 13 }) 14 15 #endif 16