diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 73aa55a73334..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))); |
@@ -213,6 +217,7 @@ extern void dump_stack(void); | |||
213 | ((unsigned char *)&addr)[1], \ | 217 | ((unsigned char *)&addr)[1], \ |
214 | ((unsigned char *)&addr)[2], \ | 218 | ((unsigned char *)&addr)[2], \ |
215 | ((unsigned char *)&addr)[3] | 219 | ((unsigned char *)&addr)[3] |
220 | #define NIPQUAD_FMT "%u.%u.%u.%u" | ||
216 | 221 | ||
217 | #define NIP6(addr) \ | 222 | #define NIP6(addr) \ |
218 | ntohs((addr).s6_addr16[0]), \ | 223 | ntohs((addr).s6_addr16[0]), \ |
@@ -223,6 +228,8 @@ extern void dump_stack(void); | |||
223 | ntohs((addr).s6_addr16[5]), \ | 228 | ntohs((addr).s6_addr16[5]), \ |
224 | ntohs((addr).s6_addr16[6]), \ | 229 | ntohs((addr).s6_addr16[6]), \ |
225 | 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" | ||
226 | 233 | ||
227 | #if defined(__LITTLE_ENDIAN) | 234 | #if defined(__LITTLE_ENDIAN) |
228 | #define HIPQUAD(addr) \ | 235 | #define HIPQUAD(addr) \ |
@@ -287,6 +294,15 @@ extern void dump_stack(void); | |||
287 | 1; \ | 294 | 1; \ |
288 | }) | 295 | }) |
289 | 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 | |||
290 | #endif /* __KERNEL__ */ | 306 | #endif /* __KERNEL__ */ |
291 | 307 | ||
292 | #define SI_LOAD_SHIFT 16 | 308 | #define SI_LOAD_SHIFT 16 |
@@ -317,8 +333,6 @@ extern int randomize_va_space; | |||
317 | #endif | 333 | #endif |
318 | 334 | ||
319 | /* Trap pasters of __FUNCTION__ at compile-time */ | 335 | /* Trap pasters of __FUNCTION__ at compile-time */ |
320 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 | ||
321 | #define __FUNCTION__ (__func__) | 336 | #define __FUNCTION__ (__func__) |
322 | #endif | ||
323 | 337 | ||
324 | #endif | 338 | #endif |