Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / include / linux / linkage.h
blob23b9ae463b67addd57d063b1f7cf0e72103daca5
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <linux/config.h>
6 #ifdef __cplusplus
7 #define CPP_ASMLINKAGE extern "C"
8 #else
9 #define CPP_ASMLINKAGE
10 #endif
12 #if defined __i386__
13 #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
14 #elif defined __ia64__
15 #define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
16 #else
17 #define asmlinkage CPP_ASMLINKAGE
18 #endif
20 #define SYMBOL_NAME_STR(X) #X
21 #define SYMBOL_NAME(X) X
22 #ifdef __STDC__
23 #define SYMBOL_NAME_LABEL(X) X##:
24 #else
25 #define SYMBOL_NAME_LABEL(X) X/**/:
26 #endif
28 #ifdef __arm__
29 #define __ALIGN .align 0
30 #define __ALIGN_STR ".align 0"
31 #else
32 #ifdef __mc68000__
33 #define __ALIGN .align 4
34 #define __ALIGN_STR ".align 4"
35 #else
36 #ifdef __sh__
37 #define __ALIGN .balign 4
38 #define __ALIGN_STR ".balign 4"
39 #else
40 #if defined(__i386__) && defined(CONFIG_X86_ALIGNMENT_16)
41 #define __ALIGN .align 16,0x90
42 #define __ALIGN_STR ".align 16,0x90"
43 #else
44 #define __ALIGN .align 4,0x90
45 #define __ALIGN_STR ".align 4,0x90"
46 #endif
47 #endif /* __sh__ */
48 #endif /* __mc68000__ */
49 #endif /* __arm__ */
51 #ifdef __ASSEMBLY__
53 #define ALIGN __ALIGN
54 #define ALIGN_STR __ALIGN_STR
56 #define ENTRY(name) \
57 .globl SYMBOL_NAME(name); \
58 ALIGN; \
59 SYMBOL_NAME_LABEL(name)
61 #endif
63 #endif