Back to index

glibc  2.9
Defines | Variables
sysdep-cancel.h File Reference
#include <sysdep.h>
#include <tls.h>
#include <pt-machine.h>
#include <linuxthreads/internals.h>

Go to the source code of this file.

Defines

#define PSEUDO(name, syscall_name, args)
#define PUSHARGS_0   /* Nothing. */
#define PUSHARGS_1   PUSHARGS_0 movq %rdi, 8(%rsp);
#define PUSHARGS_2   PUSHARGS_1 movq %rsi, 16(%rsp);
#define PUSHARGS_3   PUSHARGS_2 movq %rdx, 24(%rsp);
#define PUSHARGS_4   PUSHARGS_3 movq %rcx, 32(%rsp);
#define PUSHARGS_5   PUSHARGS_4 movq %r8, 40(%rsp);
#define PUSHARGS_6   PUSHARGS_5 movq %r9, 48(%rsp);
#define POPARGS_0   /* Nothing. */
#define POPARGS_1   POPARGS_0 movq 8(%rsp), %rdi;
#define POPARGS_2   POPARGS_1 movq 16(%rsp), %rsi;
#define POPARGS_3   POPARGS_2 movq 24(%rsp), %rdx;
#define POPARGS_4   POPARGS_3 movq 32(%rsp), %r10;
#define POPARGS_5   POPARGS_4 movq 40(%rsp), %r8;
#define POPARGS_6   POPARGS_5 movq 48(%rsp), %r9;
#define SAVESTK_0   subq $24, %rsp;cfi_adjust_cfa_offset(24);
#define SAVESTK_1   SAVESTK_0
#define SAVESTK_2   SAVESTK_1
#define SAVESTK_3   subq $40, %rsp;cfi_adjust_cfa_offset(40);
#define SAVESTK_4   SAVESTK_3
#define SAVESTK_5   subq $56, %rsp;cfi_adjust_cfa_offset(56);
#define SAVESTK_6   SAVESTK_5
#define RESTSTK_0   addq $24,%rsp;cfi_adjust_cfa_offset(-24);
#define RESTSTK_1   RESTSTK_0
#define RESTSTK_2   RESTSTK_1
#define RESTSTK_3   addq $40, %rsp;cfi_adjust_cfa_offset(-40);
#define RESTSTK_4   RESTSTK_3
#define RESTSTK_5   addq $56, %rsp;cfi_adjust_cfa_offset(-56);
#define RESTSTK_6   RESTSTK_5
#define CENABLE   call __libc_enable_asynccancel;
#define CDISABLE   call __libc_disable_asynccancel;
#define __local_multiple_threads   __libc_multiple_threads
#define SINGLE_THREAD_P   __builtin_expect (__local_multiple_threads == 0, 1)

Variables

int __local_multiple_threads attribute_hidden

Define Documentation

#define __local_multiple_threads   __libc_multiple_threads

Definition at line 100 of file sysdep-cancel.h.

Definition at line 99 of file sysdep-cancel.h.

#define CENABLE   call __libc_enable_asynccancel;

Definition at line 98 of file sysdep-cancel.h.

#define POPARGS_0   /* Nothing. */

Definition at line 68 of file sysdep-cancel.h.

#define POPARGS_1   POPARGS_0 movq 8(%rsp), %rdi;

Definition at line 69 of file sysdep-cancel.h.

#define POPARGS_2   POPARGS_1 movq 16(%rsp), %rsi;

Definition at line 70 of file sysdep-cancel.h.

#define POPARGS_3   POPARGS_2 movq 24(%rsp), %rdx;

Definition at line 71 of file sysdep-cancel.h.

#define POPARGS_4   POPARGS_3 movq 32(%rsp), %r10;

Definition at line 72 of file sysdep-cancel.h.

#define POPARGS_5   POPARGS_4 movq 40(%rsp), %r8;

Definition at line 73 of file sysdep-cancel.h.

#define POPARGS_6   POPARGS_5 movq 48(%rsp), %r9;

Definition at line 74 of file sysdep-cancel.h.

#define PSEUDO (   name,
  syscall_name,
  args 
)
Value:
.text;                                                        \
  ENTRY (name)                                                              \
    SINGLE_THREAD_P;                                                 \
    jne L(pseudo_cancel);                                            \
    DO_CALL (syscall_name, args);                                    \
    cmpq $-4095, %rax;                                                      \
    jae SYSCALL_ERROR_LABEL;                                                \
    ret;                                                             \
  L(pseudo_cancel):                                                  \
    /* Save registers that might get destroyed.  */                         \
    SAVESTK_##args                                                   \
    PUSHARGS_##args                                                  \
    CENABLE                                                          \
    /* Restore registers.  */                                               \
    POPARGS_##args                                                   \
    /* The return value from CENABLE is argument for CDISABLE.  */          \
    movq %rax, (%rsp);                                                      \
    movl $SYS_ify (syscall_name), %eax;                                     \
    syscall;                                                         \
    movq (%rsp), %rdi;                                                      \
    /* Save %rax since it's the error code from the syscall.  */            \
    movq %rax, 8(%rsp);                                                     \
    CDISABLE                                                         \
    movq 8(%rsp), %rax;                                                     \
    RESTSTK_##args                                                   \
    cmpq $-4095, %rax;                                                      \
    jae SYSCALL_ERROR_LABEL;                                                \
  L(pseudo_end):

Definition at line 30 of file sysdep-cancel.h.

#define PUSHARGS_0   /* Nothing. */

Definition at line 60 of file sysdep-cancel.h.

#define PUSHARGS_1   PUSHARGS_0 movq %rdi, 8(%rsp);

Definition at line 61 of file sysdep-cancel.h.

#define PUSHARGS_2   PUSHARGS_1 movq %rsi, 16(%rsp);

Definition at line 62 of file sysdep-cancel.h.

#define PUSHARGS_3   PUSHARGS_2 movq %rdx, 24(%rsp);

Definition at line 63 of file sysdep-cancel.h.

#define PUSHARGS_4   PUSHARGS_3 movq %rcx, 32(%rsp);

Definition at line 64 of file sysdep-cancel.h.

#define PUSHARGS_5   PUSHARGS_4 movq %r8, 40(%rsp);

Definition at line 65 of file sysdep-cancel.h.

#define PUSHARGS_6   PUSHARGS_5 movq %r9, 48(%rsp);

Definition at line 66 of file sysdep-cancel.h.

#define RESTSTK_0   addq $24,%rsp;cfi_adjust_cfa_offset(-24);

Definition at line 85 of file sysdep-cancel.h.

#define RESTSTK_1   RESTSTK_0

Definition at line 86 of file sysdep-cancel.h.

#define RESTSTK_2   RESTSTK_1

Definition at line 87 of file sysdep-cancel.h.

#define RESTSTK_3   addq $40, %rsp;cfi_adjust_cfa_offset(-40);

Definition at line 88 of file sysdep-cancel.h.

#define RESTSTK_4   RESTSTK_3

Definition at line 89 of file sysdep-cancel.h.

#define RESTSTK_5   addq $56, %rsp;cfi_adjust_cfa_offset(-56);

Definition at line 90 of file sysdep-cancel.h.

#define RESTSTK_6   RESTSTK_5

Definition at line 91 of file sysdep-cancel.h.

#define SAVESTK_0   subq $24, %rsp;cfi_adjust_cfa_offset(24);

Definition at line 77 of file sysdep-cancel.h.

#define SAVESTK_1   SAVESTK_0

Definition at line 78 of file sysdep-cancel.h.

#define SAVESTK_2   SAVESTK_1

Definition at line 79 of file sysdep-cancel.h.

#define SAVESTK_3   subq $40, %rsp;cfi_adjust_cfa_offset(40);

Definition at line 80 of file sysdep-cancel.h.

#define SAVESTK_4   SAVESTK_3

Definition at line 81 of file sysdep-cancel.h.

#define SAVESTK_5   subq $56, %rsp;cfi_adjust_cfa_offset(56);

Definition at line 82 of file sysdep-cancel.h.

#define SAVESTK_6   SAVESTK_5

Definition at line 83 of file sysdep-cancel.h.

Definition at line 109 of file sysdep-cancel.h.


Variable Documentation

Definition at line 25 of file init-first.c.