blob: 932021f872d5feaa71a38d872ab6dcce74f96158 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_LINKAGE_H
2#define _LINUX_LINKAGE_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#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 Beulichab7efcc2006-03-24 03:16:17 -080030#ifndef ENTRY
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#define ENTRY(name) \
32 .globl name; \
33 ALIGN; \
34 name:
Jan Beulichab7efcc2006-03-24 03:16:17 -080035#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Prasanna S Panchamukhid0aaff92005-09-06 15:19:26 -070037#define KPROBE_ENTRY(name) \
38 .section .kprobes.text, "ax"; \
Jan Beulichab7efcc2006-03-24 03:16:17 -080039 ENTRY(name)
Prasanna S Panchamukhid0aaff92005-09-06 15:19:26 -070040
Jan Beulichab7efcc2006-03-24 03:16:17 -080041#ifndef END
42#define END(name) \
43 .size name, .-name
44#endif
45
46#ifndef ENDPROC
47#define ENDPROC(name) \
48 .type name, @function; \
49 END(name)
50#endif
Prasanna S Panchamukhid0aaff92005-09-06 15:19:26 -070051
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#endif
53
54#define NORET_TYPE /**/
55#define ATTRIB_NORET __attribute__((noreturn))
56#define NORET_AND noreturn,
57
58#ifndef FASTCALL
59#define FASTCALL(x) x
60#define fastcall
61#endif
62
63#endif