Back to index

glibc  2.9
Defines
sysdep.h File Reference
#include "../../../am33/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 L(name)   .L##name
#define INLINE_SYSCALL(name, nr, args...)
#define INTERNAL_SYSCALL(name, err, nr, args...)
#define INTERNAL_SYSCALL_DECL(err)   do { } while (0)
#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((unsigned int) (val) >= (unsigned long)-125)
#define INTERNAL_SYSCALL_ERRNO(val, err)   (-(val))
#define inline_syscall0(name, dummy...)
#define inline_syscall1(name, arg1)
#define inline_syscall2(name, arg1, arg2)
#define inline_syscall3(name, arg1, arg2, arg3)
#define inline_syscall4(name, arg1, arg2, arg3, arg4)
#define inline_syscall5(name, arg1, arg2, arg3, arg4, arg5)
#define inline_syscall6(name, arg1, arg2, arg3, arg4, arg5, arg6)

Define Documentation

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

Definition at line 208 of file sysdep.h.

#define inline_syscall0 (   name,
  dummy... 
)
Value:
__asm__ __volatile__ ("syscall 0" \
                     : "+d" (__sc0) \
                     : : "memory")

Definition at line 235 of file sysdep.h.

#define inline_syscall1 (   name,
  arg1 
)
Value:
register long __sc1 asm ("a0") = (long) (arg1); \
inline_syscall0 (name); \
__asm__ __volatile__ ("" : : "r" (__sc1))

Definition at line 240 of file sysdep.h.

#define inline_syscall2 (   name,
  arg1,
  arg2 
)
Value:
register long __sc2 asm ("d1") = (long) (arg2); \
inline_syscall1 (name,(arg1)); \
__asm__ __volatile__ ("" : : "r" (__sc2))

Definition at line 245 of file sysdep.h.

#define inline_syscall3 (   name,
  arg1,
  arg2,
  arg3 
)
Value:
long __sc3v = (long) (arg3); \
register long __sc1 asm ("a0") = (long) (arg1); \
register long __sc2 asm ("d1") = (long) (arg2); \
register long __sc3 asm ("a3") = __sc3;   \
register long __sc3c; \
__asm__ __volatile__ ("mov %1,%0" : "=&r" (__sc3c) : "r" (__sc3)); \
__sc3 = __sc3v; \
__asm__ __volatile__ ("" : : "r" (__sc3c), "r" (__sc3)); \
inline_syscall0 (name); \
__sc3 = __sc3c; \
__asm__ __volatile__ ("" : : "r" (__sc3), "r" (__sc2), "r" (__sc1))

Definition at line 260 of file sysdep.h.

#define inline_syscall4 (   name,
  arg1,
  arg2,
  arg3,
  arg4 
)
Value:
register long __sc4 asm ("a2") = (long) (arg4); \
inline_syscall3 (name,(arg1),(arg2),(arg3)); \
__asm__ __volatile__ ("" : : "r" (__sc4))

Definition at line 299 of file sysdep.h.

#define inline_syscall5 (   name,
  arg1,
  arg2,
  arg3,
  arg4,
  arg5 
)
Value:
register long __sc5 asm ("d3") = (long) (arg5); \
inline_syscall4 (name,(arg1),(arg2),(arg3),(arg4)); \
__asm__ __volatile__ ("" : : "r" (__sc5))

Definition at line 305 of file sysdep.h.

#define inline_syscall6 (   name,
  arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6 
)
Value:
register long __sc6 asm ("d2") = (long) (arg6); \
inline_syscall5 (name,(arg1),(arg2),(arg3),(arg4),(arg5)); \
__asm__ __volatile__ ("" : : "r" (__sc6))

Definition at line 310 of file sysdep.h.

#define INTERNAL_SYSCALL (   name,
  err,
  nr,
  args... 
)
Value:
({                                                             \
       register long __sc0 asm ("d0") = __NR_##name;                  \
       inline_syscall##nr(name, ## args);                      \
       __sc0;                                                  \
})

Definition at line 218 of file sysdep.h.

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

Definition at line 226 of file sysdep.h.

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

Definition at line 233 of file sysdep.h.

#define INTERNAL_SYSCALL_ERROR_P (   val,
  err 
)    ((unsigned int) (val) >= (unsigned long)-125)

Definition at line 229 of file sysdep.h.

#define L (   name)    .L##name

Definition at line 36 of file sysdep.h.

#define SYS_ify (   syscall_name)    __NR_##syscall_name

Definition at line 32 of file sysdep.h.