rtapi_div_u64 — unsigned division of a 64-bit number by a 32-bit number
u64 rtapi_div_u64_rem ( u64 dividend, u32 divisor, u32 *remainder)
u64 rtapi_div_u64 ( u64 dividend, u32 divisor__)
s64 rtapi_div_s64 ( s64 dividend, s32 divisor__)
s64 rtapi_div_s64_rem ( s64 dividend, s32 divisor, s32 *remainder)
The value to be divided
The value to divide by
Pointer to the location to store the remainder.
This may not be a NULL pointer.
If the remainder is not desired, call rtapi_div_u64 or rtapi_div_s64.
Perform integer division (and optionally compute the remainder) with a 64-bit dividend and 32-bit divisor.
The result of integer division of dividend / divisor. In versions with the remainder argument, the remainder is stored in the pointed-to location.
GPL2 or higher
If the result of the division does not fit in the return type, the result is undefined.
This function exists because in kernel space the use of the division operator on a 64-bit type can lead to an undefined symbol such as __umoddi3 when the module is loaded.
May be called from init/cleanup code and from within realtime tasks. Available in userspace components.