Scroll to navigation

CLAMP(9) Driver Basics CLAMP(9)

NAME

clamp - return a value clamped to a given range with strict typechecking

SYNOPSIS

clamp(val, lo, hi);

ARGUMENTS

val

current value

lo

lowest allowable value

hi

highest allowable value

DESCRIPTION

This macro does strict typechecking of lo/hi to make sure they are of the same type as val. See the unnecessary pointer comparisons.

COPYRIGHT

January 2017 Kernel Hackers Manual 4.8.