Back to index

glibc  2.9
Defines
sysdep.h File Reference
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
#include <errno.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_VSYSCALL(name, nr, args...)   INLINE_SYSCALL (name, nr, ##args)
#define INTERNAL_VSYSCALL(name, err, nr, args...)   INTERNAL_SYSCALL (name, err, nr, ##args)
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, nr, args...)
#define HAVE_CLOCK_GETRES_VSYSCALL   1
#define HAVE_CLOCK_GETTIME_VSYSCALL   1
#define INTERNAL_VSYSCALL_NCS(funcptr, err, nr, args...)
#define INLINE_SYSCALL(name, nr, args...)
#define INTERNAL_SYSCALL_DECL(err)   long int err
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...)
#define INTERNAL_SYSCALL(name, err, nr, args...)   INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((void) (val), __builtin_expect ((err) & (1 << 28), 0))
#define INTERNAL_SYSCALL_ERRNO(val, err)   (val)
#define LOADARGS_0(name, dummy)   r0 = name
#define LOADARGS_1(name, __arg1)
#define LOADARGS_2(name, __arg1, __arg2)
#define LOADARGS_3(name, __arg1, __arg2, __arg3)
#define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4)
#define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5)
#define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6)
#define ASM_INPUT_0   "0" (r0)
#define ASM_INPUT_1   ASM_INPUT_0, "1" (r3)
#define ASM_INPUT_2   ASM_INPUT_1, "2" (r4)
#define ASM_INPUT_3   ASM_INPUT_2, "3" (r5)
#define ASM_INPUT_4   ASM_INPUT_3, "4" (r6)
#define ASM_INPUT_5   ASM_INPUT_4, "5" (r7)
#define ASM_INPUT_6   ASM_INPUT_5, "6" (r8)
#define PTR_MANGLE(var)   (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
#define PTR_DEMANGLE(var)   PTR_MANGLE (var)

Define Documentation

#define ASM_INPUT_0   "0" (r0)

Definition at line 266 of file sysdep.h.

#define ASM_INPUT_1   ASM_INPUT_0, "1" (r3)

Definition at line 267 of file sysdep.h.

#define ASM_INPUT_2   ASM_INPUT_1, "2" (r4)

Definition at line 268 of file sysdep.h.

#define ASM_INPUT_3   ASM_INPUT_2, "3" (r5)

Definition at line 269 of file sysdep.h.

#define ASM_INPUT_4   ASM_INPUT_3, "4" (r6)

Definition at line 270 of file sysdep.h.

#define ASM_INPUT_5   ASM_INPUT_4, "5" (r7)

Definition at line 271 of file sysdep.h.

#define ASM_INPUT_6   ASM_INPUT_5, "6" (r8)

Definition at line 272 of file sysdep.h.

Definition at line 124 of file sysdep.h.

Definition at line 125 of file sysdep.h.

#define INLINE_SYSCALL (   name,
  nr,
  args... 
)
Value:
({                                                             \
    INTERNAL_SYSCALL_DECL (sc_err);                                   \
    long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args);      \
    if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err))                    \
      {                                                               \
       __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err));         \
       sc_ret = -1L;                                           \
      }                                                               \
    sc_ret;                                                    \
  })

Definition at line 162 of file sysdep.h.

#define INLINE_VSYSCALL (   name,
  nr,
  args... 
)    INLINE_SYSCALL (name, nr, ##args)

Definition at line 86 of file sysdep.h.

#define INTERNAL_SYSCALL (   name,
  err,
  nr,
  args... 
)    INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)

Definition at line 211 of file sysdep.h.

#define INTERNAL_SYSCALL_DECL (   err)    long int err

Definition at line 183 of file sysdep.h.

#define INTERNAL_SYSCALL_ERRNO (   val,
  err 
)    (val)

Definition at line 219 of file sysdep.h.

#define INTERNAL_SYSCALL_ERROR_P (   val,
  err 
)    ((void) (val), __builtin_expect ((err) & (1 << 28), 0))

Definition at line 215 of file sysdep.h.

#define INTERNAL_SYSCALL_NCS (   name,
  err,
  nr,
  args... 
)
Value:
({                                                             \
    register long int r0  __asm__ ("r0");                      \
    register long int r3  __asm__ ("r3");                      \
    register long int r4  __asm__ ("r4");                      \
    register long int r5  __asm__ ("r5");                      \
    register long int r6  __asm__ ("r6");                      \
    register long int r7  __asm__ ("r7");                      \
    register long int r8  __asm__ ("r8");                      \
    register long int r9  __asm__ ("r9");                      \
    register long int r10 __asm__ ("r10");                            \
    register long int r11 __asm__ ("r11");                            \
    register long int r12 __asm__ ("r12");                            \
    LOADARGS_##nr(name, args);                                 \
    __asm__ __volatile__                                       \
      ("sc   \n\t"                                             \
       "mfcr %0"                                               \
       : "=&r" (r0),                                           \
        "=&r" (r3), "=&r" (r4), "=&r" (r5),  "=&r" (r6),  "=&r" (r7), \
        "=&r" (r8), "=&r" (r9), "=&r" (r10), "=&r" (r11), "=&r" (r12) \
       : ASM_INPUT_##nr                                               \
       : "cr0", "ctr", "memory");                              \
    err = r0;                                                  \
    (int) r3;                                                  \
  })

