summaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-24 16:46:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-24 16:46:16 +0000
commited1ac6a2d6c744bdbd4751efc86326ceafeac26c (patch)
tree5ca6ee6384dfd1a25493058d4debe985b101a3b0 /linuxthreads
parentc2228a513135bb229cd9c9984e38e52143d5f6dd (diff)
downloadglibc-ed1ac6a2d6c744bdbd4751efc86326ceafeac26c.tar.gz
Update.
1998-08-24 16:34 Ulrich Drepper <drepper@cygnus.com> * debug/catchsegv.sh: Handle text preceding backtrace better. * sysdeps/generic/segfault.c: Allow register dump. Allow handler to be installed for other signals than SIGSEGV. * sysdeps/generic/register-dump.h: New file. * sysdeps/i386/register-dump.h: New file. * sysdeps/powerpc/register-dump.h: New file. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Use macros from sigcontextinfo.h. * sysdeps/unix/sysv/linux/powerpc/profil-counter.h: Use i386 version. 1998-08-24 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: New file. 1998-08-09 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/unix/sysv/linux/powerpc/chown.c: New file. * sysdeps/unix/sysv/linux/powerpc/lchown.S: New file. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add chown, remove getresuid, getresgid. 1998-08-16 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/unix/sysv/linux/powerpc/clone.S: Fix bugs. Set up stack pointer in userland. 1998-08-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/sys/mount.h (MNT_FORCE): Define as enum and fix value. 1998-08-22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/ldd.bash.in: Add missing quotes around $file. Make loop over arguments Bourne shell compatible. Don't exit unsuccessfully if nonelf returns successfully. Avoid duplicating most of the script. * sysdeps/unix/sysv/linux/ldd-rewrite.sed: Add missing quotes around $file. 1998-08-24 10:37 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/Versions (_IO_do_write, _IO_file_attach, _IO_file_close_it, _IO_file_finish, _IO_file_fopen, _IO_file_init, _IO_file_overflow, _IO_file_seekoff, _IO_file_setbuf, _IO_file_sync, _IO_file_underflow, _IO_file_write, _IO_file_xsputn): Added to GLIBC_2.1. * libio/fileops.c (_IO_do_write, _IO_file_attach, _IO_file_close_it, _IO_file_finish, _IO_file_fopen, _IO_file_init, _IO_file_overflow, _IO_file_seekoff, _IO_file_setbuf, _IO_file_sync, _IO_file_underflow, _IO_file_write, _IO_file_xsputn): Change the prefix to "_IO_new_". Added to GLIBC_2.1. * libio/libioP.h (_IO_do_write, _IO_file_attach, _IO_file_close_it, _IO_file_finish, _IO_file_fopen, _IO_file_init, _IO_file_overflow, _IO_file_seekoff, _IO_file_setbuf, _IO_file_sync, _IO_file_underflow, _IO_file_write, _IO_file_xsputn): Add prototypes for the prefix "_IO_new_". * libio/oldfileops.c (_IO_do_write, _IO_file_attach, _IO_file_close_it, _IO_file_finish, _IO_file_fopen, _IO_file_init, _IO_file_overflow, _IO_file_seekoff, _IO_file_setbuf, _IO_file_sync, _IO_file_underflow, _IO_file_write, _IO_file_xsputn): Added to GLIBC_2.0. * csu/initfini.c: Return to .text before __gmon_start__. * elf/elf.h (EM_FAKE_ALPHA): Rename from EM_OLD_ALPHA. (STO_MIPS_*): Rename from STO_*. (STB_MIPS_SPLIT_COMMON): Rename from STB_SPLIT_COMMON. (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New. * math/atest-exp.c (mpn_bitsize): Fix bit location calculation. (main): e3s is negative on zero. * math/atest-exp2.c: Likewise. 1998-08-23 Andreas Jaeger <aj@arthur.rhein-neckar.de> * Makerules (install): Add comment about absolute paths.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog10
-rw-r--r--linuxthreads/spinlock.c3
-rw-r--r--linuxthreads/sysdeps/powerpc/pt-machine.h31
3 files changed, 13 insertions, 31 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index c89fa758a3..5b4dcbd64a 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,13 @@
+1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
+
+ * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
+ turned out that we didn't need to queue after all.
+
+1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
+
+ * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
+ and wastes space; correct types.
+
1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
* signals.c (sigaction): Handle NULL argument.
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c
index 2546e2a6e0..8a8d3bfb84 100644
--- a/linuxthreads/spinlock.c
+++ b/linuxthreads/spinlock.c
@@ -47,9 +47,10 @@ void __pthread_lock(struct _pthread_fastlock * lock)
newstatus = 1;
} else {
self = thread_self();
- self->p_nextwaiting = (pthread_descr) oldstatus;
newstatus = (long) self;
}
+ if (self != NULL)
+ self->p_nextwaiting = (pthread_descr) oldstatus;
} while(! compare_and_swap(&lock->status, oldstatus, newstatus,
&lock->spinlock));
if (oldstatus != 0) suspend(self);
diff --git a/linuxthreads/sysdeps/powerpc/pt-machine.h b/linuxthreads/sysdeps/powerpc/pt-machine.h
index a52af8a7eb..7829c779e6 100644
--- a/linuxthreads/sysdeps/powerpc/pt-machine.h
+++ b/linuxthreads/sysdeps/powerpc/pt-machine.h
@@ -2,7 +2,6 @@
powerpc version.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
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
@@ -31,34 +30,6 @@
#define sync() __asm__ __volatile__ ("sync")
#endif
-/* Spinlock implementation; required. */
-#if BROKEN_PPC_ASM_CR0
-static
-#else
-extern inline
-#endif
-int
-testandset (int *spinlock)
-{
- int ret;
-
- sync();
- __asm__ __volatile__(
- "0: lwarx %0,0,%1 ;"
- " cmpwi %0,0;"
- " bne 1f;"
- " stwcx. %2,0,%1;"
- " bne- 0b;"
- "1: "
- : "=&r"(ret)
- : "r"(spinlock), "r"(1)
- : "cr0", "memory");
- sync();
-
- return ret != 0;
-}
-
-
/* Get some notion of the current stack. Need not be exactly the top
of the stack, just something somewhere in the current frame. */
#define CURRENT_STACK_FRAME stack_pointer
@@ -74,7 +45,7 @@ static
extern inline
#endif
int
-__compare_and_swap (int *p, int oldval, int newval)
+__compare_and_swap (long *p, long oldval, long newval)
{
int ret;