diff --git a/ChangeLog b/ChangeLog index 44cc2024e4..8e41574f64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-4-10 kaz Kojima + + * sysdeps/sh/stackinfo.h: New file. + 2001-04-10 Ulrich Drepper * locale/tst-C-locale.c (run_test): Add tests for locale objects. diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 917ab715f1..805e837af5 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,10 @@ +2001-04-10 kaz Kojima + + * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse + test. + (__pthread_spin_trylock): Likewise. + * sysdeps/sh/pt-machine.h (testandset): Likewise. + 2001-04-10 Ulrich Drepper * join.c (pthread_exit): Move code to new function __pthread_do_exit diff --git a/linuxthreads/sysdeps/sh/pspinlock.c b/linuxthreads/sysdeps/sh/pspinlock.c index 2da3bc42d4..3623cb5489 100644 --- a/linuxthreads/sysdeps/sh/pspinlock.c +++ b/linuxthreads/sysdeps/sh/pspinlock.c @@ -1,5 +1,5 @@ /* POSIX spinlock implementation. SH version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock) : "=r" (val) : "r" (lock) : "memory"); - while (val != 0); + while (val == 0); return 0; } @@ -47,7 +47,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock) : "=r" (val) : "r" (lock) : "memory"); - return val ? EBUSY : 0; + return val ? 0 : EBUSY; } weak_alias (__pthread_spin_trylock, pthread_spin_trylock) diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h index a54fa12da8..cdffeceee6 100644 --- a/linuxthreads/sysdeps/sh/pt-machine.h +++ b/linuxthreads/sysdeps/sh/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. SuperH version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Niibe Yutaka . @@ -32,11 +32,11 @@ testandset (int *spinlock) __asm__ __volatile__( "tas.b @%1\n\t" "movt %0" - : "=z" (ret) + : "=r" (ret) : "r" (spinlock) : "memory", "cc"); - return ret; + return (ret == 0); } diff --git a/locale/tst-C-locale.c b/locale/tst-C-locale.c index 1d2137270d..257ee3b347 100644 --- a/locale/tst-C-locale.c +++ b/locale/tst-C-locale.c @@ -375,6 +375,7 @@ run_test (const char *locname) } CLASSTEST (alnum); CLASSTEST (alpha); + CLASSTEST (blank); CLASSTEST (cntrl); CLASSTEST (digit); CLASSTEST (lower); @@ -396,6 +397,8 @@ run_test (const char *locname) MAPTEST (lower); MAPTEST (upper); } + + __freelocale (loc); } return result; diff --git a/sysdeps/sh/stackinfo.h b/sysdeps/sh/stackinfo.h new file mode 100644 index 0000000000..efba21a76b --- /dev/null +++ b/sysdeps/sh/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On SH the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */