* elf/Makefile ($(objpfx)librtld.mk): Tweak regexp so that one-line

entries in the map file match too.
This commit is contained in:
Roland McGrath 2003-03-13 21:51:07 +00:00
parent 0579fabbe8
commit 6461e57784
8 changed files with 66 additions and 53 deletions

View File

@ -1,3 +1,8 @@
2003-03-13 Roland McGrath <roland@redhat.com>
* elf/Makefile ($(objpfx)librtld.mk): Tweak regexp so that one-line
entries in the map file match too.
2003-03-13 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local

View File

@ -210,7 +210,8 @@ $(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
mv -f $@T $@
$(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\))$$@\1 \2@p' $< | \
sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
$< | \
while read lib file; do \
case $$lib in \
libc_pic.a) \

View File

@ -1,5 +1,28 @@
2003-03-13 Roland McGrath <roland@redhat.com>
* pthread_create.c (start_thread): Set EXITING_BIT after the
event-reporting (and destructors), not before.
2003-03-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
lll_futex_wake): Declare register variables as long int instead of
unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
Make syscall arguments clobbered by the syscall.
(lll_futex_wait): Define using lll_futex_timed_wait.
* sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
to void *.
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
PPID if [! NDEBUG].
* allocatestack.c (nptl_ncreated): Only declare if
COLORING_INCREMENT != 0.
* pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
(__libc_enable_asynccancel_2): Remove prototype.
* sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
ctid to match kernel.

View File

@ -104,8 +104,10 @@ static LIST_HEAD (stack_used);
list_t __stack_user __attribute__ ((nocommon));
hidden_def (__stack_user)
#if COLORING_INCREMENT != 0
/* Number of threads created. */
static unsigned int nptl_ncreated;
#endif
/* Check whether the stack is still used or not. */
@ -352,7 +354,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
void *mem;
#if COLORING_INCREMENT != 0
/* Add one more page for stack coloring. Don't to it for stacks
/* Add one more page for stack coloring. Don't do it for stacks
with 16 times pagesize or larger. This might just cause
unnecessary misalignment. */
if (size <= 16 * pagesize_m1)
@ -383,8 +385,8 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
if (__builtin_expect (mem == MAP_FAILED, 0))
return errno;
/* 'size' is guaranteed to be greater than zero. So we can
never get a NULL pointer back from MMAP. */
/* SIZE is guaranteed to be greater than zero.
So we can never get a null pointer back from mmap. */
assert (mem != NULL);
#if COLORING_INCREMENT != 0

View File

@ -314,6 +314,8 @@ extern int __pthread_kill (pthread_t threadid, int signo);
extern void __pthread_exit (void *value);
extern int __pthread_setcanceltype (int type, int *oldtype);
extern int __pthread_enable_asynccancel (void) attribute_hidden;
extern void __pthread_enable_asynccancel_2 (int *oldvalp)
internal_function attribute_hidden;
extern void __pthread_disable_asynccancel (int oldtype)
internal_function attribute_hidden;
@ -332,8 +334,6 @@ extern int __pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond,
/* The two functions are in libc.so and not exported. */
extern int __libc_enable_asynccancel (void) attribute_hidden;
extern void __libc_enable_asynccancel_2 (int *oldvalp)
internal_function attribute_hidden;
extern void __libc_disable_asynccancel (int oldtype)
internal_function attribute_hidden;

View File

@ -227,9 +227,6 @@ start_thread (void *arg)
THREAD_SETMEM (pd, result, pd->start_routine (pd->arg));
}
/* The thread is exiting now. */
atomic_bit_set (&pd->cancelhandling, EXITING_BIT);
/* Clean up any state libc stored in thread-local variables. */
__libc_thread_freeres ();
@ -268,6 +265,10 @@ start_thread (void *arg)
}
}
/* The thread is exiting now. Don't set this bit until after we've hit
the event-reporting breakpoint, so that td_thr_get_info on us while at
the breakpoint reports TD_THR_RUN state rather than TD_THR_ZOMBIE. */
atomic_bit_set (&pd->cancelhandling, EXITING_BIT);
/* If the thread is detached free the TCB. */
if (IS_DETACHED (pd))

View File

@ -35,7 +35,7 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
return TD_ERR;
/* IA-64 thread register is r13. */
th->th_unique = regs[13];
th->th_unique = (void *) regs[13];
/* Found it. Now complete the `td_thrhandle_t' object. */
th->th_ta_p = (td_thragent_t *) ta;

