From 3e4fc359f4fab31607703b311857c58f08ebf67c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Feb 2003 21:57:42 +0000 Subject: [PATCH] Update. 2003-01-31 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Include kernel-features.h * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. --- ChangeLog | 9 +++ nptl/Banner | 2 +- nptl/ChangeLog | 2 + nptl/DESIGN-sem-old.txt | 67 ---------------------- nptl/pthread_create.c | 3 +- nptl/sysdeps/i386/i686/Makefile | 23 ++++++++ .../unix/sysv/linux/powerpc/powerpc64/fe_nomask.c | 1 + .../unix/sysv/linux/powerpc/powerpc64/getcontext.S | 1 + .../sysv/linux/powerpc/powerpc64/makecontext.S | 1 + .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 1 + .../sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + 11 files changed, 42 insertions(+), 69 deletions(-) delete mode 100644 nptl/DESIGN-sem-old.txt create mode 100644 nptl/sysdeps/i386/i686/Makefile diff --git a/ChangeLog b/ChangeLog index 72cdcf2..9ef492c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-01-31 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: + Include kernel-features.h + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. + 2003-02-02 Jakub Jelinek * elf/tls-macros.h [sparc] (TLS_LD, TLS_GD): Add "cc" clobbers. diff --git a/nptl/Banner b/nptl/Banner index 5dc564b..f87ad4d 100644 --- a/nptl/Banner +++ b/nptl/Banner @@ -1 +1 @@ -NPTL 0.18 by Ulrich Drepper +NPTL 0.19 by Ulrich Drepper diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 6e14988..a15da3d 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,8 +1,10 @@ 2003-02-03 Ulrich Drepper + * pthread_create.c: Include . * allocatestack.c (allocate_stack): Implement coloring of the allocated stack memory. Rename pagesize to pagesize_m1. It's the size minus one. Adjust users. + * sysdeps/i386/i686/Makefile: New file. 2003-02-02 Ulrich Drepper diff --git a/nptl/DESIGN-sem-old.txt b/nptl/DESIGN-sem-old.txt deleted file mode 100644 index 2db2f35..0000000 --- a/nptl/DESIGN-sem-old.txt +++ /dev/null @@ -1,67 +0,0 @@ -Semaphores pseudocode -============================== - - int sem_wait(sem_t * sem); - int sem_trywait(sem_t * sem); - int sem_post(sem_t * sem); - int sem_getvalue(sem_t * sem, int * sval); - -struct sem_t { - - unsigned int lock: - - internal mutex - - unsigned int count; - - current semaphore count, also used as a futex - - unsigned int waiters; - - number of threads queued in sem_wait(). -} - -sem_wait(sem_t *sem) -{ - lll_lock(sem->lock); - for (;;) { - - if (sem->count) - break; - - sem->waiters++; - lll_unlock(sem->lock); - - futex_wait(&sem->count, 0) - - lll_lock(sem->lock); - sem->waiters--; - } - sem->count--; - lll_unlock(sem->lock); -} - -sem_post(sem_t *sem) -{ - lll_lock(sem->lock); - sem->count++; - if (sem->waiters) - futex_wake(&sem->count, sem->count); - lll_unlock(sem->lock); -} - -sem_trywait(sem_t *sem) -{ - lll_lock(sem->lock); - if (sem->count) { - sem->count--; - lll_unlock(sem->lock); - return 0; - } else { - lll_unlock(sem->lock); - return -EAGAIN; - } -} - -sem_getvalue(sem_t *sem, int *sval) -{ - *sval = sem->count; - read_barrier(); -} diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 033c078..2b33243 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -24,6 +24,7 @@ #include "pthreadP.h" #include #include +#include #include diff --git a/nptl/sysdeps/i386/i686/Makefile b/nptl/sysdeps/i386/i686/Makefile new file mode 100644 index 0000000..493a7ec --- /dev/null +++ b/nptl/sysdeps/i386/i686/Makefile @@ -0,0 +1,23 @@ +# Copyright (C) 2003 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by Ulrich Drepper , 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. + +ifeq ($(subdir),nptl) +# For P4 processors we color the stack in 128 bit steps. +CFLAGS-pthread_create.c += -DCOLORING_INCREMENT=128 +endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c index 6a0a82c..70dc064 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c @@ -22,6 +22,7 @@ #include #include #include +#include "kernel-features.h" const fenv_t * __fe_nomask_env (void) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S index ddbf40b..0ebf2d8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include "kernel-features.h" #define __ASSEMBLY__ #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S index 08ce901..8487a3f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include "kernel-features.h" #define __ASSEMBLY__ #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index fa37abd..3e25a8e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include "kernel-features.h" #define __ASSEMBLY__ #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index b1bcd44..653811b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include "kernel-features.h" #define __ASSEMBLY__ #include -- 2.7.4