| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _LINUX_LINKAGE_H | 
 | 2 | #define _LINUX_LINKAGE_H | 
 | 3 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #include <asm/linkage.h> | 
 | 5 |  | 
 | 6 | #ifdef __cplusplus | 
 | 7 | #define CPP_ASMLINKAGE extern "C" | 
 | 8 | #else | 
 | 9 | #define CPP_ASMLINKAGE | 
 | 10 | #endif | 
 | 11 |  | 
 | 12 | #ifndef asmlinkage | 
 | 13 | #define asmlinkage CPP_ASMLINKAGE | 
 | 14 | #endif | 
 | 15 |  | 
 | 16 | #ifndef prevent_tail_call | 
 | 17 | # define prevent_tail_call(ret) do { } while (0) | 
 | 18 | #endif | 
 | 19 |  | 
 | 20 | #ifndef __ALIGN | 
 | 21 | #define __ALIGN		.align 4,0x90 | 
 | 22 | #define __ALIGN_STR	".align 4,0x90" | 
 | 23 | #endif | 
 | 24 |  | 
 | 25 | #ifdef __ASSEMBLY__ | 
 | 26 |  | 
 | 27 | #define ALIGN __ALIGN | 
 | 28 | #define ALIGN_STR __ALIGN_STR | 
 | 29 |  | 
| Jan Beulich | ab7efcc | 2006-03-24 03:16:17 -0800 | [diff] [blame] | 30 | #ifndef ENTRY | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #define ENTRY(name) \ | 
 | 32 |   .globl name; \ | 
 | 33 |   ALIGN; \ | 
 | 34 |   name: | 
| Jan Beulich | ab7efcc | 2006-03-24 03:16:17 -0800 | [diff] [blame] | 35 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 |  | 
| Prasanna S Panchamukhi | d0aaff9 | 2005-09-06 15:19:26 -0700 | [diff] [blame] | 37 | #define KPROBE_ENTRY(name) \ | 
| Prasanna S.P | d28c439 | 2006-09-26 10:52:34 +0200 | [diff] [blame] | 38 |   .pushsection .kprobes.text, "ax"; \ | 
| Jan Beulich | ab7efcc | 2006-03-24 03:16:17 -0800 | [diff] [blame] | 39 |   ENTRY(name) | 
| Prasanna S Panchamukhi | d0aaff9 | 2005-09-06 15:19:26 -0700 | [diff] [blame] | 40 |  | 
| Prasanna S.P | d28c439 | 2006-09-26 10:52:34 +0200 | [diff] [blame] | 41 | #define KPROBE_END(name) \ | 
 | 42 |   END(name);		 \ | 
 | 43 |   .popsection | 
 | 44 |  | 
| Jan Beulich | ab7efcc | 2006-03-24 03:16:17 -0800 | [diff] [blame] | 45 | #ifndef END | 
 | 46 | #define END(name) \ | 
 | 47 |   .size name, .-name | 
 | 48 | #endif | 
 | 49 |  | 
 | 50 | #ifndef ENDPROC | 
 | 51 | #define ENDPROC(name) \ | 
 | 52 |   .type name, @function; \ | 
 | 53 |   END(name) | 
 | 54 | #endif | 
| Prasanna S Panchamukhi | d0aaff9 | 2005-09-06 15:19:26 -0700 | [diff] [blame] | 55 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | #endif | 
 | 57 |  | 
 | 58 | #define NORET_TYPE    /**/ | 
 | 59 | #define ATTRIB_NORET  __attribute__((noreturn)) | 
 | 60 | #define NORET_AND     noreturn, | 
 | 61 |  | 
 | 62 | #ifndef FASTCALL | 
 | 63 | #define FASTCALL(x)	x | 
 | 64 | #define fastcall | 
 | 65 | #endif | 
 | 66 |  | 
 | 67 | #endif |