rtapi_div_u64

NAME
SYNTAX
ARGUMENTS
DESCRIPTION
RETURN VALUE
NOTES
REALTIME CONSIDERATIONS

NAME

rtapi_div_u64 − unsigned division of a 64-bit number by a 32-bit number

SYNTAX

__u64 rtapi_div_u64_rem(__u64 dividend, __u32 divisor, __u32 *remainder)

__u64 rtapi_div_u64(__u64 dividend, __u32 divisor)

ARGUMENTS

dividend

The value to be divided

divisor

The value to divide by

remainder

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.

DESCRIPTION

Perform integer division (and optionally compute the remainder) with a 64-bit dividend.

RETURN VALUE

The result of integer division of dividend / divisor.

NOTES

If the result of the division does not fit in a __u32, 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 when the module is loaded.

REALTIME CONSIDERATIONS

May be called from init/cleanup code and from within realtime tasks. Available in userspace components.