Back to index

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

Go to the source code of this file.

Defines

#define __NR_syscall   0
#define __NR_pread   __NR_pread64
#define __NR_pwrite   __NR_pwrite64
#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_DIRECT(name, err, nr, args...)
#define INTERNAL_SYSCALL_SVC0(name, err, nr, args...)
#define INTERNAL_SYSCALL_NCS(no, err, nr, args...)
#define INTERNAL_SYSCALL(name, err, nr, args...)
#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((unsigned long) (val) >= -4095UL)
#define INTERNAL_SYSCALL_ERRNO(val, err)   (-(val))
#define DECLARGS_0()
#define DECLARGS_1(arg1)   register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
#define DECLARGS_2(arg1, arg2)
#define DECLARGS_3(arg1, arg2, arg3)
#define DECLARGS_4(arg1, arg2, arg3, arg4)
#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5)
#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6)
#define ASMFMT_0
#define ASMFMT_1   , "0" (gpr2)
#define ASMFMT_2   , "0" (gpr2), "d" (gpr3)
#define ASMFMT_3   , "0" (gpr2), "d" (gpr3), "d" (gpr4)
#define ASMFMT_4   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
#define ASMFMT_5   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
#define ASMFMT_6   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
#define PTR_MANGLE(var)   (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
#define PTR_DEMANGLE(var)   PTR_MANGLE (var)

Define Documentation

#define __NR_pread   __NR_pread64

Definition at line 42 of file sysdep.h.

#define __NR_pwrite   __NR_pwrite64

Definition at line 45 of file sysdep.h.

#define __NR_syscall   0

Definition at line 35 of file sysdep.h.

#define ASMFMT_0

Definition at line 273 of file sysdep.h.

#define ASMFMT_1   , "0" (gpr2)

Definition at line 274 of file sysdep.h.

#define ASMFMT_2   , "0" (gpr2), "d" (gpr3)

Definition at line 275 of file sysdep.h.

#define ASMFMT_3   , "0" (gpr2), "d" (gpr3), "d" (gpr4)

Definition at line 276 of file sysdep.h.

#define ASMFMT_4   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)

Definition at line 277 of file sysdep.h.

#define ASMFMT_5   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)

Definition at line 278 of file sysdep.h.

#define ASMFMT_6   , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)

Definition at line 279 of file sysdep.h.

#define DECLARGS_0 ( )

Definition at line 254 of file sysdep.h.

#define DECLARGS_1 (   arg1)    register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);

Definition at line 255 of file sysdep.h.

#define DECLARGS_2 (   arg1,
  arg2 
)
Value:
DECLARGS_1(arg1) \
       register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);

Definition at line 257 of file sysdep.h.

#define DECLARGS_3 (   arg1,
  arg2,
  arg3 
)
Value:
DECLARGS_2(arg1, arg2) \
       register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);

Definition at line 260 of file sysdep.h.

#define DECLARGS_4 (   arg1,
  arg2,
  arg3,
  arg4 
)
Value:
DECLARGS_3(arg1, arg2, arg3) \
       register unsigned long gpr5 asm ("5") = (unsigned long)(arg4);

Definition at line 263 of file sysdep.h.

#define DECLARGS_5 (   arg1,
  arg2,
  arg3,
  arg4,
  arg5 
)
Value:
DECLARGS_4(arg1, arg2, arg3, arg4) \
       register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);

Definition at line 266 of file sysdep.h.

#define DECLARGS_6 (   arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6 
)
Value:
DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
       register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);

Definition at line 269 of file sysdep.h.

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

Definition at line 190 of file sysdep.h.

#define INTERNAL_SYSCALL (   name,
  err,
  nr,
  args... 
)
Value:
(((__NR_##name) < 256) ?                                             \
    INTERNAL_SYSCALL_DIRECT(name, err, nr, args) :                          \
    INTERNAL_SYSCALL_SVC0(name, err,nr, args))

Definition at line 242 of file sysdep.h.

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

Definition at line 201 of file sysdep.h.

#define INTERNAL_SYSCALL_DIRECT (   name,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    DECLARGS_##nr(args)                                                     \
    register long _ret asm("2");                                     \
    asm volatile (                                                   \
    "svc    %b1\n\t"                                                 \
    : "=d" (_ret)                                                    \
    : "i" (__NR_##name) ASMFMT_##nr                                         \
    : "memory" );                                                    \
    _ret; })

Definition at line 204 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 long) (val) >= -4095UL)

Definition at line 248 of file sysdep.h.

#define INTERNAL_SYSCALL_NCS (   no,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    DECLARGS_##nr(args)                                                     \
    register unsigned long _nr asm("1") = (unsigned long)(no);              \
    register long _ret asm("2");                                     \
    asm volatile (                                                   \
    "svc    0\n\t"                                                   \
    : "=d" (_ret)                                                    \
    : "d" (_nr) ASMFMT_##nr                                          \
    : "memory" );                                                    \
    _ret; })

Definition at line 229 of file sysdep.h.

#define INTERNAL_SYSCALL_SVC0 (   name,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    DECLARGS_##nr(args)                                                     \
    register unsigned long _nr asm("1") = (unsigned long)(__NR_##name);            \
    register long _ret asm("2");                                     \
    asm volatile (                                                   \
    "svc    0\n\t"                                                   \
    : "=d" (_ret)                                                    \
    : "d" (_nr) ASMFMT_##nr                                          \
    : "memory" );                                                    \
    _ret; })

Definition at line 216 of file sysdep.h.

#define PTR_DEMANGLE (   var)    PTR_MANGLE (var)

Definition at line 300 of file sysdep.h.

#define PTR_MANGLE (   var)    (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())

Definition at line 298 of file sysdep.h.

#define SYS_ify (   syscall_name)    __NR_##syscall_name

Definition at line 49 of file sysdep.h.