1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* 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> 2003-03-13 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local * 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 $@ mv -f $@T $@
$(objpfx)librtld.mk: $(objpfx)librtld.map Makefile $(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 \ while read lib file; do \
case $$lib in \ case $$lib in \
libc_pic.a) \ 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> 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 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
ctid to match kernel. ctid to match kernel.

View File

@ -104,8 +104,10 @@ static LIST_HEAD (stack_used);
list_t __stack_user __attribute__ ((nocommon)); list_t __stack_user __attribute__ ((nocommon));
hidden_def (__stack_user) hidden_def (__stack_user)
#if COLORING_INCREMENT != 0
/* Number of threads created. */ /* Number of threads created. */
static unsigned int nptl_ncreated; static unsigned int nptl_ncreated;
#endif
/* Check whether the stack is still used or not. */ /* 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; void *mem;
#if COLORING_INCREMENT != 0 #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 with 16 times pagesize or larger. This might just cause
unnecessary misalignment. */ unnecessary misalignment. */
if (size <= 16 * pagesize_m1) 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)) if (__builtin_expect (mem == MAP_FAILED, 0))
return errno; return errno;
/* 'size' is guaranteed to be greater than zero. So we can /* SIZE is guaranteed to be greater than zero.
never get a NULL pointer back from MMAP. */ So we can never get a null pointer back from mmap. */
assert (mem != NULL); assert (mem != NULL);
#if COLORING_INCREMENT != 0 #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 void __pthread_exit (void *value);
extern int __pthread_setcanceltype (int type, int *oldtype); extern int __pthread_setcanceltype (int type, int *oldtype);
extern int __pthread_enable_asynccancel (void) attribute_hidden; 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) extern void __pthread_disable_asynccancel (int oldtype)
internal_function attribute_hidden; 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. */ /* The two functions are in libc.so and not exported. */
extern int __libc_enable_asynccancel (void) attribute_hidden; 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) extern void __libc_disable_asynccancel (int oldtype)
internal_function attribute_hidden; internal_function attribute_hidden;

View File

@ -227,9 +227,6 @@ start_thread (void *arg)
THREAD_SETMEM (pd, result, pd->start_routine (pd->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. */ /* Clean up any state libc stored in thread-local variables. */
__libc_thread_freeres (); __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 the thread is detached free the TCB. */
if (IS_DETACHED (pd)) 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; return TD_ERR;
/* IA-64 thread register is r13. */ /* 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. */ /* Found it. Now complete the `td_thrhandle_t' object. */
th->th_ta_p = (td_thragent_t *) ta; th->th_ta_p = (td_thragent_t *) ta;

View File

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