Back to index

glibc  2.9
Defines
sysdep.h File Reference
#include <sysdeps/s390/s390-32/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 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 int) (val) >= 0xfffff001u)
#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_syscall   0

Definition at line 34 of file sysdep.h.

#define ASMFMT_0

Definition at line 271 of file sysdep.h.

#define ASMFMT_1   , "0" (gpr2)

Definition at line 272 of file sysdep.h.

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

Definition at line 273 of file sysdep.h.

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

Definition at line 274 of file sysdep.h.

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

Definition at line 275 of file sysdep.h.

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

Definition at line 276 of file sysdep.h.

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

Definition at line 277 of file sysdep.h.

#define DECLARGS_0 ( )

Definition at line 252 of file sysdep.h.

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

Definition at line 253 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 255 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 258 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 261 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 264 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 267 of file sysdep.h.

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

Definition at line 188 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 240 of file sysdep.h.

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

Definition at line 199 of file sysdep.h.

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

Definition at line 202 of file sysdep.h.

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

Definition at line 250 of file sysdep.h.

#define INTERNAL_SYSCALL_ERROR_P (   val,
  err 
)    ((unsigned int) (val) >= 0xfffff001u)

Definition at line 246 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 int _ret asm("2");                                             \
    asm volatile (                                                   \
    "svc    0\n\t"                                                   \
    : "=d" (_ret)                                                    \
    : "d" (_nr) ASMFMT_##nr                                          \
    : "memory" );                                                    \
    _ret; })

Definition at line 227 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 int _ret asm("2");                                             \
    asm volatile (                                                   \
    "svc    0\n\t"                                                   \
    : "=d" (_ret)                                                    \
    : "d" (_nr) ASMFMT_##nr                                          \
    : "memory" );                                                    \
    _ret; })

Definition at line 214 of file sysdep.h.

#define PTR_DEMANGLE (   var)    PTR_MANGLE (var)

Definition at line 297 of file sysdep.h.

#define PTR_MANGLE (   var)    (var) = (void *) ((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 37 of file sysdep.h.