aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d140e8fb075f..80d36874689b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -77,13 +77,15 @@
77 77
78/* 78/*
79 * Divide positive or negative dividend by positive divisor and round 79 * Divide positive or negative dividend by positive divisor and round
80 * to closest integer. Result is undefined for negative divisors. 80 * to closest integer. Result is undefined for negative divisors and
81 * for negative dividends if the divisor variable type is unsigned.
81 */ 82 */
82#define DIV_ROUND_CLOSEST(x, divisor)( \ 83#define DIV_ROUND_CLOSEST(x, divisor)( \
83{ \ 84{ \
84 typeof(x) __x = x; \ 85 typeof(x) __x = x; \
85 typeof(divisor) __d = divisor; \ 86 typeof(divisor) __d = divisor; \
86 (((typeof(x))-1) > 0 || (__x) > 0) ? \ 87 (((typeof(x))-1) > 0 || \
88 ((typeof(divisor))-1) > 0 || (__x) > 0) ? \
87 (((__x) + ((__d) / 2)) / (__d)) : \ 89 (((__x) + ((__d) / 2)) / (__d)) : \
88 (((__x) - ((__d) / 2)) / (__d)); \ 90 (((__x) - ((__d) / 2)) / (__d)); \
89} \ 91} \
@@ -396,7 +398,11 @@ extern int panic_on_unrecovered_nmi;
396extern int panic_on_io_nmi; 398extern int panic_on_io_nmi;
397extern int sysctl_panic_on_stackoverflow; 399extern int sysctl_panic_on_stackoverflow;
398extern const char *print_tainted(void); 400extern const char *print_tainted(void);
399extern void add_taint(unsigned flag); 401enum lockdep_ok {
402 LOCKDEP_STILL_OK,
403 LOCKDEP_NOW_UNRELIABLE
404};
405extern void add_taint(unsigned flag, enum lockdep_ok);
400extern int test_taint(unsigned flag); 406extern int test_taint(unsigned flag);
401extern unsigned long get_taint(void); 407extern unsigned long get_taint(void);
402extern int root_mountflags; 408extern int root_mountflags;