Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
unistd.h File Reference
#include <uapi/asm/unistd.h>

Go to the source code of this file.

Macros

#define SYS_ify(syscall_name)   __NR_##syscall_name
 
#define ASM_LINE_SEP   ;
 
#define K_STW_ASM_PIC   " \n"
 
#define K_LDW_ASM_PIC   " \n"
 
#define K_USING_GR4
 
#define K_CALL_CLOB_REGS
 
#define K_INLINE_SYSCALL(name, nr, args...)
 
#define K_LOAD_ARGS_0()
 
#define K_LOAD_ARGS_1(r26)
 
#define K_LOAD_ARGS_2(r26, r25)
 
#define K_LOAD_ARGS_3(r26, r25, r24)
 
#define K_LOAD_ARGS_4(r26, r25, r24, r23)
 
#define K_LOAD_ARGS_5(r26, r25, r24, r23, r22)
 
#define K_LOAD_ARGS_6(r26, r25, r24, r23, r22, r21)
 
#define K_ASM_ARGS_0
 
#define K_ASM_ARGS_1   K_ASM_ARGS_0, "r" (__r26)
 
#define K_ASM_ARGS_2   K_ASM_ARGS_1, "r" (__r25)
 
#define K_ASM_ARGS_3   K_ASM_ARGS_2, "r" (__r24)
 
#define K_ASM_ARGS_4   K_ASM_ARGS_3, "r" (__r23)
 
#define K_ASM_ARGS_5   K_ASM_ARGS_4, "r" (__r22)
 
#define K_ASM_ARGS_6   K_ASM_ARGS_5, "r" (__r21)
 
#define K_CLOB_ARGS_6
 
#define K_CLOB_ARGS_5   K_CLOB_ARGS_6, "%r21"
 
#define K_CLOB_ARGS_4   K_CLOB_ARGS_5, "%r22"
 
#define K_CLOB_ARGS_3   K_CLOB_ARGS_4, "%r23"
 
#define K_CLOB_ARGS_2   K_CLOB_ARGS_3, "%r24"
 
#define K_CLOB_ARGS_1   K_CLOB_ARGS_2, "%r25"
 
#define K_CLOB_ARGS_0   K_CLOB_ARGS_1, "%r26"
 
#define _syscall0(type, name)
 
#define _syscall1(type, name, type1, arg1)
 
#define _syscall2(type, name, type1, arg1, type2, arg2)
 
#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3)
 
#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4)
 
#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5)
 
#define __ARCH_WANT_OLD_READDIR
 
#define __ARCH_WANT_STAT64
 
#define __ARCH_WANT_SYS_ALARM
 
#define __ARCH_WANT_SYS_GETHOSTNAME
 
#define __ARCH_WANT_SYS_PAUSE
 
#define __ARCH_WANT_SYS_SGETMASK
 
#define __ARCH_WANT_SYS_SIGNAL
 
#define __ARCH_WANT_SYS_TIME
 
#define __ARCH_WANT_COMPAT_SYS_TIME
 
#define __ARCH_WANT_SYS_UTIME
 
#define __ARCH_WANT_SYS_WAITPID
 
#define __ARCH_WANT_SYS_SOCKETCALL
 
#define __ARCH_WANT_SYS_FADVISE64
 
#define __ARCH_WANT_SYS_GETPGRP
 
#define __ARCH_WANT_SYS_LLSEEK
 
#define __ARCH_WANT_SYS_NICE
 
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
 
#define __ARCH_WANT_SYS_OLDUMOUNT
 
#define __ARCH_WANT_SYS_SIGPENDING
 
#define __ARCH_WANT_SYS_SIGPROCMASK
 
#define __ARCH_WANT_SYS_RT_SIGACTION
 
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
 
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
 
#define cond_syscall(x)   asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 

Macro Definition Documentation

#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND

Definition at line 165 of file unistd.h.

#define __ARCH_WANT_COMPAT_SYS_TIME

Definition at line 151 of file unistd.h.

