diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 09:27:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 09:27:26 +0000 |
commit | 131fd126cddad8379741597892cdfcd5cab3a49f (patch) | |
tree | ae4e3dc6182f230ae952cd95fecb2ee20948387b /linuxthreads/sysdeps/unix/sysv/linux/ia64 | |
parent | ca78735936e87a2b72c553636e815bd555c4ef7e (diff) | |
download | glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.gz glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.bz2 glibc-131fd126cddad8379741597892cdfcd5cab3a49f.zip |
Update.
2002-12-28 Ulrich Drepper <drepper@redhat.com>
* descr.h (struct pthread): Move header.data.list to the back of the
struct.
* sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
(MULTIPLE_THREADS_OFFSET): Adjust offset.
(SYSINFO_OFFSEET): Likewise.
2002-12-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
Define.
(DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
* sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
(USE_DL_SYSINFO): Undef.
2002-12-22 Jakub Jelinek <jakub@redhat.com>
* Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
$(common-objpfx)libc.so.
* tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
it is bigger than pipe buffer size even on arches with bigger
page size.
(tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/ia64')
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h | 118 |
2 files changed, 121 insertions, 0 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile b/linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile new file mode 100644 index 0000000000..e03aee99fc --- /dev/null +++ b/linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),linuxthreads) +libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask +endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h new file mode 100644 index 0000000000..d74c044981 --- /dev/null +++ b/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h @@ -0,0 +1,118 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <sysdep.h> +#include <tls.h> +#ifndef ASSEMBLER +# include <linuxthreads/internals.h> +#endif + +#define MULTIPLE_THREADS_OFFSET 40 + +#if !defined NOT_IN_libc || defined IS_IN_libpthread + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ +.text; \ +ENTRY (name) \ + adds r14 = MULTIPLE_THREADS_OFFSET, r13;; \ + ld4 r14 = [r14]; \ + mov r15 = SYS_ify(syscall_name);; \ + cmp4.ne p6, p7 = 0, r14; \ +(p6) br.cond.spnt .Lpseudo_cancel;; \ + break __BREAK_SYSCALL;; \ + cmp.eq p6,p0=-1,r10; \ +(p6) br.cond.spnt.few __syscall_error; \ + ret;; \ +.Lpseudo_cancel: \ + .prologue; \ + .regstk args, 5, args, 0; \ + .save ar.pfs, loc0; \ + alloc loc0 = ar.pfs, args, 5, args, 0; \ + .save rp, loc1; \ + mov loc1 = rp;; \ + .body; \ + CENABLE;; \ + mov loc2 = r8; \ + COPY_ARGS_##args \ + mov r15 = SYS_ify(syscall_name); \ + break __BREAK_SYSCALL;; \ + mov loc3 = r8; \ + mov loc4 = r10; \ + mov out0 = loc2; \ + CDISABLE;; \ + cmp.eq p6,p0=-1,loc4; \ +(p6) br.cond.spnt.few __syscall_error_##args; \ + mov r8 = loc3; \ + mov rp = loc1; \ + mov ar.pfs = loc0; \ +.Lpseudo_end: \ + ret; \ + .endp name; \ +.section .gnu.linkonce.t.__syscall_error_##args, "ax"; \ + .align 32; \ + .proc __syscall_error_##args; \ + .global __syscall_error_##args; \ + .hidden __syscall_error_##args; \ +__syscall_error_##args: \ + .prologue; \ + .regstk args, 5, args, 0; \ + .save ar.pfs, loc0; \ + .save rp, loc1; \ + .body; \ + mov loc4 = r1;; \ + br.call.sptk.many b0 = __errno_location;; \ + st4 [r8] = loc3; \ + mov r1 = loc4; \ + mov rp = loc1; \ + mov r8 = -1; \ + mov ar.pfs = loc0 + +# ifdef IS_IN_libpthread +# define CENABLE br.call.sptk.many b0 = __pthread_enable_asynccancel +# define CDISABLE br.call.sptk.many b0 = __pthread_disable_asynccancel +# else +# define CENABLE br.call.sptk.many b0 = __libc_enable_asynccancel +# define CDISABLE br.call.sptk.many b0 = __libc_disable_asynccancel +# endif + +#define COPY_ARGS_0 /* Nothing */ +#define COPY_ARGS_1 COPY_ARGS_0 mov out0 = in0; +#define COPY_ARGS_2 COPY_ARGS_1 mov out1 = in1; +#define COPY_ARGS_3 COPY_ARGS_2 mov out2 = in2; +#define COPY_ARGS_4 COPY_ARGS_3 mov out3 = in3; +#define COPY_ARGS_5 COPY_ARGS_4 mov out4 = in4; +#define COPY_ARGS_6 COPY_ARGS_5 mov out5 = in5; +#define COPY_ARGS_7 COPY_ARGS_6 mov out6 = in6; + +# ifndef ASSEMBLER +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + p_header.data.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P \ + adds r14 = MULTIPLE_THREADS_OFFSET, r13 ;; ld4 r14 = [r14] ;; cmp4.ne p6, p7 = 0, r14 ;; +# endif + +#elif !defined ASSEMBLER + +/* This code should never be used but we define it anyhow. */ +# define SINGLE_THREAD_P (1) + +#endif |