diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
commit | d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489 (patch) | |
tree | cd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/i386/i386/sys_machdep.c | |
parent | 5977d3e898348ce714243a4189cee906151aa522 (diff) | |
download | src-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.tar.gz src-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.zip |
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code
and when the code has a high indentation level it was not really
advantageous to do the replacement.
This tries to strike a balance between readability using the macros
and flexibility of having the expressions, so not everything is
converted.
Notes
Notes:
svn path=/head/; revision=298433
Diffstat (limited to 'sys/i386/i386/sys_machdep.c')
-rw-r--r-- | sys/i386/i386/sys_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 861cf493fb7c..4f78e2994e0c 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #define MAX_LD 8192 #define LD_PER_PAGE 512 -#define NEW_MAX_LD(num) ((num + LD_PER_PAGE) & ~(LD_PER_PAGE-1)) +#define NEW_MAX_LD(num) rounddown2(num + LD_PER_PAGE, LD_PER_PAGE) #define SIZE_FROM_LARGEST_LD(num) (NEW_MAX_LD(num) << 3) #define NULL_LDT_BASE ((caddr_t)NULL) |