binder_ndk_sys

Function AIBinder_lt

Source
pub unsafe extern "C" fn AIBinder_lt(
    lhs: *const AIBinder,
    rhs: *const AIBinder,
) -> bool
Expand description

Whether AIBinder is less than another.

This provides a per-process-unique total ordering of binders where a null AIBinder* object is considered to be before all other binder objects. For instance, two binders refer to the same object in a local or remote process when both AIBinder_lt(a, b) and AIBinder_lt(b, a) are false. This API might be used to insert and lookup binders in binary search trees.

AIBinder* pointers themselves actually also create a per-process-unique total ordering. However, this ordering is inconsistent with AIBinder_Weak_lt for remote binders. So, in general, this function should be preferred.

Available since API level 31.

\param lhs comparison object \param rhs comparison object

\return whether “lhs < rhs” is true