[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7287 - in /fsf/trunk/libc: ./ bits/ ctype/ include/ include/rpc/ locale/ nptl/ nptl/sysdeps/pthread/ sunrpc/ sysdeps/mach/h...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7287 - in /fsf/trunk/libc: ./ bits/ ctype/ include/ include/rpc/ locale/ nptl/ nptl/sysdeps/pthread/ sunrpc/ sysdeps/mach/h...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 08 Nov 2008 08:02:49 -0000
Author: eglibc
Date: Sat Nov 8 00:02:47 2008
New Revision: 7287
Log:
Import glibc-mainline for 2008-11-08
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/bits/libc-tsd.h
fsf/trunk/libc/ctype/ctype-info.c
fsf/trunk/libc/include/ctype.h
fsf/trunk/libc/include/rpc/rpc.h
fsf/trunk/libc/include/stdio.h
fsf/trunk/libc/locale/global-locale.c
fsf/trunk/libc/locale/lc-ctype.c
fsf/trunk/libc/locale/localeinfo.h
fsf/trunk/libc/locale/uselocale.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/pthread/malloc-machine.h
fsf/trunk/libc/sunrpc/rpc_thread.c
fsf/trunk/libc/sysdeps/mach/hurd/bits/libc-tsd.h
fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
fsf/trunk/libc/sysdeps/s390/bits/atomic.h
fsf/trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Nov 8 00:02:47 2008
@@ -1,3 +1,46 @@
+2008-11-03 Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
+
+ * sysdeps/s390/s390-64/dl-trampoline.S (_dl_runtime_profile): Use the
+ correct instruction to remove the stack frame.
+
+2008-11-03 Michael Matz <matz@xxxxxxx>
+
+ * sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_32_acq,
+ __arch_compare_and_exchange_val_64_acq): Add "memory" clobber.
+
+2008-11-07 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * include/stdio.h (__builtin_fwrite, __builtin_fwrite_unlocked):
+ Remove.
+
+ * bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address,
+ __libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type
+ of the thread variable instead of void *.
+ * sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define,
+ __libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise.
+ * include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
+ __libc_tsd_define arguments.
+ (__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust
+ __libc_tsd_address arguments. Remove union hack.
+ * include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments.
+ * sunrpc/rpc_thread.c (RPC_VARS): Likewise.
+ (__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables):
+ Adjust __libc_tsd_{set,get} arguments.
+ * ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
+ __libc_tsd_define arguments.
+ * locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get}
+ arguments.
+ * locale/lc-ctype.c (_nl_postload_ctype): Likewise.
+ * locale/global-locale.c (__libc_tsd_LOCALE): Adjust type.
+ (LOCALE): Adjust __libc_tsd_define arguments.
+ * locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get
+ arguments.
+ (LOCALE): Adjust __libc_tsd_define arguments.
+ * sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
+ arguments.
+ (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
+ arguments.
+
2008-11-02 Ulrich Drepper <drepper@xxxxxxxxxx>
* malloc/malloc.c (public_rEALLOc): When new arena is used, copy
Modified: fsf/trunk/libc/bits/libc-tsd.h
==============================================================================
--- fsf/trunk/libc/bits/libc-tsd.h (original)
+++ fsf/trunk/libc/bits/libc-tsd.h Sat Nov 8 00:02:47 2008
@@ -1,5 +1,5 @@
/* libc-internal interface for thread-specific data. Stub or TLS version.
- Copyright (C) 1998,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1998,2001,2002,2008 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
@@ -23,15 +23,15 @@
/* This file defines the following macros for accessing a small fixed
set of thread-specific `void *' data used only internally by libc.
- __libc_tsd_define(CLASS, KEY) -- Define or declare a `void *' datum
+ __libc_tsd_define(CLASS, TYPE, KEY) -- Define or declare a datum with TYPE
for KEY. CLASS can be `static' for
keys used in only one source file,
empty for global definitions, or
`extern' for global declarations.
- __libc_tsd_address(KEY) -- Return the `void **' pointing to
+ __libc_tsd_address(TYPE, KEY) -- Return the `TYPE *' pointing to
the current thread's datum for KEY.
- __libc_tsd_get(KEY) -- Return the `void *' datum for KEY.
- __libc_tsd_set(KEY, VALUE) -- Set the datum for KEY to VALUE.
+ __libc_tsd_get(TYPE, KEY) -- Return the `TYPE' datum for KEY.
+ __libc_tsd_set(TYPE, KEY, VALUE) -- Set the datum for KEY to VALUE.
The set of available KEY's will usually be provided as an enum,
and contains (at least):
@@ -52,18 +52,19 @@
translate directly into variables by macro magic. */
#if USE___THREAD
-# define __libc_tsd_define(CLASS, KEY) \
- CLASS __thread void *__libc_tsd_##KEY attribute_tls_model_ie;
+# define __libc_tsd_define(CLASS, TYPE, KEY) \
+ CLASS __thread TYPE __libc_tsd_##KEY attribute_tls_model_ie;
-# define __libc_tsd_address(KEY) (&__libc_tsd_##KEY)
-# define __libc_tsd_get(KEY) (__libc_tsd_##KEY)
-# define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY = (VALUE))
+# define __libc_tsd_address(TYPE, KEY) (&__libc_tsd_##KEY)
+# define __libc_tsd_get(TYPE, KEY) (__libc_tsd_##KEY)
+# define __libc_tsd_set(TYPE, KEY, VALUE) (__libc_tsd_##KEY = (VALUE))
#else
-# define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
+# define __libc_tsd_define(CLASS, TYPE, KEY) \
+ CLASS TYPE __libc_tsd_##KEY##_data;
-# define __libc_tsd_address(KEY) (&__libc_tsd_##KEY##_data)
-# define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data)
-# define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
+# define __libc_tsd_address(TYPE, KEY) (&__libc_tsd_##KEY##_data)
+# define __libc_tsd_get(TYPE, KEY) (__libc_tsd_##KEY##_data)
+# define __libc_tsd_set(TYPE, KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
#endif
#endif /* bits/libc-tsd.h */
Modified: fsf/trunk/libc/ctype/ctype-info.c
==============================================================================
--- fsf/trunk/libc/ctype/ctype-info.c (original)
+++ fsf/trunk/libc/ctype/ctype-info.c Sat Nov 8 00:02:47 2008
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,95,96,97,99,2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008
+ 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
@@ -20,9 +21,9 @@
#include <ctype.h>
#include <locale/localeinfo.h>
-__libc_tsd_define (, CTYPE_B)
-__libc_tsd_define (, CTYPE_TOLOWER)
-__libc_tsd_define (, CTYPE_TOUPPER)
+__libc_tsd_define (, const uint16_t *, CTYPE_B)
+__libc_tsd_define (, const int32_t *, CTYPE_TOLOWER)
+__libc_tsd_define (, const int32_t *, CTYPE_TOUPPER)
#include <shlib-compat.h>
Modified: fsf/trunk/libc/include/ctype.h
==============================================================================
--- fsf/trunk/libc/include/ctype.h (original)
+++ fsf/trunk/libc/include/ctype.h Sat Nov 8 00:02:47 2008
@@ -18,50 +18,35 @@
# define CTYPE_EXTERN_INLINE extern inline
# endif
-__libc_tsd_define (extern, CTYPE_B)
-__libc_tsd_define (extern, CTYPE_TOUPPER)
-__libc_tsd_define (extern, CTYPE_TOLOWER)
+__libc_tsd_define (extern, const uint16_t *, CTYPE_B)
+__libc_tsd_define (extern, const int32_t *, CTYPE_TOUPPER)
+__libc_tsd_define (extern, const int32_t *, CTYPE_TOLOWER)
CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
__ctype_b_loc (void)
{
- union
- {
- void **ptr;
- const uint16_t **tablep;
- } u;
- u.ptr = __libc_tsd_address (CTYPE_B);
- if (__builtin_expect (*u.tablep == NULL, 0))
- *u.tablep = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
- return u.tablep;
+ const uint16_t **tablep = __libc_tsd_address (const uint16_t *, CTYPE_B);
+ if (__builtin_expect (*tablep == NULL, 0))
+ *tablep = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
+ return tablep;
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_toupper_loc (void)
{
- union
- {
- void **ptr;
- const int32_t **tablep;
- } u;
- u.ptr = __libc_tsd_address (CTYPE_TOUPPER);
- if (__builtin_expect (*u.tablep == NULL, 0))
- *u.tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
- return u.tablep;
+ const int32_t **tablep = __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
+ if (__builtin_expect (*tablep == NULL, 0))
+ *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
+ return tablep;
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_tolower_loc (void)
{
- union
- {
- void **ptr;
- const int32_t **tablep;
- } u;
- u.ptr = __libc_tsd_address (CTYPE_TOLOWER);
- if (__builtin_expect (*u.tablep == NULL, 0))
- *u.tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
- return u.tablep;
+ const int32_t **tablep = __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
+ if (__builtin_expect (*tablep == NULL, 0))
+ *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
+ return tablep;
}
# endif /* Not NOT_IN_libc. */
Modified: fsf/trunk/libc/include/rpc/rpc.h
==============================================================================
--- fsf/trunk/libc/include/rpc/rpc.h (original)
+++ fsf/trunk/libc/include/rpc/rpc.h Sat Nov 8 00:02:47 2008
@@ -45,7 +45,7 @@
extern void __rpc_thread_destroy (void);
-__libc_tsd_define (extern, RPC_VARS)
+__libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS)
#define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
Modified: fsf/trunk/libc/include/stdio.h
==============================================================================
--- fsf/trunk/libc/include/stdio.h (original)
+++ fsf/trunk/libc/include/stdio.h Sat Nov 8 00:02:47 2008
@@ -160,17 +160,6 @@
libc_hidden_proto (__vasprintf_chk)
libc_hidden_proto (__vdprintf_chk)
libc_hidden_proto (__obstack_vprintf_chk)
-
-# if !defined NOT_IN_libc && defined SHARED && defined DO_VERSIONING \
- && !defined NO_HIDDEN
-/* Special gcc builtins. */
-extern size_t __builtin_fwrite (const void *, size_t, size_t, void *)
- __asm ("__GI_fwrite");
-extern size_t __builtin_fwrite_unlocked (const void *, size_t, size_t, void *)
- __asm ("__GI_fwrite_unlocked");
-
-# endif
-
# endif
#endif
Modified: fsf/trunk/libc/locale/global-locale.c
==============================================================================
--- fsf/trunk/libc/locale/global-locale.c (original)
+++ fsf/trunk/libc/locale/global-locale.c Sat Nov 8 00:02:47 2008
@@ -1,5 +1,5 @@
/* Locale object representing the global locale controlled by setlocale.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2008 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
@@ -62,9 +62,9 @@
#include <tls.h>
#if HAVE___THREAD
/* The tsd macros don't permit an initializer. */
-__thread void *__libc_tsd_LOCALE = &_nl_global_locale;
+__thread __locale_t __libc_tsd_LOCALE = &_nl_global_locale;
#else
-__libc_tsd_define (, LOCALE)
+__libc_tsd_define (, __locale_t, LOCALE)
/* This is a bad kludge presuming the variable name used by the macros.
Using typeof makes sure to barf if we do not match the macro definition.
This ifndef is a further bad kludge for Hurd, where there is an explicit
Modified: fsf/trunk/libc/locale/lc-ctype.c
==============================================================================
--- fsf/trunk/libc/locale/lc-ctype.c (original)
+++ fsf/trunk/libc/locale/lc-ctype.c Sat Nov 8 00:02:47 2008
@@ -1,5 +1,5 @@
/* Define current locale data for LC_CTYPE category.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003,2005
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003,2005,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -66,10 +66,11 @@
in fact using the global locale. */
if (_NL_CURRENT_LOCALE == &_nl_global_locale)
{
- __libc_tsd_set (CTYPE_B, (void *) _nl_global_locale.__ctype_b);
- __libc_tsd_set (CTYPE_TOUPPER,
+ __libc_tsd_set (const uint16_t *, CTYPE_B,
+ (void *) _nl_global_locale.__ctype_b);
+ __libc_tsd_set (const int32_t *, CTYPE_TOUPPER,
(void *) _nl_global_locale.__ctype_toupper);
- __libc_tsd_set (CTYPE_TOLOWER,
+ __libc_tsd_set (const int32_t *, CTYPE_TOLOWER,
(void *) _nl_global_locale.__ctype_tolower);
}
Modified: fsf/trunk/libc/locale/localeinfo.h
==============================================================================
--- fsf/trunk/libc/locale/localeinfo.h (original)
+++ fsf/trunk/libc/locale/localeinfo.h Sat Nov 8 00:02:47 2008
@@ -1,5 +1,6 @@
/* Declarations for internal libc locale interfaces
- Copyright (C) 1995-2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2003, 2005, 2006, 2007, 2008
+ 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
@@ -203,9 +204,9 @@
/* This fetches the thread-local locale_t pointer, either one set with
uselocale or &_nl_global_locale. */
-#define _NL_CURRENT_LOCALE ((__locale_t) __libc_tsd_get (LOCALE))
+#define _NL_CURRENT_LOCALE (__libc_tsd_get (__locale_t, LOCALE))
#include <bits/libc-tsd.h>
-__libc_tsd_define (extern, LOCALE)
+__libc_tsd_define (extern, __locale_t, LOCALE)
/* For static linking it is desireable to avoid always linking in the code
Modified: fsf/trunk/libc/locale/uselocale.c
==============================================================================
--- fsf/trunk/libc/locale/uselocale.c (original)
+++ fsf/trunk/libc/locale/uselocale.c Sat Nov 8 00:02:47 2008
@@ -1,5 +1,5 @@
/* uselocale -- fetch and set the current per-thread locale
- Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2007, 2008 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
@@ -35,7 +35,7 @@
{
const locale_t locobj
= newloc == LC_GLOBAL_LOCALE ? &_nl_global_locale : newloc;
- __libc_tsd_set (LOCALE, locobj);
+ __libc_tsd_set (__locale_t, LOCALE, locobj);
#ifdef NL_CURRENT_INDIRECT
/* Now we must update all the per-category thread-local variables to
@@ -63,9 +63,11 @@
#endif
/* Update the special tsd cache of some locale data. */
- __libc_tsd_set (CTYPE_B, (void *) locobj->__ctype_b);
- __libc_tsd_set (CTYPE_TOLOWER, (void *) locobj->__ctype_tolower);
- __libc_tsd_set (CTYPE_TOUPPER, (void *) locobj->__ctype_toupper);
+ __libc_tsd_set (const uint16_t *, CTYPE_B, (void *) locobj->__ctype_b);
+ __libc_tsd_set (const int32_t *, CTYPE_TOLOWER,
+ (void *) locobj->__ctype_tolower);
+ __libc_tsd_set (const int32_t *, CTYPE_TOUPPER,
+ (void *) locobj->__ctype_toupper);
}
return oldloc == &_nl_global_locale ? LC_GLOBAL_LOCALE : oldloc;
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Nov 8 00:02:47 2008
@@ -1,3 +1,10 @@
+2008-11-07 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
+ arguments.
+ (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
+ arguments.
+
2008-11-01 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #6955]
Modified: fsf/trunk/libc/nptl/sysdeps/pthread/malloc-machine.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/malloc-machine.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/malloc-machine.h Sat Nov 8 00:02:47 2008
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2008 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
@@ -63,10 +63,10 @@
#include <bits/libc-tsd.h>
typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
-__libc_tsd_define (static, MALLOC) /* declaration/common definition */
+__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#define tsd_key_create(key, destr) ((void) (key))
-#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
-#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
+#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
+#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
#include <sysdeps/generic/malloc-machine.h>
Modified: fsf/trunk/libc/sunrpc/rpc_thread.c
==============================================================================
--- fsf/trunk/libc/sunrpc/rpc_thread.c (original)
+++ fsf/trunk/libc/sunrpc/rpc_thread.c Sat Nov 8 00:02:47 2008
@@ -10,7 +10,7 @@
/* Variable used in non-threaded applications or for the first thread. */
static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem;
-__libc_tsd_define (, RPC_VARS)
+__libc_tsd_define (, struct rpc_thread_variables *, RPC_VARS)
/*
* Task-variable destructor
@@ -18,7 +18,8 @@
void __attribute__ ((section ("__libc_thread_freeres_fn")))
__rpc_thread_destroy (void)
{
- struct rpc_thread_variables *tvp = __libc_tsd_get (RPC_VARS);
+ struct rpc_thread_variables *tvp
+ = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
if (tvp != NULL) {
__rpc_thread_svc_cleanup ();
@@ -33,7 +34,7 @@
free (tvp->svc_pollfd_s);
if (tvp != &__libc_tsd_RPC_VARS_mem)
free (tvp);
- __libc_tsd_set (RPC_VARS, NULL);
+ __libc_tsd_set (struct rpc_thread_variables *, RPC_VARS, NULL);
}
}
#ifdef _LIBC_REENTRANT
@@ -48,7 +49,8 @@
static void
rpc_thread_multi (void)
{
- __libc_tsd_set (RPC_VARS, &__libc_tsd_RPC_VARS_mem);
+ __libc_tsd_set (struct rpc_thread_variables *, RPC_VARS,
+ &__libc_tsd_RPC_VARS_mem);
}
@@ -58,16 +60,18 @@
__libc_once_define (static, once);
struct rpc_thread_variables *tvp;
- tvp = __libc_tsd_get (RPC_VARS);
+ tvp = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
if (tvp == NULL) {
__libc_once (once, rpc_thread_multi);
- tvp = __libc_tsd_get (RPC_VARS);
+ tvp = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
if (tvp == NULL) {
tvp = calloc (1, sizeof *tvp);
if (tvp != NULL)
- __libc_tsd_set (RPC_VARS, tvp);
+ __libc_tsd_set (struct rpc_thread_variables *,
+ RPC_VARS, tvp);
else
- tvp = __libc_tsd_get (RPC_VARS);
+ tvp = __libc_tsd_get (struct rpc_thread_variables *,
+ RPC_VARS);
}
}
return tvp;
Modified: fsf/trunk/libc/sysdeps/mach/hurd/bits/libc-tsd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/bits/libc-tsd.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/bits/libc-tsd.h Sat Nov 8 00:02:47 2008
@@ -1,5 +1,5 @@
/* libc-internal interface for thread-specific data. Hurd version.
- Copyright (C) 1998,2002 Free Software Foundation, Inc.
+ Copyright (C) 1998,2002,2008 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
@@ -22,13 +22,14 @@
#include <hurd/threadvar.h>
-#define __libc_tsd_define(CLASS, KEY) /* nothing, always have threadvars */
+#define __libc_tsd_define(CLASS, TYPE, KEY) /* nothing, always have threadvars */
-#define __libc_tsd_address(KEY) \
- ((void **) __hurd_threadvar_location (_HURD_THREADVAR_##KEY))
+#define __libc_tsd_address(TYPE, KEY) \
+ ((TYPE *) __hurd_threadvar_location (_HURD_THREADVAR_##KEY))
-#define __libc_tsd_get(KEY) (*__libc_tsd_address (KEY))
-#define __libc_tsd_set(KEY, VALUE) (*__libc_tsd_address (KEY) = (VALUE))
-
+#define __libc_tsd_get(TYPE, KEY) \
+ (*__libc_tsd_address (TYPE, KEY))
+#define __libc_tsd_set(TYPE, KEY, VALUE) \
+ (*__libc_tsd_address (TYPE, KEY) = (VALUE))
#endif /* bits/libc-tsd.h */
Modified: fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h Sat Nov 8 00:02:47 2008
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008 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
@@ -58,10 +58,10 @@
#include <bits/libc-tsd.h>
typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
-__libc_tsd_define (static, MALLOC) /* declaration/common definition */
+__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#define tsd_key_create(key, destr) ((void) (key))
-#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
-#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
+#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
+#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
#include <sysdeps/generic/malloc-machine.h>
Modified: fsf/trunk/libc/sysdeps/s390/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/bits/atomic.h (original)
+++ fsf/trunk/libc/sysdeps/s390/bits/atomic.h Sat Nov 8 00:02:47 2008
@@ -56,7 +56,7 @@
__typeof (*mem) __archold = (oldval); \
__asm __volatile ("cs %0,%2,%1" \
: "+d" (__archold), "=Q" (*__archmem) \
- : "d" (newval), "m" (*__archmem) : "cc" ); \
+ : "d" (newval), "m" (*__archmem) : "cc", "memory" ); \
__archold; })
#ifdef __s390x__
@@ -65,7 +65,7 @@
__typeof (*mem) __archold = (oldval); \
__asm __volatile ("csg %0,%2,%1" \
: "+d" (__archold), "=Q" (*__archmem) \
- : "d" ((long) (newval)), "m" (*__archmem) : "cc" ); \
+ : "d" ((long) (newval)), "m" (*__archmem) : "cc", "memory" ); \
__archold; })
#else
/* For 31 bit we do not really need 64-bit compare-and-exchange. We can
Modified: fsf/trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S Sat Nov 8 00:02:47 2008
@@ -91,7 +91,7 @@
ld %f4,120(%r12)
ld %f6,128(%r12)
basr %r14,%r1 # call resolved function
-0: lr %r15,%r12 # remove stack frame
+0: lgr %r15,%r12 # remove stack frame
cfi_def_cfa_register (15)
lg %r14,32(%r15) # restore registers
lg %r12,24(%r15)