From ae9ecd08db965a4987a4d1351e2c51deb5c6e9b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Feb 2003 02:50:59 +0000 Subject: Update. 2003-02-07 Jim Meyering * io/ftw.c: Add autoconf-recommended block of alloca-related code. Include autoconf-recommended block of dirent/NAMELEN-related definitions and includes. Use NAMELEN throughout, rather than _D_EXACT_NAMLEN. [_LIBC]: Define NAMELEN to _D_EXACT_NAMLEN. [!_LIBC] (__getcwd): Define to xgetcwd and declare xgetcwd. (stpcpy): Declare, if necessary. (mempcpy): Define, if necessary. [!_LIBC] (__stpcpy, __mempcpy): Define. [!_LIBC] (LXSTAT, XSTAT): Define. (lstat) [!LIBC && !LSTAT_FOLLOWS_SLASHED_SYMLINK]: Define to rpl_lstat. (find_object): Don't use c99-style struct initializer. Tweak wording in a couple comments. --- linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c | 8 +------- .../sysdeps/unix/sysv/linux/sh/sysdep-cancel.h | 13 ++++++++++++- linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S | 18 ++++++++++++++++-- 3 files changed, 29 insertions(+), 10 deletions(-) (limited to 'linuxthreads/sysdeps/unix') diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c b/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c index 1cf51a8e09..1cdb98f0f7 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c +++ b/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support for SH. Linuxthread version. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it @@ -77,12 +77,6 @@ _init:\n\ .long __gmon_start__@PLT\n\ .L24:\n\ .long __pthread_initialize_minimal@PLT\n\ - .data\n\ - .global __fpscr_values\n\ -__fpscr_values:\n\ - .long 0\n\ - .long 0x80000\n\ - .previous\n\ 1:\n\ ALIGN\n\ END_INIT\n\ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h index b357eb4e88..57db351735 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h @@ -52,6 +52,7 @@ add _IMP16,r15; \ lds.l @r15+,pr; \ DO_CALL(syscall_name, args); \ + SYSCALL_INST_PAD; \ sts.l pr,@-r15; \ mov.l r0,@-r15; \ CDISABLE; \ @@ -106,6 +107,7 @@ .align 2; \ 1: .long __local_enable_asynccancel - 0b; \ 2: + # define CDISABLE \ mov.l 1f,r0; \ bsrf r0; \ @@ -129,6 +131,7 @@ extern int __local_multiple_threads attribute_hidden; # if !defined PIC # define SINGLE_THREAD_P \ mov.l 1f,r0; \ + mov.l @r0,r0; \ bra 2f; \ tst r0,r0; \ .align 2; \ @@ -136,7 +139,15 @@ extern int __local_multiple_threads attribute_hidden; 2: # elif defined FLOATING_STACKS && USE___THREAD # define SINGLE_THREAD_P \ - mov.l @(MULTIPLE_THREADS_OFFSET,gbr),r0; tst r0,r0 + stc gbr,r0; \ + mov.w 0f,r1; \ + sub r1,r0; \ + mov.l @(MULTIPLE_THREADS_OFFSET,r0),r0; \ + bra 1f; \ + tst r0,r0; \ + 0: .word TLS_PRE_TCB_SIZE; \ + 1: + # else # define SINGLE_THREAD_P \ mov r12,r2; \ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S index f796e31088..b118ca34d7 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S +++ b/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S @@ -26,8 +26,14 @@ and the process ID of the new process to the old process. */ ENTRY (__vfork) - SINGLE_THREAD_P - bf .Lhidden_fork +#ifdef SHARED + mov.l .Lpthread_func, r0 + mov.l @(r0,r12), r0 +#else + mov.l .Lpthread_fork, r0 +#endif + tst r0, r0 + bf .Lhidden_fork mov.w .L1, r3 trapa #0x10 @@ -42,6 +48,14 @@ ENTRY (__vfork) rts nop .L1: .word __NR_vfork + .align 2 +#ifdef SHARED +.Lpthread_func: + .long __libc_pthread_functions@GOTOFF +#else +.Lpthread_fork: + .long __pthread_fork +#endif .Lhidden_fork: mov.l .L2, r1 -- cgit v1.2.3