#define __ARCH_WANT_OLD_READDIR

Definition at line 143 of file unistd.h.

#define __ARCH_WANT_STAT64

Definition at line 144 of file unistd.h.

#define __ARCH_WANT_SYS_ALARM

Definition at line 145 of file unistd.h.

#define __ARCH_WANT_SYS_FADVISE64

Definition at line 155 of file unistd.h.

#define __ARCH_WANT_SYS_GETHOSTNAME

Definition at line 146 of file unistd.h.

#define __ARCH_WANT_SYS_GETPGRP

Definition at line 156 of file unistd.h.

#define __ARCH_WANT_SYS_LLSEEK

Definition at line 157 of file unistd.h.

#define __ARCH_WANT_SYS_NICE

Definition at line 158 of file unistd.h.

#define __ARCH_WANT_SYS_OLD_GETRLIMIT

Definition at line 159 of file unistd.h.

#define __ARCH_WANT_SYS_OLDUMOUNT

Definition at line 160 of file unistd.h.

#define __ARCH_WANT_SYS_PAUSE

Definition at line 147 of file unistd.h.

#define __ARCH_WANT_SYS_RT_SIGACTION

Definition at line 163 of file unistd.h.

#define __ARCH_WANT_SYS_RT_SIGSUSPEND

Definition at line 164 of file unistd.h.

#define __ARCH_WANT_SYS_SGETMASK

Definition at line 148 of file unistd.h.

#define __ARCH_WANT_SYS_SIGNAL

Definition at line 149 of file unistd.h.

#define __ARCH_WANT_SYS_SIGPENDING

Definition at line 161 of file unistd.h.

#define __ARCH_WANT_SYS_SIGPROCMASK

Definition at line 162 of file unistd.h.

#define __ARCH_WANT_SYS_SOCKETCALL

Definition at line 154 of file unistd.h.

#define __ARCH_WANT_SYS_TIME

Definition at line 150 of file unistd.h.

#define __ARCH_WANT_SYS_UTIME

Definition at line 152 of file unistd.h.

#define __ARCH_WANT_SYS_WAITPID

Definition at line 153 of file unistd.h.

#define _syscall0 (   type,
  name 
)
Value:
type name(void) \
{ \
return K_INLINE_SYSCALL(name, 0); \
}

Definition at line 106 of file unistd.h.

#define _syscall1 (   type,
  name,
  type1,
  arg1 
)
Value:
type name(type1 arg1) \
{ \
return K_INLINE_SYSCALL(name, 1, arg1); \
}

Definition at line 112 of file unistd.h.

#define _syscall2 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2 
)
Value:
type name(type1 arg1, type2 arg2) \
{ \
return K_INLINE_SYSCALL(name, 2, arg1, arg2); \
}

Definition at line 118 of file unistd.h.

#define _syscall3 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3 
)
Value:
type name(type1 arg1, type2 arg2, type3 arg3) \
{ \
return K_INLINE_SYSCALL(name, 3, arg1, arg2, arg3); \
}

Definition at line 124 of file unistd.h.

#define _syscall4 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4 
)
Value:
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
{ \
return K_INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4); \
}

Definition at line 130 of file unistd.h.

#define _syscall5 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4,
  type5,
  arg5 
)
Value:
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
{ \
}

Definition at line 137 of file unistd.h.

#define ASM_LINE_SEP   ;

Definition at line 11 of file unistd.h.

#define cond_syscall (   x)    asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

Definition at line 177 of file unistd.h.

#define K_ASM_ARGS_0

Definition at line 89 of file unistd.h.

#define K_ASM_ARGS_1   K_ASM_ARGS_0, "r" (__r26)

Definition at line 90 of file unistd.h.

#define K_ASM_ARGS_2   K_ASM_ARGS_1, "r" (__r25)

Definition at line 91 of file unistd.h.

#define K_ASM_ARGS_3   K_ASM_ARGS_2, "r" (__r24)

Definition at line 92 of file unistd.h.

