diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b1e407a4fbda..323924edb26a 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))); |
@@ -212,6 +216,7 @@ extern void dump_stack(void); | |||
212 | ((unsigned char *)&addr)[1], \ | 216 | ((unsigned char *)&addr)[1], \ |
213 | ((unsigned char *)&addr)[2], \ | 217 | ((unsigned char *)&addr)[2], \ |
214 | ((unsigned char *)&addr)[3] | 218 | ((unsigned char *)&addr)[3] |
219 | #define NIPQUAD_FMT "%u.%u.%u.%u" | ||
215 | 220 | ||
216 | #define NIP6(addr) \ | 221 | #define NIP6(addr) \ |
217 | ntohs((addr).s6_addr16[0]), \ | 222 | ntohs((addr).s6_addr16[0]), \ |
@@ -222,6 +227,7 @@ extern void dump_stack(void); | |||
222 | ntohs((addr).s6_addr16[5]), \ | 227 | ntohs((addr).s6_addr16[5]), \ |
223 | ntohs((addr).s6_addr16[6]), \ | 228 | ntohs((addr).s6_addr16[6]), \ |
224 | ntohs((addr).s6_addr16[7]) | 229 | ntohs((addr).s6_addr16[7]) |
230 | #define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" | ||
225 | 231 | ||
226 | #if defined(__LITTLE_ENDIAN) | 232 | #if defined(__LITTLE_ENDIAN) |
227 | #define HIPQUAD(addr) \ | 233 | #define HIPQUAD(addr) \ |
@@ -286,6 +292,15 @@ extern void dump_stack(void); | |||
286 | 1; \ | 292 | 1; \ |
287 | }) | 293 | }) |
288 | 294 | ||
295 | /* | ||
296 | * Check at compile time that 'function' is a certain type, or is a pointer | ||
297 | * to that type (needs to use typedef for the function type.) | ||
298 | */ | ||
299 | #define typecheck_fn(type,function) \ | ||
300 | ({ typeof(type) __tmp = function; \ | ||
301 | (void)__tmp; \ | ||
302 | }) | ||
303 | |||
289 | #endif /* __KERNEL__ */ | 304 | #endif /* __KERNEL__ */ |
290 | 305 | ||
291 | #define SI_LOAD_SHIFT 16 | 306 | #define SI_LOAD_SHIFT 16 |
@@ -316,8 +331,6 @@ extern int randomize_va_space; | |||
316 | #endif | 331 | #endif |
317 | 332 | ||
318 | /* Trap pasters of __FUNCTION__ at compile-time */ | 333 | /* Trap pasters of __FUNCTION__ at compile-time */ |
319 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 | ||
320 | #define __FUNCTION__ (__func__) | 334 | #define __FUNCTION__ (__func__) |
321 | #endif | ||
322 | 335 | ||
323 | #endif | 336 | #endif |