Back to index

glibc  2.9
Defines
sysdep.h File Reference
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/m68k/sysdep.h>
#include <dl-sysdep.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SYS_ify(syscall_name)   __NR_syscall_name
#define INLINE_SYSCALL(name, nr, args...)
#define INTERNAL_SYSCALL_DECL(err)   do { } while (0)
#define INTERNAL_SYSCALL(name, err, nr, args...)
#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((unsigned int) (val) >= -4095U)
#define INTERNAL_SYSCALL_ERRNO(val, err)   (-(val))
#define LOAD_ARGS_0()
#define LOAD_REGS_0
#define ASM_ARGS_0
#define LOAD_ARGS_1(a1)
#define LOAD_REGS_1
#define ASM_ARGS_1   ASM_ARGS_0, "d" (_d1)
#define LOAD_ARGS_2(a1, a2)
#define LOAD_REGS_2
#define ASM_ARGS_2   ASM_ARGS_1, "d" (_d2)
#define LOAD_ARGS_3(a1, a2, a3)
#define LOAD_REGS_3
#define ASM_ARGS_3   ASM_ARGS_2, "d" (_d3)
#define LOAD_ARGS_4(a1, a2, a3, a4)
#define LOAD_REGS_4
#define ASM_ARGS_4   ASM_ARGS_3, "d" (_d4)
#define LOAD_ARGS_5(a1, a2, a3, a4, a5)
#define LOAD_REGS_5
#define ASM_ARGS_5   ASM_ARGS_4, "d" (_d5)
#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)
#define LOAD_REGS_6
#define ASM_ARGS_6   ASM_ARGS_5, "a" (_a0)

Define Documentation

#define ASM_ARGS_0

Definition at line 256 of file sysdep.h.

#define ASM_ARGS_1   ASM_ARGS_0, "d" (_d1)

Definition at line 263 of file sysdep.h.

#define ASM_ARGS_2   ASM_ARGS_1, "d" (_d2)

Definition at line 270 of file sysdep.h.

#define ASM_ARGS_3   ASM_ARGS_2, "d" (_d3)

Definition at line 277 of file sysdep.h.

#define ASM_ARGS_4   ASM_ARGS_3, "d" (_d4)

Definition at line 284 of file sysdep.h.

#define ASM_ARGS_5   ASM_ARGS_4, "d" (_d5)

Definition at line 291 of file sysdep.h.

#define ASM_ARGS_6   ASM_ARGS_5, "a" (_a0)

Definition at line 298 of file sysdep.h.

#define INLINE_SYSCALL (   name,
  nr,
  args... 
)
Value:
({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args);    \
     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
       {                                                       \
        __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, ));         \
        _sys_result = (unsigned int) -1;                       \
       }                                                       \
     (int) _sys_result; })

Definition at line 215 of file sysdep.h.

#define INTERNAL_SYSCALL (   name,
  err,
  nr,
  args... 
)
Value:
({ unsigned int _sys_result;                            \
     {                                           \
       /* Load argument values in temporary variables
         to perform side effects like function calls
         before the call used registers are set.  */    \
       LOAD_ARGS_##nr (args)                            \
       LOAD_REGS_##nr                                   \
       register int _d0 asm ("%d0") = __NR_##name;      \
       asm volatile ("trap #0"                          \
                   : "=d" (_d0)                  \
                   : "0" (_d0) ASM_ARGS_##nr            \
                   : "memory");                  \
       _sys_result = _d0;                        \
     }                                           \
     (int) _sys_result; })

Definition at line 232 of file sysdep.h.

#define INTERNAL_SYSCALL_DECL (   err)    do { } while (0)

Definition at line 225 of file sysdep.h.

#define INTERNAL_SYSCALL_ERRNO (   val,
  err 
)    (-(val))

Definition at line 252 of file sysdep.h.

#define INTERNAL_SYSCALL_ERROR_P (   val,
  err 
)    ((unsigned int) (val) >= -4095U)

Definition at line 248 of file sysdep.h.

#define LOAD_ARGS_0 ( )

Definition at line 254 of file sysdep.h.

#define LOAD_ARGS_1 (   a1)
Value:
LOAD_ARGS_0 ()                            \
  int __arg1 = (int) (a1);

Definition at line 257 of file sysdep.h.

#define LOAD_ARGS_2 (   a1,
  a2 
)
Value:
LOAD_ARGS_1 (a1)                          \
  int __arg2 = (int) (a2);

Definition at line 264 of file sysdep.h.

#define LOAD_ARGS_3 (   a1,
  a2,
  a3 
)
Value:
LOAD_ARGS_2 (a1, a2)                      \
  int __arg3 = (int) (a3);

Definition at line 271 of file sysdep.h.

#define LOAD_ARGS_4 (   a1,
  a2,
  a3,
  a4 
)
Value:
LOAD_ARGS_3 (a1, a2, a3)                  \
  int __arg4 = (int) (a4);

Definition at line 278 of file sysdep.h.

#define LOAD_ARGS_5 (   a1,
  a2,
  a3,
  a4,
  a5 
)
Value:
LOAD_ARGS_4 (a1, a2, a3, a4)                     \
  int __arg5 = (int) (a5);

Definition at line 285 of file sysdep.h.

#define LOAD_ARGS_6 (   a1,
  a2,
  a3,
  a4,
  a5,
  a6 
)
Value:
LOAD_ARGS_5 (a1, a2, a3, a4, a5)          \
  int __arg6 = (int) (a6);

Definition at line 292 of file sysdep.h.

#define LOAD_REGS_0

Definition at line 255 of file sysdep.h.

#define LOAD_REGS_1
Value:
register int _d1 asm ("d1") = __arg1;            \
  LOAD_REGS_0

Definition at line 260 of file sysdep.h.

#define LOAD_REGS_2
Value:
register int _d2 asm ("d2") = __arg2;            \
  LOAD_REGS_1

Definition at line 267 of file sysdep.h.

#define LOAD_REGS_3
Value:
register int _d3 asm ("d3") = __arg3;            \
  LOAD_REGS_2

Definition at line 274 of file sysdep.h.

#define LOAD_REGS_4
Value:
register int _d4 asm ("d4") = __arg4;            \
  LOAD_REGS_3

Definition at line 281 of file sysdep.h.

#define LOAD_REGS_5
Value:
register int _d5 asm ("d5") = __arg5;            \
  LOAD_REGS_4

Definition at line 288 of file sysdep.h.

#define LOAD_REGS_6
Value:
register int _a0 asm ("a0") = __arg6;            \
  LOAD_REGS_5

Definition at line 295 of file sysdep.h.

#define SYS_ify (   syscall_name)    __NR_syscall_name

Definition at line 38 of file sysdep.h.