diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b1e407a4fbda..b49affa0ac5a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -47,6 +47,8 @@ extern int console_printk[]; | |||
47 | #define default_console_loglevel (console_printk[3]) | 47 | #define default_console_loglevel (console_printk[3]) |
48 | 48 | ||
49 | struct completion; | 49 | struct completion; |
50 | struct pt_regs; | ||
51 | struct user; | ||
50 | 52 | ||
51 | /** | 53 | /** |
52 | * might_sleep - annotation for functions that can sleep | 54 | * might_sleep - annotation for functions that can sleep |
@@ -123,6 +125,8 @@ extern int __kernel_text_address(unsigned long addr); | |||
123 | extern int kernel_text_address(unsigned long addr); | 125 | extern int kernel_text_address(unsigned long addr); |
124 | extern int session_of_pgrp(int pgrp); | 126 | extern int session_of_pgrp(int pgrp); |
125 | 127 | ||
128 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | ||
129 | |||
126 | #ifdef CONFIG_PRINTK | 130 | #ifdef CONFIG_PRINTK |
127 | asmlinkage int vprintk(const char *fmt, va_list args) | 131 | asmlinkage int vprintk(const char *fmt, va_list args) |
128 | __attribute__ ((format (printf, 1, 0))); | 132 | __attribute__ ((format (printf, 1, 0))); |
@@ -181,6 +185,7 @@ extern enum system_states { | |||
181 | SYSTEM_HALT, | 185 | SYSTEM_HALT, |
182 | SYSTEM_POWER_OFF, | 186 | SYSTEM_POWER_OFF, |
183 | SYSTEM_RESTART, | 187 | SYSTEM_RESTART, |
188 | SYSTEM_SUSPEND_DISK, | ||
184 | } system_state; | 189 | } system_state; |
185 | 190 | ||
186 | #define TAINT_PROPRIETARY_MODULE (1<<0) | 191 | #define TAINT_PROPRIETARY_MODULE (1<<0) |
@@ -212,6 +217,7 @@ extern void dump_stack(void); | |||
212 | ((unsigned char *)&addr)[1], \ | 217 | ((unsigned char *)&addr)[1], \ |
213 | ((unsigned char *)&addr)[2], \ | 218 | ((unsigned char *)&addr)[2], \ |
214 | ((unsigned char *)&addr)[3] | 219 | ((unsigned char *)&addr)[3] |
220 | #define NIPQUAD_FMT "%u.%u.%u.%u" | ||
215 | 221 | ||
216 | #define NIP6(addr) \ | 222 | #define NIP6(addr) \ |
217 | ntohs((addr).s6_addr16[0]), \ | 223 | ntohs((addr).s6_addr16[0]), \ |
@@ -222,6 +228,8 @@ extern void dump_stack(void); | |||
222 | ntohs((addr).s6_addr16[5]), \ | 228 | ntohs((addr).s6_addr16[5]), \ |
223 | ntohs((addr).s6_addr16[6]), \ | 229 | ntohs((addr).s6_addr16[6]), \ |
224 | ntohs((addr).s6_addr16[7]) | 230 | ntohs((addr).s6_addr16[7]) |
231 | #define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" | ||
232 | #define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x" | ||
225 | 233 | ||
226 | #if defined(__LITTLE_ENDIAN) | 234 | #if defined(__LITTLE_ENDIAN) |
227 | #define HIPQUAD(addr) \ | 235 | #define HIPQUAD(addr) \ |
@@ -286,6 +294,15 @@ extern void dump_stack(void); | |||
286 | 1; \ | 294 | 1; \ |
287 | }) | 295 | }) |
288 | 296 | ||
297 | /* | ||
298 | * Check at compile time that 'function' is a certain type, or is a pointer | ||
299 | * to that type (needs to use typedef for the function type.) | ||
300 | */ | ||
301 | #define typecheck_fn(type,function) \ | ||
302 | ({ typeof(type) __tmp = function; \ | ||
303 | (void)__tmp; \ | ||
304 | }) | ||
305 | |||
289 | #endif /* __KERNEL__ */ | 306 | #endif /* __KERNEL__ */ |
290 | 307 | ||
291 | #define SI_LOAD_SHIFT 16 | 308 | #define SI_LOAD_SHIFT 16 |
@@ -316,8 +333,6 @@ extern int randomize_va_space; | |||
316 | #endif | 333 | #endif |
317 | 334 | ||
318 | /* Trap pasters of __FUNCTION__ at compile-time */ | 335 | /* Trap pasters of __FUNCTION__ at compile-time */ |
319 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 | ||
320 | #define __FUNCTION__ (__func__) | 336 | #define __FUNCTION__ (__func__) |
321 | #endif | ||
322 | 337 | ||
323 | #endif | 338 | #endif |