mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* sysdeps/s390/s390-32/backtrace.c (init): Guard with #ifdef SHARED.
(unwind_backtrace, unwind_getip): Define #ifndef SHARED. (__backtrace): Don't call init #ifndef SHARED. * sysdeps/s390/s390-64/backtrace.c (init): Guard with #ifdef SHARED. (unwind_backtrace, unwind_getip): Define #ifndef SHARED. (__backtrace): Don't call init #ifndef SHARED. * sysdeps/ia64/backtrace.c (init): Guard with #ifdef SHARED. (unwind_backtrace, unwind_getip): Define #ifndef SHARED. (__backtrace): Don't call init #ifndef SHARED.
This commit is contained in:
parent
f1847a8465
commit
a9e526e7d2
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2004-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/s390/s390-32/backtrace.c (init): Guard with #ifdef SHARED.
|
||||
(unwind_backtrace, unwind_getip): Define #ifndef SHARED.
|
||||
(__backtrace): Don't call init #ifndef SHARED.
|
||||
* sysdeps/s390/s390-64/backtrace.c (init): Guard with #ifdef SHARED.
|
||||
(unwind_backtrace, unwind_getip): Define #ifndef SHARED.
|
||||
(__backtrace): Don't call init #ifndef SHARED.
|
||||
* sysdeps/ia64/backtrace.c (init): Guard with #ifdef SHARED.
|
||||
(unwind_backtrace, unwind_getip): Define #ifndef SHARED.
|
||||
(__backtrace): Don't call init #ifndef SHARED.
|
||||
|
||||
2004-06-11 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian.
|
||||
|
@ -1,3 +1,13 @@
|
||||
2004-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
|
||||
comment typo.
|
||||
* pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
|
||||
* pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
|
||||
* pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
|
||||
* pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
|
||||
Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
|
||||
|
||||
2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
|
||||
|
@ -29,7 +29,7 @@ pthread_mutexattr_getpshared (attr, pshared)
|
||||
|
||||
iattr = (const struct pthread_mutexattr *) attr;
|
||||
|
||||
/* We use bit 31 to single whether the mutex is going to be
|
||||
/* We use bit 31 to signal whether the mutex is going to be
|
||||
process-shared or not. */
|
||||
*pshared = ((iattr->mutexkind & 0x80000000) != 0
|
||||
? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE);
|
||||
|
@ -29,7 +29,7 @@ pthread_mutexattr_gettype (attr, kind)
|
||||
|
||||
iattr = (const struct pthread_mutexattr *) attr;
|
||||
|
||||
/* We use bit 31 to single whether the mutex is going to be
|
||||
/* We use bit 31 to signal whether the mutex is going to be
|
||||
process-shared or not. */
|
||||
*kind = iattr->mutexkind & ~0x80000000;
|
||||
|
||||
|
@ -28,7 +28,7 @@ __pthread_mutexattr_init (attr)
|
||||
if (sizeof (struct pthread_mutexattr) != sizeof (pthread_mutexattr_t))
|
||||
memset (attr, '\0', sizeof (*attr));
|
||||
|
||||
/* We use bit 31 to single whether the mutex is going to be
|
||||
/* We use bit 31 to signal whether the mutex is going to be
|
||||
process-shared or not. By default it is zero, i.e., the mutex is
|
||||
not process-shared. */
|
||||
((struct pthread_mutexattr *) attr)->mutexkind = PTHREAD_MUTEX_NORMAL;
|
||||
|
@ -34,7 +34,7 @@ pthread_mutexattr_setpshared (attr, pshared)
|
||||
|
||||
iattr = (struct pthread_mutexattr *) attr;
|
||||
|
||||
/* We use bit 31 to single whether the mutex is going to be
|
||||
/* We use bit 31 to signal whether the mutex is going to be
|
||||
process-shared or not. */
|
||||
if (pshared == PTHREAD_PROCESS_PRIVATE)
|
||||
iattr->mutexkind &= ~0x80000000;
|
||||
|
@ -33,7 +33,7 @@ __pthread_mutexattr_settype (attr, kind)
|
||||
|
||||
iattr = (struct pthread_mutexattr *) attr;
|
||||
|
||||
/* We use bit 31 to single whether the mutex is going to be
|
||||
/* We use bit 31 to signal whether the mutex is going to be
|
||||
process-shared or not. */
|
||||
iattr->mutexkind = (iattr->mutexkind & 0x80000000) | kind;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Return backtrace of current program state.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||
|
||||
@ -30,6 +30,7 @@ struct trace_arg
|
||||
int cnt, size;
|
||||
};
|
||||
|
||||
#ifdef SHARED
|
||||
static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
|
||||
static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
|
||||
|
||||
@ -46,6 +47,10 @@ init (void)
|
||||
if (unwind_getip == NULL)
|
||||
unwind_backtrace = NULL;
|
||||
}
|
||||
#else
|
||||
# define unwind_backtrace _Unwind_Backtrace
|
||||
# define unwind_getip _Unwind_GetIP
|
||||
#endif
|
||||
|
||||
static _Unwind_Reason_Code
|
||||
backtrace_helper (struct _Unwind_Context *ctx, void *a)
|
||||
@ -67,11 +72,13 @@ __backtrace (array, size)
|
||||
int size;
|
||||
{
|
||||
struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
|
||||
#ifdef SHARED
|
||||
__libc_once_define (static, once);
|
||||
|
||||
__libc_once (once, init);
|
||||
if (unwind_backtrace == NULL)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (size >= 1)
|
||||
unwind_backtrace (backtrace_helper, &arg);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Return backtrace of current program state.
|
||||
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -61,6 +61,7 @@ struct trace_arg
|
||||
int cnt, size;
|
||||
};
|
||||
|
||||
#ifdef SHARED
|
||||
static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
|
||||
static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
|
||||
|
||||
@ -77,6 +78,10 @@ init (void)
|
||||
if (unwind_getip == NULL)
|
||||
unwind_backtrace = NULL;
|
||||
}
|
||||
#else
|
||||
# define unwind_backtrace _Unwind_Backtrace
|
||||
# define unwind_getip _Unwind_GetIP
|
||||
#endif
|
||||
|
||||
static int
|
||||
__backchain_backtrace (void **array, int size)
|
||||
@ -122,9 +127,11 @@ int
|
||||
__backtrace (void **array, int size)
|
||||
{
|
||||
struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
|
||||
#ifdef SHARED
|
||||
__libc_once_define (static, once);
|
||||
|
||||
__libc_once (once, init);
|
||||
#endif
|
||||
if (unwind_backtrace == NULL)
|
||||
return __backchain_backtrace (array, size);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Return backtrace of current program state. 64 bit S/390 version.
|
||||
Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -60,6 +60,7 @@ struct trace_arg
|
||||
int cnt, size;
|
||||
};
|
||||
|
||||
#ifdef SHARED
|
||||
static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
|
||||
static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
|
||||
|
||||
@ -76,6 +77,10 @@ init (void)
|
||||
if (unwind_getip == NULL)
|
||||
unwind_backtrace = NULL;
|
||||
}
|
||||
#else
|
||||
# define unwind_backtrace _Unwind_Backtrace
|
||||
# define unwind_getip _Unwind_GetIP
|
||||
#endif
|
||||
|
||||
int
|
||||
__backchain_backtrace (void **array, int size)
|
||||
@ -121,9 +126,11 @@ int
|
||||
__backtrace (void **array, int size)
|
||||
{
|
||||
struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
|
||||
#ifdef SHARED
|
||||
__libc_once_define (static, once);
|
||||
|
||||
__libc_once (once, init);
|
||||
#endif
|
||||
if (unwind_backtrace == NULL)
|
||||
return __backchain_backtrace (array, size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user