2001-02-18  Mark Kettenis  <kettenis@gnu.org>

	* malloc/mtrace.c [USE_IN_LIBIO]: Define fopen as _IO_fopen64.
	(mtrace): Revert 2001-02-13 patch: use fopen instead of fopen64.

2001-02-17  H.J. Lu  <hjl@gnu.org>

	* sysdeps/unix/sysv/linux/ia64/clone2.S: Use clone2 and don't use
	scratch registers across the system call.
This commit is contained in:
Ulrich Drepper 2001-02-19 18:55:39 +00:00
parent b99a3ee222
commit 4c48dc9386
6 changed files with 36 additions and 33 deletions

View File

@ -1,3 +1,13 @@
2001-02-18 Mark Kettenis <kettenis@gnu.org>
* malloc/mtrace.c [USE_IN_LIBIO]: Define fopen as _IO_fopen64.
(mtrace): Revert 2001-02-13 patch: use fopen instead of fopen64.
2001-02-17 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/ia64/clone2.S: Use clone2 and don't use
scratch registers across the system call.
2001-02-19 Andreas Jaeger <aj@suse.de>
* malloc/Makefile (tests): Run mtrace only when perl is available.

View File

@ -1,3 +1,8 @@
2001-02-17 Jakub Jelinek <jakub@redhat.com>
* spinlock.c (__pthread_lock): Force lock->__status to be read from
memory on every spin.
2001-02-10 Andreas Jaeger <aj@suse.de>
* Makefile (extra-objs): New.

View File

@ -1,3 +1,8 @@
2001-02-19 Ulrich Drepper <drepper@redhat.com>
* locales/th_TH: Remove name_ms entry.
Patch by Theppitak Karoonboonyanan <thep@links.nectec.or.th>.
2001-02-16 Ulrich Drepper <drepper@redhat.com>
* locales/th_TH: Update era information and some of the new

View File

@ -950,7 +950,6 @@ name_gen "<U0E04><U0E38><U0E13>"
name_miss "<U0E19><U0E32><U0E07><U0E2A><U0E32><U0E27>"
name_mr "<U0E19><U0E32><U0E22>"
name_mrs "<U0E19><U0E32><U0E07>"
name_ms "<U0E04><U0E38><U0E13>"
END LC_NAME
LC_ADDRESS

View File

@ -42,6 +42,7 @@
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
# define fopen(f, n) _IO_fopen64 (f, n)
# define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
#endif
@ -268,7 +269,7 @@ mtrace ()
#endif
if (mallfile != NULL || mallwatch != NULL)
{
mallstream = fopen64 (mallfile != NULL ? mallfile : "/dev/null", "w");
mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "w");
if (mallstream != NULL)
{
/* Make sure we close the file descriptor on exec. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@ -24,7 +24,8 @@
/* size_t child_stack_size, int flags, void *arg) */
ENTRY(__clone2)
cmp.eq p6,p0=0,r32
alloc r2=ar.pfs,5,2,3,0
cmp.eq p6,p0=0,in0
mov r8=EINVAL
(p6) br.cond.spnt.few __syscall_error
;;
@ -34,28 +35,12 @@ ENTRY(__clone2)
/* instructions. We need to ensure */
/* that it will not read or write the */
/* backing store. */
mov r17=ar.rsc /* save ar.rsc */
mov r14=r32 /* save fn */
mov r18=r33 /* save child_stack_base */
/* Note that r15 is used to pass */
/* syscall # to kernel & not preserved. */
mov r16=r36 /* save arg */
;;
dep r36=0,r17,0,2 /* set to enforced lazy mode. */
;;
mov ar.rsc=r36
cmp.ne p7,p0=0,r33 /* stack_base 0? */
;;
(p7) add r33=r33,r34 /* Stack base arg to syscall is */
/* 0 if child_stack_base is 0, */
/* child_stack_base + child_stack_size */
/* otherwise. */
/* The system call interface seems */
/* quite contrived at this point. If */
/* we don't pass the backing store */
/* pointer, why do we pass the sp? */
mov r32=r35 /* Flags are first syscall argument. */
DO_CALL (SYS_ify (clone))
mov loc0=in0 /* save fn */
mov loc1=in4 /* save arg */
mov out0=in3 /* Flags are first syscall argument. */
mov out1=in1 /* Stack address. */
mov out2=in2 /* Stack size. */
DO_CALL (SYS_ify (clone2))
cmp.eq p6,p0=-1,r10
;;
(p6) br.cond.spnt.few __syscall_error
@ -64,18 +49,16 @@ ENTRY(__clone2)
# define PARENT p7
cmp.eq CHILD,PARENT=0,r8 /* Are we the child? */
;;
(CHILD) ld8 r34=[r14],8 /* Retrieve code pointer. */
(CHILD) mov ar.bspstore=r18 /* Set register backing store in the child */
(CHILD) mov r32=r16 /* Pass proper argument to fn */
mov ar.rsc=r17 /* Restore RSE mode (both threads). */
(CHILD) ld8 out1=[loc0],8 /* Retrieve code pointer. */
(CHILD) mov out0=loc1 /* Pass proper argument to fn */
(PARENT) ret
;;
ld8 gp=[r14] /* Load function gp. */
mov b6=r34
ld8 gp=[loc0] /* Load function gp. */
mov b6=out1
;;
br.call.dptk.few rp=b6 /* Call fn(arg) in the child */
;;
mov r32=r8 /* Argument to _exit */
mov out0=r8 /* Argument to _exit */
.globl _exit
br.call.dpnt.few rp=_exit /* call _exit with result from fn. */
ret /* Not reached. */