Definition at line 186 of file sysdep.h.

#define INTERNAL_VSYSCALL (   name,
  err,
  nr,
  args... 
)    INTERNAL_SYSCALL (name, err, nr, ##args)

Definition at line 108 of file sysdep.h.

#define INTERNAL_VSYSCALL_NCS (   funcptr,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    register void *r0  __asm__ ("r0");                                      \
    register long int r3  __asm__ ("r3");                            \
    register long int r4  __asm__ ("r4");                            \
    register long int r5  __asm__ ("r5");                            \
    register long int r6  __asm__ ("r6");                            \
    register long int r7  __asm__ ("r7");                            \
    register long int r8  __asm__ ("r8");                            \
    register long int r9  __asm__ ("r9");                            \
    register long int r10 __asm__ ("r10");                                  \
    register long int r11 __asm__ ("r11");                                  \
    register long int r12 __asm__ ("r12");                                  \
    LOADARGS_##nr (funcptr, args);                                   \
    __asm__ __volatile__                                             \
      ("mtctr %0\n\t"                                                       \
       "bctrl\n\t"                                                   \
       "mfcr %0"                                                     \
       : "=&r" (r0),                                                 \
        "=&r" (r3), "=&r" (r4), "=&r" (r5),  "=&r" (r6),  "=&r" (r7),       \
        "=&r" (r8), "=&r" (r9), "=&r" (r10), "=&r" (r11), "=&r" (r12)       \
       : ASM_INPUT_##nr                                                     \
       : "cr0", "ctr", "lr", "memory");                                     \
    err = (long int) r0;                                             \
    (int) r3;                                                        \
  })

Definition at line 134 of file sysdep.h.

#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK (   name,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    long int sc_ret = ENOSYS;                                               \
                                                                     \
    if (__vdso_##name != NULL)                                              \
      sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args);             \
    else                                                             \
      err = 1 << 28;                                                 \
    sc_ret;                                                          \
  })

Definition at line 112 of file sysdep.h.

#define LOADARGS_0 (   name,
  dummy 
)    r0 = name

Definition at line 221 of file sysdep.h.

#define LOADARGS_1 (   name,
  __arg1 
)
Value:
long int arg1 = (long int) (__arg1);      \
  LOADARGS_0(name, 0);                                     \
       extern void __illegally_sized_syscall_arg1 (void); \
       if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 4) \
         __illegally_sized_syscall_arg1 (); \
       r3 = arg1

Definition at line 223 of file sysdep.h.

#define LOADARGS_2 (   name,
  __arg1,
  __arg2 
)
Value:
long int arg2 = (long int) (__arg2); \
       LOADARGS_1(name, __arg1); \
       extern void __illegally_sized_syscall_arg2 (void); \
       if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 4) \
         __illegally_sized_syscall_arg2 (); \
       r4 = arg2

Definition at line 230 of file sysdep.h.

#define LOADARGS_3 (   name,
  __arg1,
  __arg2,
  __arg3 
)
Value:
long int arg3 = (long int) (__arg3); \
       LOADARGS_2(name, __arg1, __arg2); \
       extern void __illegally_sized_syscall_arg3 (void); \
       if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 4) \
         __illegally_sized_syscall_arg3 (); \
       r5 = arg3

Definition at line 237 of file sysdep.h.

#define LOADARGS_4 (   name,
  __arg1,
  __arg2,
  __arg3,
  __arg4 
)
Value:
long int arg4 = (long int) (__arg4); \
       LOADARGS_3(name, __arg1, __arg2, __arg3); \
       extern void __illegally_sized_syscall_arg4 (void); \
       if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 4) \
         __illegally_sized_syscall_arg4 (); \
       r6 = arg4

Definition at line 244 of file sysdep.h.

#define LOADARGS_5 (   name,
  __arg1,
  __arg2,
  __arg3,
  __arg4,
  __arg5 
)
Value:
long int arg5 = (long int) (__arg5); \
       LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \
       extern void __illegally_sized_syscall_arg5 (void); \
       if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 4) \
         __illegally_sized_syscall_arg5 (); \
       r7 = arg5

Definition at line 251 of file sysdep.h.

#define LOADARGS_6 (   name,
  __arg1,
  __arg2,
  __arg3,
  __arg4,
  __arg5,
  __arg6 
)
Value:
long int arg6 = (long int) (__arg6); \
       LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \
       extern void __illegally_sized_syscall_arg6 (void); \
       if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 4) \
         __illegally_sized_syscall_arg6 (); \
       r8 = arg6

Definition at line 258 of file sysdep.h.

#define PTR_DEMANGLE (   var)    PTR_MANGLE (var)

Definition at line 297 of file sysdep.h.

#define PTR_MANGLE (   var)    (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())

Definition at line 295 of file sysdep.h.

#define SYS_ify (   syscall_name)    __NR_syscall_name

Definition at line 51 of file sysdep.h.