]>
sourceware.org Git - glibc.git/blob - nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1 /* Copyright (C) 2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 # include <nptl/pthreadP.h>
26 #if !defined NOT_IN_libc || defined IS_IN_libpthread
29 # define PSEUDO(name, syscall_name, args) \
32 cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \
33 jne L(pseudo_cancel); \
34 DO_CALL (syscall_name, args); \
36 jae SYSCALL_ERROR_LABEL; \
43 movl $SYS_ify (syscall_name), %eax; \
48 jae SYSCALL_ERROR_LABEL; \
51 # define SAVE_OLDTYPE_0 movl %eax, %edx;
52 # define SAVE_OLDTYPE_1 SAVE_OLDTYPE_0
53 # define SAVE_OLDTYPE_2 pushl %eax;
54 # define SAVE_OLDTYPE_3 SAVE_OLDTYPE_2
55 # define SAVE_OLDTYPE_4 SAVE_OLDTYPE_2
56 # define SAVE_OLDTYPE_5 SAVE_OLDTYPE_2
58 # define DOCARGS_0 DOARGS_0
59 # define DOCARGS_1 DOARGS_1
60 # define DOCARGS_2 _DOARGS_2 (12)
61 # define DOCARGS_3 _DOARGS_3 (20)
62 # define DOCARGS_4 _DOARGS_4 (28)
63 # define DOCARGS_5 _DOARGS_5 (36)
65 # ifdef IS_IN_libpthread
66 # define CENABLE call __pthread_enable_asynccancel;
67 # define CDISABLE call __pthread_disable_asynccancel
69 # define CENABLE call __libc_enable_asynccancel;
70 # define CDISABLE call __libc_disable_asynccancel
72 # define POPCARGS_0 pushl %eax; movl %ecx, %eax; CDISABLE; popl %eax;
73 # define POPCARGS_1 POPCARGS_0
74 # define POPCARGS_2 xchgl (%esp), %eax; CDISABLE; popl %eax;
75 # define POPCARGS_3 POPCARGS_2
76 # define POPCARGS_4 POPCARGS_2
77 # define POPCARGS_5 POPCARGS_2
79 # define SINGLE_THREAD_P \
80 __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
81 header.data.multiple_threads) == 0, 1)
85 /* This code should never be used but we define it anyhow. */
86 # define SINGLE_THREAD_P (1)
This page took 0.042655 seconds and 6 git commands to generate.