#define K_ASM_ARGS_4   K_ASM_ARGS_3, "r" (__r23)

Definition at line 93 of file unistd.h.

#define K_ASM_ARGS_5   K_ASM_ARGS_4, "r" (__r22)

Definition at line 94 of file unistd.h.

#define K_ASM_ARGS_6   K_ASM_ARGS_5, "r" (__r21)

Definition at line 95 of file unistd.h.

#define K_CALL_CLOB_REGS
Value:
"%r1", "%r2", K_USING_GR4 \
"%r20", "%r29", "%r31"

Definition at line 40 of file unistd.h.

#define K_CLOB_ARGS_0   K_CLOB_ARGS_1, "%r26"

Definition at line 104 of file unistd.h.

#define K_CLOB_ARGS_1   K_CLOB_ARGS_2, "%r25"

Definition at line 103 of file unistd.h.

#define K_CLOB_ARGS_2   K_CLOB_ARGS_3, "%r24"

Definition at line 102 of file unistd.h.

#define K_CLOB_ARGS_3   K_CLOB_ARGS_4, "%r23"

Definition at line 101 of file unistd.h.

#define K_CLOB_ARGS_4   K_CLOB_ARGS_5, "%r22"

Definition at line 100 of file unistd.h.

#define K_CLOB_ARGS_5   K_CLOB_ARGS_6, "%r21"

Definition at line 99 of file unistd.h.

#define K_CLOB_ARGS_6

Definition at line 98 of file unistd.h.

#define K_INLINE_SYSCALL (   name,
  nr,
  args... 
)
Value:
({ \
long __sys_res; \
{ \
register unsigned long __res __asm__("r28"); \
K_LOAD_ARGS_##nr(args) \
/* FIXME: HACK stw/ldw r19 around syscall */ \
__asm__ volatile( \
K_STW_ASM_PIC \
" ble 0x100(%%sr2, %%r0)\n" \
" ldi %1, %%r20\n" \
K_LDW_ASM_PIC \
: "=r" (__res) \
: "i" (SYS_ify(name)) K_ASM_ARGS_##nr \
: "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
} \
if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \
errno = -__sys_res; \
__sys_res = -1; \
} \
__sys_res; \
})

Definition at line 44 of file unistd.h.

#define K_LDW_ASM_PIC   " \n"

Definition at line 25 of file unistd.h.

#define K_LOAD_ARGS_0 ( )

Definition at line 68 of file unistd.h.

#define K_LOAD_ARGS_1 (   r26)
Value:
register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
K_LOAD_ARGS_0()

Definition at line 69 of file unistd.h.

#define K_LOAD_ARGS_2 (   r26,
  r25 
)
Value:
register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
K_LOAD_ARGS_1(r26)

Definition at line 72 of file unistd.h.

#define K_LOAD_ARGS_3 (   r26,
  r25,
  r24 
)
Value:
register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
K_LOAD_ARGS_2(r26,r25)

Definition at line 75 of file unistd.h.

#define K_LOAD_ARGS_4 (   r26,
  r25,
  r24,
  r23 
)
Value:
register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
K_LOAD_ARGS_3(r26,r25,r24)

Definition at line 78 of file unistd.h.

#define K_LOAD_ARGS_5 (   r26,
  r25,
  r24,
  r23,
  r22 
)
Value:
register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
K_LOAD_ARGS_4(r26,r25,r24,r23)

Definition at line 81 of file unistd.h.

#define K_LOAD_ARGS_6 (   r26,
  r25,
  r24,
  r23,
  r22,
  r21 
)
Value:
register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
K_LOAD_ARGS_5(r26,r25,r24,r23,r22)

Definition at line 84 of file unistd.h.

#define K_STW_ASM_PIC   " \n"

Definition at line 24 of file unistd.h.

#define K_USING_GR4

Definition at line 26 of file unistd.h.

#define SYS_ify (   syscall_name)    __NR_##syscall_name

Definition at line 8 of file unistd.h.