View File

@ -46,42 +46,23 @@
"b6", "b7", \
"memory"
#define lll_futex_wait(futex, val) \
({ \
register unsigned long int __o0 asm ("out0") \
= (unsigned long int) (futex); \
register unsigned long int __o1 asm ("out1") = FUTEX_WAIT; \
register unsigned long int __o2 asm ("out2") = (unsigned long int) (val);\
register unsigned long int __o3 asm ("out3") = 0ul; \
register unsigned long int __r8 asm ("r8"); \
register unsigned long int __r10 asm ("r10"); \
register unsigned long int __r15 asm ("r15") = SYS_futex; \
\
__asm __volatile ("break %3;;" \
: "=r" (__r8), "=r" (__r10), "=r" (__r15) \
: "i" (0x100000), "2" (__r15), "r" (__o0), "r" (__o1), \
"r" (__o2), "r" (__o3) \
: lll_futex_clobbers); \
__r10 == -1 ? -__r8 : __r8; \
})
#define lll_futex_wait(futex, val) lll_futex_timed_wait (futex, val, 0)
#define lll_futex_timed_wait(futex, val, timespec) \
({ \
register unsigned long int __o0 asm ("out0") \
= (unsigned long int) (futex); \
register unsigned long int __o1 asm ("out1") = FUTEX_WAIT; \
register unsigned long int __o2 asm ("out2") = (unsigned long int) (val);\
register unsigned long int __o3 asm ("out3") \
= (unsigned long int) (timespec); \
register unsigned long int __r8 asm ("r8"); \
register unsigned long int __r10 asm ("r10"); \
register unsigned long int __r15 asm ("r15") = SYS_futex; \
register long int __o0 asm ("out0") = (long int) (futex); \
register long int __o1 asm ("out1") = FUTEX_WAIT; \
register long int __o2 asm ("out2") = (long int) (val); \
register long int __o3 asm ("out3") = (long int) (timespec); \
register long int __r8 asm ("r8"); \
register long int __r10 asm ("r10"); \
register long int __r15 asm ("r15") = SYS_futex; \
\
__asm __volatile ("break %3;;" \
: "=r" (__r8), "=r" (__r10), "=r" (__r15) \
: "i" (0x100000), "2" (__r15), "r" (__o0), "r" (__o1), \
"r" (__o2), "r" (__o3) \
__asm __volatile ("break %7;;" \
: "=r" (__r8), "=r" (__r10), "=r" (__r15), \
"=r" (__o0), "=r" (__o1), "=r" (__o2), "=r" (__o3) \
: "i" (0x100000), "2" (__r15), "3" (__o0), "4" (__o1), \
"5" (__o2), "6" (__o3) \
: lll_futex_clobbers); \
__r10 == -1 ? -__r8 : __r8; \
})
@ -89,18 +70,18 @@
#define lll_futex_wake(futex, nr) \
({ \
register unsigned long int __o0 asm ("out0") \
= (unsigned long int) (futex); \
register unsigned long int __o1 asm ("out1") = FUTEX_WAKE; \
register unsigned long int __o2 asm ("out2") = (unsigned long int) (nr); \
register unsigned long int __r8 asm ("r8"); \
register unsigned long int __r10 asm ("r10"); \
register unsigned long int __r15 asm ("r15") = SYS_futex; \
register long int __o0 asm ("out0") = (long int) (futex); \
register long int __o1 asm ("out1") = FUTEX_WAKE; \
register long int __o2 asm ("out2") = (long int) (nr); \
register long int __r8 asm ("r8"); \
register long int __r10 asm ("r10"); \
register long int __r15 asm ("r15") = SYS_futex; \
\
__asm __volatile ("break %3;;" \
: "=r" (__r8), "=r" (__r10), "=r" (__r15) \
: "i" (0x100000), "2" (__r15), "r" (__o0), "r" (__o1), \
"r" (__o2) \
__asm __volatile ("break %6;;" \
: "=r" (__r8), "=r" (__r10), "=r" (__r15), \
"=r" (__o0), "=r" (__o1), "=r" (__o2) \
: "i" (0x100000), "2" (__r15), "3" (__o0), "4" (__o1), \
"5" (__o2) \
: "out3", lll_futex_clobbers); \
__r10 == -1 ? -__r8 : __r8; \
})