diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-20 06:39:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-20 06:39:18 -0400 |
commit | 170465ee7f5a9a2d0ac71285507e52642e040353 (patch) | |
tree | dbca81f04cde9e625170abbd6a72555cfbeb194e /include/linux/kernel.h | |
parent | 169ad16bb87c10a3f7c108bb7008ebc0270f617a (diff) | |
parent | 1fca25427482387689fa27594c992a961d98768f (diff) |
Merge branch 'linus' into x86/xen
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7889c2f9b75d..75d81f157d2e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -75,6 +75,12 @@ extern const char linux_proc_banner[]; | |||
75 | */ | 75 | */ |
76 | #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) | 76 | #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) |
77 | 77 | ||
78 | /** | ||
79 | * lower_32_bits - return bits 0-31 of a number | ||
80 | * @n: the number we're accessing | ||
81 | */ | ||
82 | #define lower_32_bits(n) ((u32)(n)) | ||
83 | |||
78 | #define KERN_EMERG "<0>" /* system is unusable */ | 84 | #define KERN_EMERG "<0>" /* system is unusable */ |
79 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | 85 | #define KERN_ALERT "<1>" /* action must be taken immediately */ |
80 | #define KERN_CRIT "<2>" /* critical conditions */ | 86 | #define KERN_CRIT "<2>" /* critical conditions */ |
@@ -102,6 +108,13 @@ struct completion; | |||
102 | struct pt_regs; | 108 | struct pt_regs; |
103 | struct user; | 109 | struct user; |
104 | 110 | ||
111 | #ifdef CONFIG_PREEMPT_VOLUNTARY | ||
112 | extern int _cond_resched(void); | ||
113 | # define might_resched() _cond_resched() | ||
114 | #else | ||
115 | # define might_resched() do { } while (0) | ||
116 | #endif | ||
117 | |||
105 | /** | 118 | /** |
106 | * might_sleep - annotation for functions that can sleep | 119 | * might_sleep - annotation for functions that can sleep |
107 | * | 120 | * |
@@ -112,13 +125,6 @@ struct user; | |||
112 | * be bitten later when the calling function happens to sleep when it is not | 125 | * be bitten later when the calling function happens to sleep when it is not |
113 | * supposed to. | 126 | * supposed to. |
114 | */ | 127 | */ |
115 | #ifdef CONFIG_PREEMPT_VOLUNTARY | ||
116 | extern int _cond_resched(void); | ||
117 | # define might_resched() _cond_resched() | ||
118 | #else | ||
119 | # define might_resched() do { } while (0) | ||
120 | #endif | ||
121 | |||
122 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | 128 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP |
123 | void __might_sleep(char *file, int line); | 129 | void __might_sleep(char *file, int line); |
124 | # define might_sleep() \ | 130 | # define might_sleep() \ |