~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/linkage.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _LINUX_LINKAGE_H
  2 #define _LINUX_LINKAGE_H
  3 
  4 #include <linux/compiler.h>
  5 #include <linux/stringify.h>
  6 #include <linux/export.h>
  7 #include <asm/linkage.h>
  8 
  9 /* Some toolchains use other characters (e.g. '`') to mark new line in macro */
 10 #ifndef ASM_NL
 11 #define ASM_NL           ;
 12 #endif
 13 
 14 #ifdef __cplusplus
 15 #define CPP_ASMLINKAGE extern "C"
 16 #else
 17 #define CPP_ASMLINKAGE
 18 #endif
 19 
 20 #ifndef asmlinkage
 21 #define asmlinkage CPP_ASMLINKAGE
 22 #endif
 23 
 24 #ifndef cond_syscall
 25 #define cond_syscall(x) asm(                            \
 26         ".weak " VMLINUX_SYMBOL_STR(x) "\n\t"           \
 27         ".set  " VMLINUX_SYMBOL_STR(x) ","              \
 28                  VMLINUX_SYMBOL_STR(sys_ni_syscall))
 29 #endif
 30 
 31 #ifndef SYSCALL_ALIAS
 32 #define SYSCALL_ALIAS(alias, name) asm(                 \
 33         ".globl " VMLINUX_SYMBOL_STR(alias) "\n\t"      \
 34         ".set   " VMLINUX_SYMBOL_STR(alias) ","         \
 35                   VMLINUX_SYMBOL_STR(name))
 36 #endif
 37 
 38 #define __page_aligned_data     __section(.data..page_aligned) __aligned(PAGE_SIZE)
 39 #define __page_aligned_bss      __section(.bss..page_aligned) __aligned(PAGE_SIZE)
 40 
 41 /*
 42  * For assembly routines.
 43  *
 44  * Note when using these that you must specify the appropriate
 45  * alignment directives yourself
 46  */
 47 #define __PAGE_ALIGNED_DATA     .section ".data..page_aligned", "aw"
 48 #define __PAGE_ALIGNED_BSS      .section ".bss..page_aligned", "aw"
 49 
 50 /*
 51  * This is used by architectures to keep arguments on the stack
 52  * untouched by the compiler by keeping them live until the end.
 53  * The argument stack may be owned by the assembly-language
 54  * caller, not the callee, and gcc doesn't always understand
 55  * that.
 56  *
 57  * We have the return value, and a maximum of six arguments.
 58  *
 59  * This should always be followed by a "return ret" for the
 60  * protection to work (ie no more work that the compiler might
 61  * end up needing stack temporaries for).
 62  */
 63 /* Assembly files may be compiled with -traditional .. */
 64 #ifndef __ASSEMBLY__
 65 #ifndef asmlinkage_protect
 66 # define asmlinkage_protect(n, ret, args...)    do { } while (0)
 67 #endif
 68 #endif
 69 
 70 #ifndef __ALIGN
 71 #define __ALIGN         .align 4,0x90
 72 #define __ALIGN_STR     ".align 4,0x90"
 73 #endif
 74 
 75 #ifdef __ASSEMBLY__
 76 
 77 #ifndef LINKER_SCRIPT
 78 #define ALIGN __ALIGN
 79 #define ALIGN_STR __ALIGN_STR
 80 
 81 #ifndef ENTRY
 82 #define ENTRY(name) \
 83         .globl name ASM_NL \
 84         ALIGN ASM_NL \
 85         name:
 86 #endif
 87 #endif /* LINKER_SCRIPT */
 88 
 89 #ifndef WEAK
 90 #define WEAK(name)         \
 91         .weak name ASM_NL   \
 92         name:
 93 #endif
 94 
 95 #ifndef END
 96 #define END(name) \
 97         .size name, .-name
 98 #endif
 99 
100 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
101  * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
102  * static analysis tools such as stack depth analyzer.
103  */
104 #ifndef ENDPROC
105 #define ENDPROC(name) \
106         .type name, @function ASM_NL \
107         END(name)
108 #endif
109 
110 #endif
111 
112 #endif
113 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp