Update copyright years
[glibc.git] / nptl / ChangeLog
blobafcf49188ade386800ebc607e678c761889b8be8
1 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
3         * sysdeps/i386/tls.h: Update copyright years.
5 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
7         * pthread_create.c (start_thread): Fix clone flag name in
8         comment to CLONE_CHILD_CLEARTID.
9         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
10         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
11         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
12         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
13         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
14         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
16 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
18         [BZ #14477]
19         * Makefile (tests): Add tst-cond-except.
20         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
21         (__pthread_cond_timedwait): Mark instructions where %ebx is
22         incremented in PI case.
23         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
24         for the marked PI case instructions.
25         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
26         (__pthread_cond_wait): Mark instructions where %ebx is
27         incremented in PI case.
28         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
29         for the marked PI case instructions.
30         * tst-cond-except.c: New test case.
32 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
34         * tst-tls6.sh: Add "set -e".
35         * Makefile: Do not specify -e option when running testsuite
36         shell scripts.
38         * tst-tls6.sh: Add copyright header.
40 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
42         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
43         to uint64_t for 64-bit store.
44         (THREAD_SETMEM_NC): Likewise.
46 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
48         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
49         64-bit store.
50         (THREAD_SETMEM_NC): Likewise.
52 2012-09-14  Jeff Law  <law@redhat.com>
54         [BZ #14583]
55         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
57 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
59         [BZ #14576]
60         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
61         Removed.
63 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
65         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
66         (LDLIBS-tst-cancel24): This.
68 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
70         [BZ #14545]
71         * Makefile (tests-static): Add tst-cancel21-static.
72         (tests): Likewise.
73         * tst-cancel21-static.c: New file.
75 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
77         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
78         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
79         [__NR_clock_getres]: Make code unconditional.
80         (pthread_getcpuclockid): Remove code left unreachable by removal
81         of conditionals.
83 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
85         [BZ #14532]
86         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
87         atomic_compare_and_exchange_bool_rel.
88         * tst-sem14.c: New file.
89         * Makefile (tests): Add tst-sem14.
91 2012-08-15  Roland McGrath  <roland@hack.frob.com>
93         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
94         of -D_IO_MTSAFE_IO.
95         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
96         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
98 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
100         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
101         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
102         * pthread_condattr_setclock.c (pthread_condattr_setclock)
103         [!__ASSUME_POSIX_TIMERS]: Likewise.
104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
105         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
106         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
107         [!__ASSUME_POSIX_TIMERS]: Likewise.
108         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
109         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
110         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
111         code unconditional.
112         [!__NR-timer_create]: Remove conditional code.
113         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
114         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
115         code unconditional.
116         [!__NR_timer_delete]: Remove conditional code.
117         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
118         * sysdeps/unix/sysv/linux/timer_getoverr.c
119         [__NR_timer_getoverrun]: Make code unconditional.
120         [!__NR_timer_getoverrun]: Remove conditional code.
121         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
122         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
123         Make code unconditional.
124         [!__NR_timer_gettime]: Remove conditional code.
125         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
126         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
127         Make code unconditional.
128         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
129         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
130         Make code unconditional.
131         [!__NR_timer_settime]: Remove conditional code.
132         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
133         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
135         conditional code.
137 2012-08-15  Tom de Vries  <vries@codesourcery.com>
138             Maxim Kuvyrkov  <maxim@codesourcery.com>
140         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
141         (__libc_lock_trylock): Allow pre-existing definitions.
143 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
145         * pthread_spin_lock.c: New file.
146         * pthread_spin_trylock.c: New file.
148 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
150         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
151         code unconditional.
152         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
153         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
154         unconditional.
155         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
156         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
157         Make code unconditional.
158         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
159         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
160         __NR_tgkill]: Make code unconditional.
161         (raise) [__ASSUME_TGKILL]: Likewise.
162         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
163         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
164         [__ASSUME_TGKILL]: Make code unconditional.
165         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
166         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
167         __NR_tgkill]: Make code unconditional.
168         (raise) [__ASSUME_TGKILL]: Likewise.
169         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
171 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
173         * sysdeps/pthread/createthread.c (create_thread)
174         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
176 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
178         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
179         code unconditional.
180         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
182 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
184         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
185         (pagesize): New static variable.
186         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
187         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
188         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
189         halfway up the stack top page.  Verify that the top page was
190         written into.
191         (do_test): Get pagesize using sysconf.
193 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
195         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
196         label.
197         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
198         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
199         Likewise.
201 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
203         * tst-pthread-getattr.c: Revert last change.
205 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
207         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
208         size.
209         (_MIN): New macro.
210         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
211         of MEM to test.
212         (check_stack_top): Read valued written into STACKADDR in
213         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
215 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
217         * nptl-init.c (sighandler_setxid): Fix the comment that
218         describes it.
220 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
222         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
223         (__lll_robust_timedlock_wait): Simplify CFI directives.
225 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
227         [BZ #12416]
228         * Makefile (tests): Add test case.
229         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
230         the __libc_stack_end page from stacksize.  Truncate stacksize to
231         make it page aligned when it is computed from RLIMIT_STACK.
232         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
233         accessible.
235 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
237         [BZ #14205]
238         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
239         branches.
241 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
242             Jakub Jelinek  <jakub@redhat.com>
244         [BZ #14188]
245         * sysdeps/pthread/pthread.h
246         [!(defined __GNUC__ && defined __EXCEPTIONS)]
247         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
248         __libc_unlikely instead of __builtin_expect.
250 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
252         [BZ #14117]
253         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
254         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
255         * sysdeps/unix/sysv/linux/i386/Implies: New file.
256         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
257         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
258         to ...
259         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
260         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
261         to ...
262         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
264 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
266         [BZ #14132]
267         * nptl-init.c (pthread_functions): Remove use of INTUSE and
268         _internal aliases.
269         (__pthread_initialize_minimal_internal): Likewise.
270         * sem_open.c: Likewise.
271         * sem_unlink.c: Likewise.
272         * pthreadP.h: Replace _internal aliases by hidden_proto
273         declarations.
274         * pthread_getspecific.c: Replace _internal alias by hidden_def.
275         * pthread_key_create.c: Likewise.
276         * pthread_mutex_destroy.c: Likewise.
277         * pthread_mutex_init.c: Likewise.
278         * pthread_mutex_lock.c: Likewise.
279         * pthread_mutex_unlock.c: Likewise.
280         * pthread_once.c: Likewise.
281         * pthread_rwlock_rdlock.c: Likewise.
282         * pthread_rwlock_unlock.c: Likewise.
283         * pthread_rwlock_wrlock.c: Likewise.
284         * pthread_setspecific.c: Likewise.
285         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
286         Likewise.
287         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
288         Likewise.
289         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
290         Likewise.
291         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
292         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
293         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
294         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
295         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
297         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
298         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
299         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
300         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
301         Likewise.
302         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
303         Likewise.
304         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
305         Likewise.
307 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
309         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
310         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
312         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
313         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
314         directives.
315         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
316         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
317         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
318         (pthread_barrier_wait): Likewise.
319         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
320         (__pthread_cond_broadcast): Likewise.
321         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
322         (__pthread_cond_signal): Likewise.
323         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
324         (__pthread_cond_timedwait): Likewise.
325         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
326         Likewise.
327         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
328         (__pthread_rwlock_rdlock): Likewise.
329         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
330         (pthread_rwlock_timedrdlock): Likewise.
331         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
332         (pthread_rwlock_timedwrlock): Likewise.
333         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
334         (__pthread_rwlock_unlock): Likewise.
335         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
336         (__pthread_rwlock_wrlock): Likewise.
337         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
338         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
339         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
340         Likewise.
341         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
343 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
345         [BZ #12416]
346         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
347         __libc_stack_end rounded to the end of containing page as the
348         real stack end.
350 2012-05-25  Rayson Ho  <rho@redhat.com>
352         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
353         probes for i386.
354         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
355         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
357         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
358         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
360         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
361         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
363 2012-05-25  Rayson Ho  <rho@redhat.com>
364             Roland McGrath  <roland@hack.frob.com>
366         * DESIGN-systemtap-probes.txt: New file.
367         * pthread_cond_broadcast.c: SystemTap probes.
368         * pthread_cond_init.c: Likewise.
369         * pthread_cond_signal.c: Likewise.
370         * pthread_cond_wait.c: Likewise.
371         * pthread_cond_destroy.c: Likewise.
372         * pthread_create.c: Likewise.
373         * pthread_join.c: Likewise.
374         * pthread_mutex_destroy.c: Likewise.
375         * pthread_mutex_init.c: Likewise.
376         * pthread_mutex_lock.c: Likewise.
377         * pthread_mutex_timedlock.c: Likewise.
378         * pthread_mutex_unlock.c: Likewise.
379         * pthread_rwlock_destroy.c: Likewise.
380         * pthread_rwlock_rdlock.c: Likewise.
381         * pthread_rwlock_unlock.c: Likewise.
382         * pthread_rwlock_wrlock.c: Likewise.
383         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
384         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
389         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
390         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
392 2012-05-24  Roland McGrath  <roland@hack.frob.com>
394         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
396 2012-05-17  Andreas Jaeger  <aj@suse.de>
398         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
399         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
400         only for older kernels.
402 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
404         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
405         not define.
407 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
410         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
411         (lll_robust_lock): Likewise.
412         (lll_cond_lock): Likewise.
413         (lll_robust_cond_lock): Likewise.
414         (lll_timedlock): Likewise.
415         (lll_robust_timedlock): Likewise.
416         (lll_unlock): Likewise.
417         (lll_robust_unlock): Likewise.
419 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
422         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
424 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
426         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
427         on NWAITERS.
428         (__gcc_personality_v0): Replace 8-byte data alignment with
429         LP_SIZE alignment and .quad with ASM_ADDR.
431 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
433         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
434         on NWAITERS.
435         (__gcc_personality_v0): Replace 8-byte data alignment with
436         LP_SIZE alignment and .quad with ASM_ADDR.
438 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
440         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
441         NWAITERS, which is unsigned long int.
443 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
445         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
446         (__gcc_personality_v0): Replace 8-byte data alignment with
447         LP_SIZE alignment and .quad with ASM_ADDR.
449 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
451         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
452         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
453         __vdso_clock_gettime pointer into RAX_LP.
454         (__gcc_personality_v0): Replace 8-byte data alignment with
455         LP_SIZE alignment and .quad with ASM_ADDR.
457 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
460         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
461         __vdso_clock_gettime pointer into RAX_LP.
462         (__gcc_personality_v0): Replace 8-byte data alignment with
463         LP_SIZE alignment and .quad with ASM_ADDR.
465 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
467         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
468         LP_OP(cmp) and R8_LP on dep_mutex pointer.
470 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
472         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
473         to update pointer in memory.  Load pointer into RDI_LP.
475 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
477         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
478         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
479         of 8.
480         (LLL_STUB_UNWIND_INFO_END): Likewise.
481         (lll_timedlock): Load timeout pointer into RDX_LP.
482         (lll_robust_timedlock): Likewise.
484 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
485             Jakub Jelinek  <jakub@redhat.com>
487         [BZ #13613]
488         * Makefile (tests): Add test cases.
489         * descr.h (struct pthread): Add a comment describing multiple_threads.
490         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
491         single-process case.
492         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
493         before setting cancelstate of the thread.
494         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
495         (__libc_multiple_threads): Add explanatory comment.
496         * tst-cancel-self-cancelstate.c: New test case.
497         * tst-cancel-self-canceltype.c: Likewise.
498         * tst-cancel-self-cleanup.c: Supporting file for test cases.
499         * tst-cancel-self-testcancel.c: New test case.
500         * tst-cancel-self.c: Likewise.
501         * vars.c: Expand comment to include single-process case.
503 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
505         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
506         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
507         to 32 bytes.
509 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
511         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
512         New.
513         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
514         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
516 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
518         * shlib-versions: Move x86_64-.*-linux.* entry to ...
519         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
520         * sysdeps/x86_64/x32/shlib-versions: New file.
522 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
524         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
525         __SIZEOF_PTHREAD_XXX_T.
526         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
527         (pthread_mutex_t): Likewise.
528         (pthread_rwlock_t): Likewise.
529         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
530         is defined.
532 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
534         * sysdeps/x86_64/x32/tls.h: New file.
536 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
538         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
539         integer.
540         (THREAD_SETMEM_NC): Likewise.
542 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
544         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
545         mov/%0.
547 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
549         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
550         (__cleanup_fct_attribute): Check __x86_64__ instead of
551         __WORDSIZE.
553 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
555         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
556         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
557         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
558         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
559         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
561 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
563         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
564         instead of __WORDSIZE.
566 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
568         [BZ #3748]
569         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
571 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
573         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
574         (__pthread_cond_timedwait): Use CFI directives.
575         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
576         (__pthread_cond_wait): Likewise.
577         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
578         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
580 2012-05-03  David S. Miller  <davem@davemloft.net>
582         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
583         always have to return 0, especially for the pthread_spin_init
584         alias.
585         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
586         newline.
587         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
588         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
590 2012-05-02  David S. Miller  <davem@davemloft.net>
592         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
593         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
594         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
595         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
596         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
597         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
598         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
599         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
600         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
601         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
602         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
603         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
604         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
605         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
606         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
607         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
608         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
609         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
611 2012-05-02  Allan McRae  <allan@archlinux.org>
613         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
614         (LDFLAGS-tst-cancel24): Likewise.
616 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
618         * sysdeps/i386/pthread_spin_lock.S: New.
619         * sysdeps/i386/pthread_spin_lock.c: Delete.
620         * sysdeps/x86_64/pthread_spin_lock.S: New.
621         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
623 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
625         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
626         run when cross-compiling.
628 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
630         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
631         instead of libgcc_s.h.
633 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
635         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
637 2012-03-27  David S. Miller  <davem@davemloft.net>
639         * tst-cond16.c (do_test): Use a thread stack size which is either
640         PTHREAD_STACK_MIN or the page size, whichever is larger.
641         * tst-cond18.c (do_test): Likewise.
643 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
645         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
646         register char * __asm__("rsp") to get stack frame.
648 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
650         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
651         __NR_futex directly.
653 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
655         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
656         _Unwind_Ptr first.
658 2012-03-16  David S. Miller  <davem@davemloft.net>
660         [BZ #13844]
661         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
662         instead of "...".
663         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
664         Delete, not needed.
666 2012-03-15  David S. Miller  <davem@davemloft.net>
668         [BZ #13844]
669         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
671 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
673         [BZ #13673]
674         * pt-crti.S: Replace FSF snail mail address with URL.
676 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
678         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
679         Do not define before including <time.h>.
681 2012-03-08  David S. Miller  <davem@davemloft.net>
683         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
685 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
687         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
688         Check for timestamp before the Epoch.
690         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
691         updating nwaiters.
693         * tst-sem13.c (do_test): Add another test case.
694         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
695         Fix updating nwaiters.
697 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
699         [BZ #10545]
700         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
701         link test to a compile test.
702         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
703         <stdio.h>.
704         * sysdeps/pthread/configure: Regenerated.
706 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
708         * Makefile (distribute): Remove variable.
710 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
712         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
713         superfluous assignment.
714         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
715         Likewise.
716         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
717         (sem_timedwait): Likewise.
719 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
721         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
722         installed headers to...
723         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
725 2012-03-06  David S. Miller  <davem@davemloft.net>
727         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
728         atomic_increment and remove unused local variable.
729         (__old_sem_post): Likewise.
731 2012-02-27  David S. Miller  <davem@davemloft.net>
733         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
734         non-existing __pthread_attr.
735         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
736         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
737         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
738         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
739         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
741 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
743         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
745         * sysdeps/pthread/pthread.h: Define __need_timespec before including
746         <time.h>.
747         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
748         union.
749         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
750         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
751         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
752         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
753         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
755 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
757         [BZ #13695]
758         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
759         pt-initfini.s.
760         [crti.S not in sysdirs] (omit-deps): Do not append.
761         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
762         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
763         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
764         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
765         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
766         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
767         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
768         [crti.S in sysdirs] (extra-objs): Append unconditionally.
769         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
770         unconditionally.
771         * sysdeps/pthread/pt-initfini.c: Remove file.
773 2012-02-16  Richard Henderson  <rth@twiddle.net>
775         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
776         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
778 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
780         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
782 2012-02-16  David S. Miller  <davem@davemloft.net>
784         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
786 2012-02-15  Marek Polacek  <polacek@redhat.com>
788         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
790 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
792         Replace FSF snail mail address with URLs, as per GNU coding standards.
794 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
796         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
798 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
800         Support crti.S and crtn.S provided directly by architectures.
801         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
802         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
803         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
804         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
805         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
806         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
807         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
808         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
809         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
810         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
811         * pt-crti.S: New file.
812         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
814 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
816         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
817         macros for PIC register setup.
818         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
819         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
820         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
821         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
822         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
824 2012-01-11  Marek Polacek  <polacek@redhat.com>
826         * forward.c (FORWARD_NORETURN): Define macro.
827         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
828         (__pthread_exit): Likewise.
830 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
832         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
834         * pthreadP.h: Add noreturn to __pthread_exit.
835         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
837 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
839         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
840         Call pthread_attr_setstacksize() with result of
841         __pthread_get_minstack() to account for application TLS usage.
843 2012-01-08  Marek Polacek  <polacek@redhat.com>
845         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
847 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
849         [BZ #13553]
850         * pthreadP.h: Use const instead of __const.
851         * semaphore.h: Likewise.
852         * sysdeps/pthread/bits/libc-lock.h: Likewise.
853         * sysdeps/pthread/bits/sigthread.h: Likewise.
854         * sysdeps/pthread/pthread.h: Likewise.
856         * Makefile: Remove elf=yes test, only ELF is supported.
858         * shlib-versions: Remove entries for ports architectures.
860         In case anyone cares, the IA-64 architecture could move to ports.
861         * sysdeps/ia64/*: Removed.
862         * sysdeps/unix/sysv/linux/ia64/*: Removed.
864 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
866         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
867         __pthread_get_minstack.
868         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
870         [BZ #13088]
871         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
872         through __pthread_get_minstack.
873         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
874         directly from _rtld_global_ro.
875         (__pthread_get_minstack): New function.
876         * pthreadP.h: Declare __pthread_get_minstack.
877         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
879 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
881         [BZ #13515]
882         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
883         Correct reading name from file.
885 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
887         * allocatestack.c (allocate_stack): Return errno on failure.
889 2011-12-14  Jeff Law  <law@redhat.com>
891         [BZ #5245]
892         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
894 2011-11-28  Andreas Schwab  <schwab@redhat.com>
896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
897         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
898         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
900 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
902         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
903         /proc/self/maps.
905 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
907         [BZ #13358]
908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
909         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
910         path for kernels with FUTEX_CLOCK_REALTIME.
911         Debugged by H.J. Lu <hjl.tools@gmail.com>.
913 2011-10-27  Andreas Schwab  <schwab@redhat.com>
915         [BZ #13344]
916         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
917         for memory synchronization functions.
918         * semaphore.h: Likewise.
920 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
922         * tst-cancel7.c: Avoid warning.
923         * tst-mutex6.c: Likewise.
924         * tst-mutex9.c: Likewise.
925         * tst-mutexpi6.c: Likewise.
927 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
929         * sysdeps/i386/tls.h: Remove #include <list.h>.
931 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
933         * pthread_create.c (start_thread): Call __ctype_init.
935 2011-09-15  Andreas Schwab  <schwab@redhat.com>
937         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
938         defined.
939         (list_add): Add atomic_write_barrier.
940         * descr.h: Define __need_list_t before including <list.h>.
941         * nptl-init.c: Include <list.h>
942         * allocatestack.c: Likewise.
944 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
946         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
947         * sysdeps/ia64/tls.h: Likewise.
948         * sysdeps/powerpc/tls.h: Likewise.
949         * sysdeps/s390/tls.h: Likewise.
950         * sysdeps/sh/tls.h: Likewise.
951         * sysdeps/sparc/tls.h: Likewise.
952         * sysdeps/x86_64/tls.h: Likewise.
954 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
956         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
958         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
959         !USE___THREAD.
960         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
961         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
962         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
963         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
964         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
965         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
966         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
967         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
968         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
969         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
970         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
971         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
973         * tst-tls1.c: Support for __thread is now mandatory.
974         * tst-tls2.c: Likewise.
975         * tst-tls3.c: Likewise.
976         * tst-tls3mod.c: Likewise.
977         * tst-tls4.c: Likewise.
978         * tst-tls4moda.c: Likewise.
979         * tst-tls4modb.c: Likewise.
980         * tst-tls5.h: Likewise.
982 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
984         [BZ #12403]
985         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
986         (pthread_rwlock_timedwrlock): Use correct macro in test.
987         Patch by H.J. Lu <hongjiu.lu@intel.com>.
989 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
991         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
992         use gettimeofday vsyscall, just call gettimeofday.
993         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
994         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
995         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
996         Likewise.
997         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
998         Likewise.
999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1000         Simplify __vdso_clock_gettime use.
1002 2011-09-05  David S. Miller  <davem@davemloft.net>
1004         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1005         New function.
1006         (sem_timedwait): Call it to force an exception region around
1007         the async cancel enable and the futex operation.
1008         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1009         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1010         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1011         (__new_sem_wait): Call it to force an exception region around
1012         the async cancel enable and the futex operation.
1013         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1014         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1016 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1018         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1019         thread is woken up.
1021 2011-08-20  David S. Miller  <davem@davemloft.net>
1023         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1025 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1027         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1028         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1030 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1032         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1033         stack.
1034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1035         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1037 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1039         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1040         barrier.
1041         (__gcc_personality_v0): Likewise.
1042         (_Unwind_ForcedUnwind): Likewise.
1043         (_Unwind_GetCFA): Likewise.
1045 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1047         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1048         UINTMAX_C.
1050 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1052         * nptl-init.c (__nptl_set_robust): New function.
1053         (pthread_functions): Add reference.
1054         * npthreadP.h: Declare __nptl_set_robust.
1055         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1056         ptr_set_robust member.
1057         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1058         child if threads are used.
1060 2011-06-14  Andreas Jaeger  <aj@suse.de>
1062         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1064 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1066         [BZ #386]
1067         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1069 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1071         [BZ #12650]
1072         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1073         clearing memory.
1074         Patch partly by Robert Rex <robert.rex@exasol.com>.
1076 2011-01-19  Roland McGrath  <roland@redhat.com>
1078         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1079         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1080         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1081         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1082         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1083         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1085 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1087         * Makefile (test-extras): Add tst-cleanup4aux.
1089 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1091         [BZ #10563]
1092         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1093         (__SETXID_2): Likewise.
1094         (__SETXID_3): Likewise.
1096 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1098         [BZ #10484]
1099         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1100         * alloca_cutoff.c: Add libc_hidden_def.
1102 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1104         [BZ #12113]
1105         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1106         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1107         of "struct pthread".
1109 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1111         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1112         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1113         (pthread_cleanup_push_defer_np): Likewise.
1115 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1117         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1118         small.
1120 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1121             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1124         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1126 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1128         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1130 2010-05-01  Alan Modra  <amodra@gmail.com>
1132         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1133         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1134         to save temps.  Correct cfi for possible later frame manipulation.
1135         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1136         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1137         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1138         (DOCARGS_6, UNDOCARGS_6): Likewise.
1139         (CENABLE, CDISABLE): Add nops for non-shared calls.
1141 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1143         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1144         Fix type mismatch.
1146 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1148         * tst-abstime.c (do_test): Some more cleanups
1150 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1152         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1154 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1155             Ulrich Drepper  <drepper@redhat.com>
1157         * Makefile (tests): Add tst-abstime.
1158         * tst-abstime.c: New file.
1159         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1160         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1162         (__lll_timedlock_wait): Likewise.
1163         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1164         (__lll_robust_timedlock_wait): Likewise.
1165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1166         (__pthread_cond_timedwait): Likewise.
1167         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1168         (pthread_rwlock_timedrdlock): Likewise.
1169         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1170         (pthread_rwlock_timedwrlock): Likewise.
1171         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1172         Likewise.
1174 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1176         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1178 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1180         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1181         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1183 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1185         [BZ #11390]
1186         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1187         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1188         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1189         pthread_setname.
1190         * Makefile (libpthread-routines): Add pthread_getname and
1191         pthread_setname.
1192         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1194 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1196         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1197         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1198         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1199         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1201 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1203         * pthread_cond_timedwait.c: Add check for
1204         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1205         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1206         INTERNAL_SYSCALL.
1208 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1210         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1211         and the call fails wake eventually waiting setxid threads.  Don't free
1212         stack here if we try starting a thread.
1213         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1214         if the clone call failed.
1216 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1218         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1219         * allocatestack.c (get_cached_stack): Set setxid_futex.
1220         (allocate_stack): Likewise.
1222 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1223             Ulrich Drepper  <drepper@redhat.com>
1225         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1226         it is creating a thread or it is just being created.
1227         * pthread_create.c (start_thread): Wake setxid thread if it is
1228         waiting.
1229         (__pthread_create_2_1): Initialize setxid_futex.
1230         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1231         is waiting.
1233 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1236         Fix unwind info.
1237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1239 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1242         Fix pthread_cond_timedwait with requeue-PI.
1243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1244         Fix pthread_cond_wait with requeue-PI.
1246 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1248         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1249         and pthread_mutexattr_setrobust for GLIBC_2.12.
1250         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1251         * pthread_mutexattr_getrobust.c: Define alias
1252         pthread_mutexattr_getrobust.
1253         * pthread_mutexattr_setrobust.c: Define alias
1254         pthread_mutexattr_setrobust.
1256 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1258         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1260 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1262         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1264 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1266         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1267         call __gmon_start__.
1268         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1270 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1272         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1273         using memset.
1275 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1277         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1278         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1279         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1280         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1283         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1286 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1288         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1289         Don't update nwaiters after invalid timeout is recognized.
1291 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1293         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1294         __gmon_start__.
1296 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1298         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1299         THREAD_SELF->cancelhandling after returning from futex call.
1301 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1303         * tst-sem13.c: New file.
1304         * Makefile (tests): Add tst-sem13.
1306 2009-11-22  Roland McGrath  <roland@redhat.com>
1308         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1309         instead of recapitulating its contents.
1311 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1314         optimizations and cleanups.
1316 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1319         Remove redundant code. Fix cfi offsets.
1320         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1321         Fix cfi offsets.
1323 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1326         reduce size of unwind info.
1328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1329         cfi directives.
1330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1331         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1333 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1335         [BZ #4457]
1336         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1337         LIBGCC_S_SO.
1338         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1340 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1342         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1344         [BZ #3270]
1345         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1346         steps to avoid races with creation and terminations.
1347         * nptl-init.c (sighandler_setxid): Adjust.
1348         Patch by Daniel Jacobowitz.
1350 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1352         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1354 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1355             Joseph Myers  <joseph@codesourcery.com>
1357         [BZ #7094]
1358         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1359         Initialize the sigev_notify field for newly created timer to make sure
1360         the timer gets deleted from the active timer's list upon timer_delete.
1362 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1364         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1365         Correct a logic error.
1367 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1369         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1370         of the field in local variables.
1371         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1372         variable and don't unconditionally clear it.
1374 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1376         * pthread_create.c (start_thread): Hint to the kernel that memory for
1377         the stack can be reused.  We do not mark all the memory.  The part
1378         still in use and some reserve are kept.
1380 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1382         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1384 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1386         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1387         directives.
1389 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1391         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1392         directives.
1393         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1395 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1397         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1398         (__pthread_cond_signal): Don't clobber register used for syscall
1399         number.
1401 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1403         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1404         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1407         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1408         register.
1410 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1412         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1413         enabled by the special *_asynccancel functions.
1414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1415         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1417         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1419 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1421         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1422         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1423         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1424         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1425         since we can assume the special __*_{en,dis}able_asynccancel
1426         functions.
1427         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1428         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1429         and PTHREAD_CANCELED.
1431 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1433         * descr.h: Better definition of *_BITMASK macros for cancellation.
1435 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1437         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1439         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1440         dynamic linker might have to save.
1441         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1442         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1443         printing.
1445         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1447 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1449         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1450         New function.
1451         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1452         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1454         requeue_pi for robust mutexes.
1455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1457         Don't only skip __pthread_mutex_cond_lock.  Call instead
1458         __pthread_mutex_cond_lock_adjust.
1459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1461         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1462         optimization of PI mutex handling.
1464 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1466         [BZ #10418]
1467         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1468         instead of of _acq variants of cmpxchg.
1470 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1472         * sysdeps/x86_64/configure.in: New file.
1474         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1475         path when not using absolute timeout futex.
1477 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1480         optimizations of last changes.
1481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1483 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1485         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1486         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1487         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1488         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1489         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1491         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1495         (__pthread_cond_timedwait): Make more robust.
1497 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1499         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1500         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1501         directly use absolute timeout.
1503         * tst-sem5.c (do_test): Add test for premature timeout.
1504         * Makefile: Linu tst-sem5 with librt.
1506         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1507         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1508         directly use absolute timeout.
1509         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1510         (pthread_rwlock_timedrdlock): Likewise.
1512         * tst-cond11.c (run_test): Add test to check that the timeout is
1513         long enough.
1515         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1516         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1517         directly use absolute timeout.
1519         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1520         (__pthread_cond_wait): Convert to using exception handler instead of
1521         registered unwind buffer.
1522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1523         (__pthread_cond_timedwait): Likewise.
1525 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1527         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1528         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1529         use absolute timeout.
1531         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1532         handling of uncontested semaphore.
1534         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1535         (__condvar_cleanup): Rewrite to use cfi directives instead of
1536         hand-coded unwind tables.
1537         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1538         Likewise.
1539         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1540         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1541         Likewise.
1543 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1545         * Makefile (libpthread-routines): Add pthread_sigqueue.
1546         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1547         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1548         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1550 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1552         [BZ #10262]
1553         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1554         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1555         cannot be assumed.
1556         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1558 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1560         * libc-cancellation.c: Move __libc_cleanup_routine to...
1561         * libc-cleanup.c: ...here.  New file.
1562         * Makefile (routines): Add libc-cleanup.
1564         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1565         test.
1566         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1567         * sysdeps/pthread/librt-cancellation.c: Likewise.
1569         [BZ #9924]
1570         * nptl-init.c: Renamed from init.c.
1571         * Makefile: Change all occurences of init.c to nptl-init.c.
1573 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1575         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1576         to test when deciding on the delay.
1577         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1578         * pthread_cancel.c: Close race between deciding on sending a signal
1579         and setting the CANCELING_BIT bit.
1581         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1582         thread is canceled.
1583         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1585 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1587         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1588         is available.
1589         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1590         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1591         * sysdeps/i386/tls.h: Likewise.
1592         (tcbhead_t): Add __private_tm member.
1594 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1596         * sem_open.c (sem_open): Rewrite initialization of initsem to
1597         avoid warnings.
1599         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1600         Avoid warning by using may_alias attribute on ptrhack.
1602 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1604         [BZ #10090]
1605         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1606         Check policy and priority for validity.
1607         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1609 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1612         (__pthread_cond_timedwait): Change to use cfi directives instead of
1613         hand-coded unwind sections.
1615 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1617         * init.c (nptl_freeres): Compile only for SHARED.
1619 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1621         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1622         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1623         FUTEX_BITSET_MATCH_ANY.
1625 2009-02-27  Roland McGrath  <roland@redhat.com>
1627         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1628         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1630 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1632         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1633         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1634         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1635         200112L to 200809L.
1637 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1639         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1640         POSIX 2008.
1642 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1644         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1645         Unify name of include protector macro.
1647 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1649         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1650         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1652 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1654         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1655         pointer variables.
1657         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1658         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1659         * init.c (nptl_freeres): New function.
1660         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1661         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1662         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1663         variable.
1664         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1665         load DSO.  Assign last.
1666         (__unwind_freeres): New function.
1668         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1669         for better debugging.  No need to use stack_list_add here.
1671 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1673         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1674         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1675         instead of computing relative timeout.
1676         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1677         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1679 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1681         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1683 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1685         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1686         (list_add_tail): Removed.
1688 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1690         * (in_flight_stack): New variable.
1691         (stack_list_del): New function.  Use instead of list_del.
1692         (stack_list_add): New function.  Use instead of list_add when adding to
1693         stack_cache and stack_used lists.
1694         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1695         when the fork call interrupted another thread.
1697 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1699         * init.c (__pthread_initialize_minimal_internal): Optimize test
1700         FUTEX_CLOCK_REALTIME a bit.
1702 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1704         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1705         only passing five parameters to FUTEX_WAIT_BITSET call.
1707         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1708         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1709         instead of computing relative timeout.
1711 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1713         * init.c (__pthread_initialize_minimal_internal): Check for
1714         FUTEX_CLOCK_REALTIME flag.
1715         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1716         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1717         relative timeout.
1719         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1720         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1721         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1722         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1723         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1724         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1726 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1728         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1729         loop body instead of ; to avoid gcc warnings.
1730         (pthread_cleanup_pop_restore_np): Likewise.
1731         Patch by Caolán McNamara <caolanm@redhat.com>.
1733 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1735         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1736         fast path here, for robust/PI/PP mutexes call
1737         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1738         of ifs according to their probability.
1739         (__pthread_mutex_lock_full): New function.
1740         * pthread_mutex_unlock.c: Include assert.h.
1741         (__pthread_mutex_unlock_usercnt): Handle only the
1742         fast path here, for robust/PI/PP mutexes call
1743         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1744         of ifs according to their probability.
1745         (__pthread_mutex_unlock_full): New function.
1746         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1747         (__pthread_mutex_lock_full): Define.
1749 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1751         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1752         implementation.  Add necessary padding and.
1753         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1754         words.
1756 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1758         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1759         and FUTEX_WAKE_BITSET.
1761 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1763         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1764         and FUTEX_WAKE_BITSET.
1765         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1766         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1767         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1768         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1770 2008-11-25  Roland McGrath  <roland@redhat.com>
1772         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1773         Subdirectories moved to ports repository as
1774         sysdeps/.../nptl subdirectories.
1776 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1778         [BZ #7008]
1779         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1780         of old value.
1781         * pthread_cond_init.c (__pthread_cond_init): Fix
1782         cond->__data.__nwaiters initialization.
1783         * Makefile (tests): Add tst-cond23.
1784         * tst-cond23.c: New test.
1786 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1788         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1789         arguments.
1790         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1791         arguments.
1793 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1795         [BZ #6955]
1796         * pthread_mutex_lock.c: Add support for private PI mutexes.
1797         * pthread_mutex_timedlock.c: Likewise.
1798         * pthread_mutex_trylock.c: Likewise.
1799         * pthread_mutex_unlock.c: Likewise.
1800         Patch mostly by Ben Jackson <ben@ben.com>.
1802 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1804         [BZ #6843]
1805         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1806         Increase stack size for helper thread.
1808 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1810         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1811         assembly with a clobber list for access registers a0 and a1.
1813 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1815         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1816         to force runp->refcntr to be read from memory.
1818 2008-09-08  Richard Guenther  <rguenther@suse.de>
1820         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1821         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1822         lll_timedlock, lll_robust_timedlock, lll_unlock,
1823         lll_robust_unlock): Promote private to int.
1825 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1827         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1828         ARCH_RETRY_MMAP definitions.
1829         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1830         Define MAP_STACK when not defined.
1831         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1832         handling of ARCH_RETRY_MMAP.
1834 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1836         * tst-align2.c (f): Print message that f is reached.
1838 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1840         [BZ #6740]
1841         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1842         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1844 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1846         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1847         SOCK_CLOEXEC if possible.
1849 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1851         * Makefile (tests): Add tst-rwlock2a.
1852         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1853         * tst-rwlock2a.c: New file.
1855 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1857         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1859 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1861         * sysdeps/pthread/pthread.h: Fix typo in comment.
1863 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1865         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1866         of CPU set to the kernel.
1868 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1870         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1871         cfi directives.
1872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1873         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1874         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1877         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1879 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1881         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1882         cfi directives.
1883         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1884         Likewise.
1885         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1886         Likewise.
1887         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1888         Likewise.
1890 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1892         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1894 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1896         David S. Miller  <davem@davemloft.net>
1898         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1900 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1902         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1903         __pshared correctly.
1904         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1905         Likewise.
1906         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1907         Likewise.
1908         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1909         Likewise.
1910         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1911         Likewise.
1912         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1914 2008-04-14  David S. Miller  <davem@davemloft.net>
1916         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1917         (__old_sem_wait): Fix argument to lll_futex_wait().
1919 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1921         * pthread_create.c: Require pthread_mutex_trylock and
1922         pthread_key_delete for libgcc.
1924 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1926         [BZ #6020]
1927         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1928         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1929         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1931 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1933         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1934         <linux/limits.h> has defined it.
1935         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1936         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1937         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1938         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1940 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1942         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1943         of ASSEMBLER.
1944         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1945         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1947 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1949         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1950         HAVE_DL_DISCOVER_OSVERSION.
1951         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1952         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1954 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1956         [BZ #5778]
1957         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1958         _POSIX_CHOWN_RESTRICTED value to zero.
1960 2008-01-31  Roland McGrath  <roland@redhat.com>
1962         * Makefile (omit-deps): Variable removed.
1964 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1966         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1967         unnecessary addr32 prefix.
1969 2008-01-29  Roland McGrath  <roland@redhat.com>
1971         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1973 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1975         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1977 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1979         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1980         a scratch register.
1981         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1982         (__lll_lock_wait_private): Fix typo.
1983         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1984         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1985         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1986         Adjust XADD use.
1987         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1988         (pthread_rwlock_timedrdlock): Return correct return value.
1989         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1990         (pthread_rwlock_timedwrlock): Likewise.
1992 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1994         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1995         thread returns the program exits with an error code.
1997 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1999         * pthread-errnos.sym: Add EOVERFLOW.
2000         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2001         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2002         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2003         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2005 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2007         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2008         parameter.  Passed it as permission to mmap.
2009         * allocatestack.c (allocate_stack): Pass prot as second parameter
2010         to ARCH_RETRY_MMAP.
2012 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2014         * tst-basic7.c: Allocate memory for the stack.
2016         [BZ #5465]
2017         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2018         (__pthread_cond_timedwait): Don't use VDSO.
2019         Patch by Michal Januszewski.
2021 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2023         [BZ #5455]
2024         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2025         Allow label before pthread_cleanup_pop.
2026         (pthread_cleanup_pop_restore_np): Likewise.
2028 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2030         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2031         Store 2 before returning ETIMEDOUT.
2033 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2035         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2036         Store 2 before returning ETIMEDOUT.
2037         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2038         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2039         (__lll_lock_wait_private): Optimize.
2040         (__lll_lock_wait): Likewise.
2042 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2044         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2045         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2046         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2048 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2050         [BZ #5240]
2051         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2052         If we time out, try one last time to lock the futex to avoid
2053         losing a wakeup signal.
2054         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2055         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2057         [BZ #5245]
2058         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2059         if necessary.
2061 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2063         [BZ #5245]
2064         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2065         mmap failed to EAGAIN.
2066         * Makefile (tests): Add tst-basic7.
2067         * tst-basic7.c: New file.
2069 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2071         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2072         Use __linkin_atfork.
2074 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2076         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2077         missing line continuations.
2078         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2079         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2081 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2083         [BZ #5220]
2084         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2085         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2086         (struct timer): Add next element.
2087         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2088         enqueue timer structure into __active_timer_sigev_thread list.
2089         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2090         remove timer struct from __active_timer_sigev_thread.
2091         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2092         Before using timer structure make sure it is still on the
2093         __active_timer_sigev_thread list.  Keep lock until done.
2094         Define __active_timer_sigev_thread and
2095         __active_timer_sigev_thread_lock.
2097 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2099         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2100         Redefine thread_atfork for use of ATFORK_MEM.
2101         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2102         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2103         function.
2104         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2105         Use atomic operation when removing first element of list.
2107 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2109         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2110         routine instead of an alias to __new_sem_post.
2112 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2114         * init.c (__pthread_initialize_minimal): Initialize word to appease
2115         valgrind.
2117 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2119         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2120         libc.so just clear NAME.
2121         (__libc_rwlock_fini): Nop inside of libc.so.
2122         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2123         all zeros.
2125 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2128         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2129         unlocking failed.
2130         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2132 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2134         [BZ #4938]
2135         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2136         reclaimed stack if necessary.
2137         * Makefile (tests): Add tst-tsd6.
2138         * tst-tsd6.c: New file.
2140 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2142         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2143         Add private argument.
2145 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2147         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2148         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2150 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2152         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2153         (__lll_robust_timedlock): Pass private as last argument to
2154         __lll_robust_timedlock_wait.
2155         (__lll_unlock): Fix a pasto.
2157 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2159         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2160         sparc_old_sem): New structs.
2161         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2162         (__sem_wait_cleanup): New function.
2163         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2164         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2165         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2166         lll_futex_wait.
2167         (__old_sem_wait): New function.
2168         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2169         nptl/sysdeps/unix/sysv/linux/sparc version.
2170         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2171         Likewise.
2172         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2173         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2174         (__new_sem_trywait): Use sparc_old_sem structure.
2175         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2176         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2177         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2178         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2179         lll_futex_timed_wait.
2180         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2181         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2182         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2183         lll_futex_wake.
2184         (__old_sem_post): New function.
2185         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2186         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2187         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2188         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2189         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2190         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2192 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2194         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2195         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2196         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2197         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2198         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2199         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2200         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2201         Use FUTEX_WAKE_OP.
2202         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2203         kernel-features.h and tcb-offsets.h.
2204         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2205         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2206         process private.
2207         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2208         tcb-offsets.h.
2209         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2210         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2211         process private.
2212         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2213         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2215         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2217         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2220 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2222         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2223         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2224         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2225         lll_futex_timed_wait.
2227         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2228         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2229         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2230         __lll_robust_unlock, __lll_wait_tid): Likewise.
2232 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2234         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2235         Fix a pasto.
2236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2237         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2238         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2239         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2241         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2242         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2244         kernel-features.h.
2245         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2246         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2247         process private.  Switch DW_CFA_advance_loc1 and some
2248         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2249         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2250         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2251         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2252         process private.  Switch DW_CFA_advance_loc{1,2} and some
2253         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2255         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2257         Likewise.
2258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2259         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2260         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2261         Likewise.
2262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2263         (__pthread_cond_broadcast): Compare %r8 instead of
2264         dep_mutex-cond_*(%rdi) with $-1.
2265         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2266         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2267         of oring.
2269 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2271         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2273 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2275         * allocatestack.c: Include kernel-features.h.
2276         * pthread_create.c: Likewise.
2277         * pthread_mutex_init.c: Likewise.
2278         * init.c: Likewise.
2279         * pthread_cond_timedwait.c: Likewise.
2280         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2281         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2282         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2283         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2284         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2286         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2287         Likewise.
2288         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2289         Likewise.
2290         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2291         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2292         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2293         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2295 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2297         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2298         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2299         byte elements.  One of them is the new __shared element.
2300         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2301         adjust names of other padding elements.
2302         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2303         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2304         byte elements.  One of them is the new __shared element.
2305         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2306         adjust names of other padding elements.
2307         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2308         Renamed __pad1 element to __shared, adjust names of other padding
2309         elements.
2310         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2311         (pthread_rwlock_t): Likewise.
2312         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2313         typo.
2315 2007-08-09  Anton Blanchard  <anton@samba.org>
2317         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2319 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2322         <kernel-features.h>.
2323         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2325 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2327         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2328         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2329         dealing with robust mutexes.
2330         * pthread_mutex_timedlock.c: Likewise.
2331         * pthread_mutex_trylock.c: Likewise.
2332         * pthread_mutex_unlock.c: Likewise.
2333         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2335 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2337         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2338         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2339         (PTHREAD_MUTEX_PSHARED): Define.
2340         * pthread_mutex_init.c (__pthread_mutex_init): Set
2341         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2342         mutexes.
2343         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2344         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2345         as second argument to lll_lock.
2346         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2347         instead of its __data.__lock field.
2348         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2349         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2350         to lll_robust_lock.
2351         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2352         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2353         instead of mutex->__data.__kind directly, pass
2354         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2355         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2356         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2357         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2358         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2359         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2360         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2361         of mutex->__data.__kind directly.
2362         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2363         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2364         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2365         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2366         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2367         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2368         and lll_futex_wake.
2369         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2370         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2371         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2372         directly.
2373         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2374         Take mutex as argument instead of its __data.__lock field, pass
2375         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2376         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2377         __data.__lock field.
2378         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2379         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2380         to lll_robust_cond_lock.
2381         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2382         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2383         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2384         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2385         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2386         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2387         lll_futex_wait.
2388         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2389         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2390         lll_futex_wake.
2391         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2392         pshared variable, pass it to lll_lock, lll_unlock,
2393         lll_futex_timedwait and lll_futex_wake.
2394         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2395         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2396         and lll_futex_wake.
2397         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2398         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2399         macro.
2400         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2401         lll_futex_wake_unlock): Likewise.
2402         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2403         Likewise.
2404         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2405         lll_futex_wake_unlock): Likewise.
2406         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2407         Likewise.
2408         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2409         lll_futex_wake_unlock): Likewise.
2410         (lll_futex_wake): Fix a typo.
2411         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2413         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2414         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2415         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2417         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2418         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2419         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2420         (__pthread_cond_timedwait): Likewise.
2421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2422         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2424 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2426         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2427         Don't use CGOTSETUP and CGOTRESTORE macros.
2428         (CGOTSETUP, CGOTRESTORE): Remove.
2429         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2430         @local symbol.
2432 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2434         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2435         definitions for private futexes.
2436         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2437         kernel-features.h and lowlevellock.h.  Use private futexes if
2438         they are available.
2439         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2440         (__lll_mutex_lock_wait): Rename to
2441         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2442         (__lll_mutex_timedlock_wait): Rename to ...
2443         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2444         Don't compile in for libc.so.
2445         (__lll_mutex_unlock_wake): Rename to ...
2446         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2447         (__lll_timedwait_tid): Use __NR_gettimeofday.
2448         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2449         the header from assembler.  Renamed all lll_mutex_* resp.
2450         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2451         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2452         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2453         Define.
2454         (__lll_lock_wait_private): Add prototype.
2455         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2456         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2457         __lll_unlock_wake): Likewise.
2458         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2459         if private is constant LLL_PRIVATE.
2460         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2461         lll_timedlock, lll_robust_timedlock): Add private argument.
2462         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2463         if private is constant LLL_PRIVATE.
2464         (lll_robust_unlock, lll_robust_dead): Add private argument.
2465         (lll_lock_t): Remove.
2466         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2467         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2468         lll_cond_wake, lll_cond_broadcast): Remove.
2469         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2470         kernel-features.h and lowlevellock.h.
2471         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2472         (LOAD_FUTEX_WAIT): Define.
2473         (__lll_robust_mutex_lock_wait): Rename to ...
2474         (__lll_robust_lock_wait): ... this.  Add private argument.
2475         Use LOAD_FUTEX_WAIT macro.
2476         (__lll_robust_mutex_timedlock_wait): Rename to ...
2477         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2478         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2479         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2480         lowlevellock.h.
2481         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2482         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2483         __lll_mutex_{lock,unlock}_*.
2484         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2485         lowlevellock.h and pthread-errnos.h.
2486         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2487         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2488         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2489         __lll_mutex_{lock,unlock}_*.
2490         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2491         lowlevellock.h and pthread-errnos.h.
2492         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2493         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2494         __lll_mutex_{lock,unlock}_*.
2495         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2496         lowlevellock.h.
2497         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2498         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2499         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2500         (__condvar_tw_cleanup): Likewise.
2501         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2502         lowlevellock.h.
2503         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2504         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2505         __lll_mutex_{lock,unlock}_*.
2506         ( __condvar_w_cleanup): Likewise.
2507         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2508         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2509         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2510         lowlevellock.h.
2511         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2512         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2513         __lll_mutex_{lock,unlock}_*.
2514         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2515         lowlevellock.h.
2516         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2517         FUTEX_PRIVATE_FLAG): Remove.
2518         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2519         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2520         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2521         lowlevellock.h.
2522         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2523         FUTEX_PRIVATE_FLAG): Remove.
2524         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2525         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2526         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2527         lowlevellock.h.
2528         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2529         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2530         __lll_mutex_{lock,unlock}_*.
2531         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2532         lowlevellock.h.
2533         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2534         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2535         __lll_mutex_{lock,unlock}_*.
2536         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2537         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2538         (__new_sem_post): Use standard initial exec code sequences.
2539         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2540         lowlevellock.h.
2541         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2542         FUTEX_PRIVATE_FLAG): Remove.
2543         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2544         exec code sequences.
2545         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2546         (__new_sem_trywait): Use standard initial exec code sequences.
2547         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2548         (__new_sem_wait): Use standard initial exec code sequences.
2550 2007-07-31  Anton Blanchard  <anton@samba.org>
2552         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2553         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2554         atomic_full_barrier.
2556 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2558         * allocatestack.c (stack_cache_lock): Change type to int.
2559         (get_cached_stack, allocate_stack, __deallocate_stack,
2560         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2561         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2562         as second argument to lll_lock and lll_unlock macros on
2563         stack_cache_lock.
2564         * pthread_create.c (__find_in_stack_list): Likewise.
2565         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2566         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2567         as second argument.
2568         * descr.h (struct pthread): Change lock and setxid_futex field
2569         type to int.
2570         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2571         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2572         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2573         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2574         Likewise.
2575         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2576         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2577         * pthreadP.h (__attr_list_lock): Change type to int.
2578         * pthread_attr_init.c (__attr_list_lock): Likewise.
2579         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2580         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2581         lll_{,un}lock.
2582         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2583         also for lll_futex_{wake,wait}.
2584         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2585         a pointer to const.
2586         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2587         LLL_SHARED as second argument to lll_{,un}lock.
2588         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2589         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2590         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2591         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2592         Likewise.
2593         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2594         as second argument to lll_{,un}lock macros on pd->lock.
2595         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2596         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2597         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2598         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2599         Likewise.
2600         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2601         Likewise.
2602         * pthread_once.c (once_lock): Change type to int.
2603         (__pthread_once): Pass LLL_PRIVATE as second argument to
2604         lll_{,un}lock macros on once_lock.
2605         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2606         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2607         rwlock->__data.__shared as second argument to them and similarly
2608         for lll_futex_w*.
2609         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2610         Likewise.
2611         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2612         Likewise.
2613         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2614         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2615         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2616         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2617         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2618         to lll_{,un}lock macros on __sem_mappings_lock.
2619         * sem_open.c (check_add_mapping): Likewise.
2620         (__sem_mappings_lock): Change type to int.
2621         * semaphoreP.h (__sem_mappings_lock): Likewise.
2622         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2623         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2624         instead of lll_*mutex_*, pass LLL_SHARED as last
2625         argument.
2626         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2627         pass LLL_SHARED as last argument.
2628         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2629         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2630         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2631         pass LLL_SHARED as last argument.
2632         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2633         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2634         LLL_SHARED as last argument.
2635         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2636         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2637         Similarly.
2638         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2639         __libc_lock_lock_recursive, __libc_lock_unlock,
2640         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2641         argument to lll_{,un}lock.
2642         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2643         _IO_lock_unlock): Likewise.
2644         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2645         compound literal.
2646         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2647         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2648         __fork_lock.
2649         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2650         free_mem): Likewise.
2651         (__fork_lock): Change type to int.
2652         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2653         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2654         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2655         lll_futex_wake.
2656         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2657         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2658         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2659         New function.
2660         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2661         pass it through to lll_futex_*wait, only compile in when
2662         IS_IN_libpthread.
2663         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2664         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2665         argument and pass it through to lll_futex_*wait.
2666         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2667         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2668         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2669         inline functions to __lll_* resp. __lll_robust_*.
2670         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2671         (lll_mutex_dead): Add private argument.
2672         (__lll_lock_wait_private): New prototype.
2673         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2674         __lll_robust_lock_timedwait): Add private argument to prototypes.
2675         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2676         call __lll_lock_wait_private, otherwise pass private to
2677         __lll_lock_wait.
2678         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2679         __lll_robust_timedlock): Add private argument, pass it to
2680         __lll_*wait functions.
2681         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2682         call __lll_unlock_wake_private, otherwise pass private to
2683         __lll_unlock_wake.
2684         (__lll_robust_unlock): Add private argument, pass it to
2685         __lll_robust_unlock_wake.
2686         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2687         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2688         argument, pass it through to __lll_* inline function.
2689         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2690         (lll_lock_t): Remove.
2691         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2692         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2693         lll_cond_wake, lll_cond_broadcast): Remove.
2694         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2695         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2696         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2697         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2698         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2699         the header from assembler.  Renamed all lll_mutex_* resp.
2700         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2701         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2702         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2703         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2704         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2705         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2706         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2707         Remove prototype.
2708         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2709         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2710         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2711         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2712         MULTIPLE_THREADS_OFFSET as another asm operand.
2713         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2714         MULTIPLE_THREADS_OFFSET as last asm operand, call
2715         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2716         otherwise pass private as another argument to __lll_lock_wait.
2717         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2718         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2719         private as another argument to __lll_*lock_wait call.
2720         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2721         MULTIPLE_THREADS_OFFSET as another asm operand, call
2722         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2723         otherwise pass private as another argument to __lll_unlock_wake.
2724         (lll_robust_unlock): Add private argument, pass private as another
2725         argument to __lll_unlock_wake.
2726         (lll_robust_dead): Add private argument, use __lll_private_flag
2727         macro.
2728         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2729         LLL_MUTEX_LOCK_INITIALIZER.
2730         (lll_lock_t): Remove.
2731         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2732         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2733         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2734         lll_cond_wake, lll_cond_broadcast): Remove.
2735         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2736         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2737         2007-05-2{3,9} changes.
2738         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2739         kernel-features.h and lowlevellock.h.
2740         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2741         (LOAD_FUTEX_WAIT): Rewritten.
2742         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2743         define.
2744         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2745         (__lll_mutex_lock_wait): Rename to ...
2746         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2747         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2748         (__lll_mutex_timedlock_wait): Rename to ...
2749         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2750         contains private argument.  Don't compile in for libc.so.
2751         (__lll_mutex_unlock_wake): Rename to ...
2752         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2753         Don't compile in for libc.so.
2754         (__lll_timedwait_tid): Use __NR_gettimeofday.
2755         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2756         kernel-features.h and lowlevellock.h.
2757         (LOAD_FUTEX_WAIT): Define.
2758         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2759         define.
2760         (__lll_robust_mutex_lock_wait): Rename to ...
2761         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2762         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2763         macro.
2764         (__lll_robust_mutex_timedlock_wait): Rename to ...
2765         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2766         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2767         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2768         lowlevellock.h.
2769         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2770         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2771         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2772         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2773         to __lll_lock_wait in %edx.
2774         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2775         Include lowlevellock.h and pthread-errnos.h.
2776         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2777         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2778         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2779         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2780         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2781         __lll_unlock_wake.
2782         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2783         Include lowlevellock.h and pthread-errnos.h.
2784         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2785         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2786         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2787         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2788         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2789         __lll_unlock_wake.
2790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2791         Include lowlevellock.h.
2792         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2793         Don't define.
2794         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2795         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2796         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2797         __lll_unlock_wake.  Use __NR_gettimeofday.
2798         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2799         Include lowlevellock.h.
2800         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2801         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2802         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2803         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2804         and __lll_unlock_wake.
2805         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2806         Include lowlevellock.h.
2807         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2808         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2809         MUTEX(%ebx) address in %edx rather than %ecx to
2810         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2811         and __lll_unlock_wake.  Move return value from %ecx to %edx
2812         register.
2813         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2814         Include lowlevellock.h.
2815         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2816         Don't define.
2817         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2818         MUTEX(%ebp) address in %edx rather than %ecx to
2819         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2820         and __lll_unlock_wake.  Move return value from %ecx to %edx
2821         register.  Use __NR_gettimeofday.
2822         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2823         Include lowlevellock.h.
2824         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2825         Don't define.
2826         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2827         MUTEX(%ebp) address in %edx rather than %ecx to
2828         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2829         and __lll_unlock_wake.  Move return value from %ecx to %edx
2830         register.  Use __NR_gettimeofday.
2831         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2832         Include lowlevellock.h.
2833         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2834         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2835         MUTEX(%edi) address in %edx rather than %ecx to
2836         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2837         and __lll_unlock_wake.
2838         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2839         Include lowlevellock.h.
2840         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2841         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2842         MUTEX(%ebx) address in %edx rather than %ecx to
2843         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2844         and __lll_unlock_wake.  Move return value from %ecx to %edx
2845         register.
2846         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2847         lowlevellock.h.
2848         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2849         define.
2850         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2851         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2852         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2853         lowlevellock.h.
2854         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2855         (sem_timedwait): Use __NR_gettimeofday.
2856         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2857         lowlevellock.h.
2858         (LOCK): Don't define.
2859         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2860         lowlevellock.h.
2861         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2862         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2863         are waiters.
2864         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2865         2007-05-2{3,9} changes.
2866         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2867         kernel-features.h and lowlevellock.h.
2868         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2869         (LOAD_FUTEX_WAIT): Rewritten.
2870         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2871         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2872         (__lll_mutex_lock_wait): Rename to ...
2873         (__lll_lock_wait): ... this.  %esi is now private argument.
2874         Don't compile in for libc.so.
2875         (__lll_mutex_timedlock_wait): Rename to ...
2876         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2877         Don't compile in for libc.so.
2878         (__lll_mutex_unlock_wake): Rename to ...
2879         (__lll_unlock_wake): ... this.  %esi contains private argument.
2880         Don't compile in for libc.so.
2881         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2882         kernel-features.h and lowlevellock.h.
2883         (LOAD_FUTEX_WAIT): Define.
2884         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2885         (__lll_robust_mutex_lock_wait): Rename to ...
2886         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2887         Use LOAD_FUTEX_WAIT macro.
2888         (__lll_robust_mutex_timedlock_wait): Rename to ...
2889         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2890         private, use LOAD_FUTEX_WAIT macro.
2891         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2892         lowlevellock.h.
2893         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2894         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2895         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2896         __lll_lock_wait and __lll_unlock_wake.
2897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2898         Include lowlevellock.h and pthread-errnos.h.
2899         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2900         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2901         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2902         pass LLL_SHARED in %esi to both __lll_lock_wait and
2903         __lll_unlock_wake.
2904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2905         Include lowlevellock.h and pthread-errnos.h.
2906         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2907         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2908         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2909         pass LLL_SHARED in %esi to both __lll_lock_wait and
2910         __lll_unlock_wake.
2911         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2912         Include lowlevellock.h.
2913         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2914         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2915         pass LLL_SHARED in %esi to both __lll_lock_wait and
2916         __lll_unlock_wake.
2917         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2918         Include lowlevellock.h.
2919         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2920         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2921         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2922         and __lll_unlock_wake.
2923         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2924         Include lowlevellock.h.
2925         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2926         Don't define.
2927         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2928         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2929         and __lll_unlock_wake.
2930         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2931         Include lowlevellock.h.
2932         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2933         Don't define.
2934         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2935         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2936         and __lll_unlock_wake.
2937         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2938         Include lowlevellock.h.
2939         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2940         Don't define.
2941         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2942         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2943         and __lll_unlock_wake.
2944         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2945         Include lowlevellock.h.
2946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2947         Don't define.
2948         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2949         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2950         and __lll_unlock_wake.
2951         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2952         Include lowlevellock.h.
2953         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2954         Don't define.
2955         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2956         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2957         and __lll_unlock_wake.
2958         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2959         lowlevellock.h.
2960         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2961         define.
2962         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2963         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2964         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2965         lowlevellock.h.
2966         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2967         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2968         lowlevellock.h.
2969         (LOCK): Don't define.
2970         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2971         lowlevellock.h.
2972         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2973         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2974         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2975         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2976         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2977         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2978         (__lll_lock_wait_private): New function.
2979         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2980         it to lll_futex_*wait.  Don't compile in for libc.so.
2981         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2982         Remove.
2983         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2984         (struct sparc_pthread_barrier): Remove.
2985         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2986         struct sparc_pthread_barrier.  Pass
2987         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2988         and lll_futex_wait macros.
2989         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2990         Remove.
2991         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2992         Include sparc pthread_barrier_wait.c instead of generic one.
2994 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2996         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2998         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2999         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3000         %ecx.
3001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3002         (pthread_rwlock_timedwrlock): Likewise.
3003         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3004         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3006 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3008         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3010 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3012         * tst-locale2.c (useless): Add return statement.
3014 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3016         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3017         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3018         * pthread_create.c (start_thread): Likewise.
3019         * init.c (sighandler_setxid): Likewise.
3020         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3021         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3022         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3023         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3024         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3025         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3026         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3027         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3028         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3029         Likewise.
3030         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3031         Likewise.
3032         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3033         Likewise.
3034         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3035         __rtld_notify): Likewise.
3036         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3037         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3038         __pthread_once): Likewise.
3039         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3040         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3041         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3042         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3043         (lll_futex_wait): Add private argument, define as wrapper around
3044         lll_futex_timed_wait.
3045         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3046         use __lll_private_flag macro.
3047         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3048         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3049         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3050         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3051         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3052         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3053         (lll_futex_wait): Add private argument, define as wrapper around
3054         lll_futex_timed_wait.
3055         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3056         use __lll_private_flag macro.
3057         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3058         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3059         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3060         Define.
3061         (lll_futex_timed_wait, lll_futex_wake): Use it.
3062         (lll_private_futex_wait, lll_private_futex_timed_wait,
3063         lll_private_futex_wake): Removed.
3064         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3065         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3066         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3067         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3068         (lll_futex_wait): Add private argument, define as wrapper around
3069         lll_futex_timed_wait.
3070         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3071         use __lll_private_flag macro.
3072         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3073         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3074         to lll_futex_*.
3075         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3076         (lll_private_futex_wait, lll_private_futex_timed_wait,
3077         lll_private_futex_wake): Removed.
3078         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3079         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3080         (lll_private_futex_wait, lll_private_futex_timed_wait,
3081         lll_private_futex_wake): Removed.
3082         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3083         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3084         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3085         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3086         (lll_futex_wait): Add private argument, define as wrapper around
3087         lll_futex_timed_wait.
3088         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3089         use __lll_private_flag macro.
3090         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3091         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3092         to lll_futex_*.
3093         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3094         Define.
3095         (lll_futex_timed_wait, lll_futex_wake): Use it.
3096         (lll_private_futex_wait, lll_private_futex_timed_wait,
3097         lll_private_futex_wake): Removed.
3099 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3101         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3102         of the structure for sparc32.
3104 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3106         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3108 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3110         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3111         code used when private futexes are assumed.
3112         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3113         Likewise.
3115 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3117         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3118         (__lll_private_flag): Define.
3119         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3120         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3121         __lll_private_flag.
3122         (lll_private_futex_wait, lll_private_futex_timedwait,
3123         lll_private_futex_wake): Define as wrapper around non-_private
3124         macros.
3125         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3126         (__lll_private_flag): Define.
3127         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3128         (lll_private_futex_wait, lll_private_futex_timedwait,
3129         lll_private_futex_wake): Define as wrapper around non-_private
3130         macros.
3132 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3134         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3135         parameter to lll_futex_wait call.
3136         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3138         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3139         Replace lll_futex_wait with lll_private_futex_wait.
3140         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3141         Add LLL_SHARED parameter to lll_futex_wake().
3143         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3144         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3145         lll_private_futex_wake.
3146         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3147         bit from private parm before syscall.
3148         (lll_futex_timed_wait): Likewise.
3149         (lll_futex_wake): Likewise.
3150         (lll_futex_wake_unlock): Likewise.
3151         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3152         (lll_robust_mutex_unlock): Likewise.
3153         (lll_mutex_unlock_force): Likewise.
3154         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3156 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3158         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3159         compilation when unconditionally using private futexes.
3160         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3161         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3162         Likewise.
3163         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3164         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3166 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3168         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3169         Define.
3171 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3173         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3174         kernel-features.h.
3176 2007-05-16  Roland McGrath  <roland@redhat.com>
3178         * init.c (__nptl_initial_report_events): New variable.
3179         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3180         to that.
3182 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3184         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3185         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3187 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3189         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3190         implementation.
3192 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3194         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3195         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3196         * pthread_mutex_timedlock.c: Likewise.
3197         * pthread_mutex_trylock.c: Likewise.
3198         * pthread_mutex_unlock.c: Likewise.
3200 2007-06-17  Andreas Schwab  <schwab@suse.de>
3202         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3203         sections.
3205 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3207         * allocatestack.c (allocate_stack): Make code compile if
3208         __ASSUME_PRIVATE_FUTEX is set.
3210 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3213         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3215         (__pthread_rwlock_wrlock): Likewise.
3216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3217         (pthread_rwlock_timedrdlock): Likewise.
3218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3219         (pthread_rwlock_timedwrlock): Likewise.
3220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3221         (__pthread_rwlock_unlock): Likewise.
3223 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3225         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3226         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3227         Split __flags into __flags, __shared, __pad1 and __pad2.
3228         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3229         futexes if they are available.
3230         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3231         in libc-lowlevellock.S allow using private futexes.
3232         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3233         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3234         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3235         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3236         lll_private_futex_timed_wait and lll_private_futex_wake.
3237         (lll_robust_mutex_unlock): Fix typo.
3238         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3239         field in futex command setup.
3240         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3241         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3242         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3243         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3244         if they are available.  Remove clear_once_control.
3245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3246         futexes if they are available.
3247         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3248         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3249         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3250         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3251         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3252         Wake only when there are waiters.
3253         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3254         support.  Indicate that there are waiters.  Remove unnecessary
3255         extra cancellation test.
3256         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3257         left-over duplication of __sem_wait_cleanup.
3259 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3261         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3262         parameter to lll_futex_wait, lll_futex_timed_wait, and
3263         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3264         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3265         lll_private_futex_wake.
3266         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3267         * allocatestack.c: Adjust use of lll_futex_* macros.
3268         * init.c: Likewise.
3269         * lowlevellock.h: Likewise.
3270         * pthread_barrier_wait.c: Likewise.
3271         * pthread_cond_broadcast.c: Likewise.
3272         * pthread_cond_destroy.c: Likewise.
3273         * pthread_cond_signal.c: Likewise.
3274         * pthread_cond_timedwait.c: Likewise.
3275         * pthread_cond_wait.c: Likewise.
3276         * pthread_create.c: Likewise.
3277         * pthread_mutex_lock.c: Likewise.
3278         * pthread_mutex_setprioceiling.c: Likewise.
3279         * pthread_mutex_timedlock.c: Likewise.
3280         * pthread_mutex_unlock.c: Likewise.
3281         * pthread_rwlock_timedrdlock.c: Likewise.
3282         * pthread_rwlock_timedwrlock.c: Likewise.
3283         * pthread_rwlock_unlock.c: Likewise.
3284         * sysdeps/alpha/tls.h: Likewise.
3285         * sysdeps/i386/tls.h: Likewise.
3286         * sysdeps/ia64/tls.h: Likewise.
3287         * sysdeps/powerpc/tls.h: Likewise.
3288         * sysdeps/pthread/aio_misc.h: Likewise.
3289         * sysdeps/pthread/gai_misc.h: Likewise.
3290         * sysdeps/s390/tls.h: Likewise.
3291         * sysdeps/sh/tls.h: Likewise.
3292         * sysdeps/sparc/tls.h: Likewise.
3293         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3294         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3295         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3296         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3297         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3298         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3299         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3300         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3301         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3302         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3303         Likewise.
3304         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3305         * sysdeps/x86_64/tls.h: Likewise.
3307 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3309         * pthread_getattr_np.c: No need to install a cancellation handler,
3310         this is no cancellation point.
3311         * pthread_getschedparam.c: Likewise.
3312         * pthread_setschedparam.c: Likewise.
3313         * pthread_setschedprio.c: Likewise.
3314         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3315         lll_unlock_wake_cb.
3316         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3317         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3318         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3319         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3320         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3321         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3322         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3323         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3324         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3325         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3326         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3327         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3329         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3330         whether there are more than one thread makes no sense here since
3331         we only call the slow path if the locks are taken.
3332         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3334         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3335         COND_NWAITERS_SHIFT.
3336         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3337         COND_CLOCK_BITS.
3338         * pthread_cond_init.c: Likewise.
3339         * pthread_cond_timedwait.c: Likewise.
3340         * pthread_cond_wait.c: Likewise.
3341         * pthread_condattr_getclock.c: Likewise.
3342         * pthread_condattr_setclock.c: Likewise.
3343         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3344         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3345         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3347         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3349 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3351         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3352         unistd.h.
3354         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3355         insn suffix.
3356         (THREAD_GSCOPE_GET_FLAG): Remove.
3357         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3358         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3359         changes.
3360         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3361         (THREAD_GSCOPE_GET_FLAG): Remove.
3362         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3363         instead of THREAD_GSCOPE_GET_FLAG.
3364         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3365         it.
3366         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3367         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3368         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3369         THREAD_GSCOPE_WAIT): Define.
3370         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3371         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3372         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3373         THREAD_GSCOPE_WAIT): Define.
3374         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3375         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3376         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3377         THREAD_GSCOPE_WAIT): Define.
3378         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3379         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3380         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3381         THREAD_GSCOPE_WAIT): Define.
3383 2007-05-24  Richard Henderson  <rth@redhat.com>
3385         * descr.h (struct pthread): Add header.gscope_flag.
3386         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3387         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3388         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3389         THREAD_GSCOPE_WAIT): Define.
3391 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3393         * init.c: Make it compile with older kernel headers.
3395         * tst-initializers1.c: Show through exit code which test failed.
3397         * pthread_rwlock_init.c: Also initialize __shared field.
3398         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3399         element in rwlock structure into four byte elements.  One of them is
3400         the new __shared element.
3401         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3402         Likewise.
3403         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3404         __shared, adjust names of other padding elements.
3405         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3406         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3407         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3408         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3409         FUTEX_PRIVATE_FLAG.
3410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3411         futex to use private operations if possible.
3412         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3413         Likewise.
3414         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3415         Likewise.
3416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3417         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3418         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3420         Likewise.
3421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3422         Likewise.
3423         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3424         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3426 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3428         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3429         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3430         * pthread_rwlock_timedrdlock.c: Likewise.
3431         * pthread_rwlock_tryrdlock.c: Likewise.
3433         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3434         optimization.
3436         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3437         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3438         duplication of __sem_wait_cleanup.
3440         * allocatestack.c: Revert last change.
3441         * init.c: Likewise.
3442         * sysdeps/i386/tls.h: Likewise.
3443         * sysdeps/x86_64/tls.h: Likewise.
3444         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3445         header structure.
3446         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3448         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3449         Add private field.
3450         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3451         * pthread_barrier_init.c: Set private flag if pshared and private
3452         futexes are supported.
3453         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3454         private field in futex command setup.
3455         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3457 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3459         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3460         support.
3461         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3462         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3463         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3464         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3465         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3467         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3468         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3469         fields in the structure.
3470         (__old_sem_init): New function.
3471         * sem_open.c: Initialize all fields of the structure.
3472         * sem_getvalue.c: Adjust for renamed element.
3473         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3474         (gen-as-const-headers): Add structsem.sym.
3475         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3476         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3477         struct new_sem.  Add struct old_sem.
3478         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3479         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3480         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3481         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3482         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3483         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3484         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3485         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3486         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3487         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3488         * tst-sem10.c: New file.
3489         * tst-sem11.c: New file.
3490         * tst-sem12.c: New file.
3491         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3492         of struct sem.
3494 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3495             Jakub Jelinek  <jakub@redhat.com>
3497         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3498         Move __pthread_enable_asynccancel right before futex syscall.
3499         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3500         Likewise.
3502 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3504         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3505         THREAD_COPY_PRIVATE_FUTEX): Define.
3506         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3507         THREAD_COPY_PRIVATE_FUTEX): Define.
3508         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3509         * init.c (__pthread_initialize_minimal_internal): Use
3510         THREAD_SET_PRIVATE_FUTEX.
3512         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3513         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3514         THREAD_GSCOPE_FLAG_WAIT): Define.
3515         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3516         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3517         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3518         PTR_DEMANGLE.
3519         (THREAD_GSCOPE_GET_FLAG): Define.
3520         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3521         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3522         instead of ->header.gscope_flag directly.
3524 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3526         * init.c (__pthread_initialize_minimal_internal): Check whether
3527         private futexes are available.
3528         * allocatestack.c (allocate_stack): Copy private_futex field from
3529         current thread into the new stack.
3530         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3531         futexes if they are available.
3532         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3533         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3534         in libc-lowlevellock.S allow using private futexes.
3535         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3536         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3537         FUTEX_PRIVATE_FLAG.
3538         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3539         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3540         if they are available.
3541         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3542         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3543         * sysdeps/i386/tcb-offsets.sym: Likewise.
3544         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3545         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3547 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3549         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3550         Remove ptr_wait_lookup_done again.
3551         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3552         (__pthread_initialize_minimal_internal): Initialize
3553         _dl_wait_lookup_done pointer in _rtld_global directly.
3554         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3555         Remove code to code _dl_wait_lookup_done.
3556         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3557         encrypted for now.
3559 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3561         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3562         pthread_mutex_init failed with ENOTSUP.
3564 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3566         * allocatestack.c (__wait_lookup_done): New function.
3567         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3568         Add ptr_wait_lookup_done.
3569         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3570         * pthreadP.h: Declare __wait_lookup_done.
3571         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3572         Define macros to implement reference handling of global scope.
3573         * sysdeps/x86_64/tls.h: Likewise.
3574         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3575         Initialize GL(dl_wait_lookup_done).
3577 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3579         [BZ #4512]
3580         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3581         is detected.
3582         * pthread_mutex_timedlock.c: Likewise.
3583         * pthread_mutex_trylock.c: Likewise.
3584         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3586         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3587         * tst-robust9.c: New file.
3588         * tst-robustpi9.c: New file.
3590         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3591         unnecessary extra cancellation test.
3593 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3595         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3596         extra cancellation test.
3597         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3599 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3601         * descr.h (struct pthread): Rearrange members to fill hole in
3602         64-bit layout.
3604         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3605         (__pthread_setaffinity_new): If syscall was successful and
3606         RESET_VGETCPU_CACHE is defined, use it before returning.
3607         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3609 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3611         [BZ #4455]
3612         * tst-align2.c: Include stackinfo.h.
3613         * tst-getpid1.c: Likewise.
3615 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3617         [BZ #4455]
3618         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3619         * tst-getpid1.c (do_test): Likewise.
3621         [BZ #4456]
3622         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3623         (allocate_stack): Likewise.
3625 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3627         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3628         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3629         (__lll_robust_timedlock_wait): Likewise.
3630         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3632 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3634         [BZ #4465]
3635         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3636         * tst-cancel4.c (tf_fdatasync): New test.
3638 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3640         [BZ #4392]
3641         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3642         check mutexes like normal mutexes.
3644         [BZ #4306]
3645         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3646         Initialize the whole sigevent structure to appease valgrind.
3648 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3650         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3651         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3653 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3655         * tst-locale1.c: Avoid warnings.
3656         * tst-locale2.c: Likewise.
3658 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3660         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3661         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3663 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3665         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3666         __extern_always_inline where appropriate.
3667         * sysdeps/pthread/pthread.h: Likewise.
3669 2007-03-13  Richard Henderson  <rth@redhat.com>
3671         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3672         separate cfi regions for the two subsections.
3674 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3676         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3677         new thread, don't just decrement it.
3678         Patch by Suzuki K P <suzuki@in.ibm.com>.
3680 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3682         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3683         PTHFCT_CALL definition.
3685 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3687         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3688         available, don't use it.
3690 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3692         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3693         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3694         call into the kernel to delay.
3696 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3698         * tst-initializers1.c: We want to test the initializers as seen
3699         outside of libc, so undefined _LIBC.
3701         * pthread_join.c (cleanup): Avoid warning.
3703 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3705         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3706         (__lll_timedwait_tid): Add unwind info.
3708         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3709         function table, mangle the pointers.
3710         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3711         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3712         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3713         demangle pointers before use.
3714         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3715         demangle pointer.
3716         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3717         * sysdeps/pthread/setxid.h: Likewise.
3719 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3721         * tst-rwlock7.c: Show some more information in case of correct
3722         behavior.
3724 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3727         (lll_futex_timed_wait): Undo part of last change, don't negate
3728         return value.
3730 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3733         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3735 2006-12-28  David S. Miller  <davem@davemloft.net>
3737         * shlib-versions: Fix sparc64 linux target specification.
3739 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3741         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3742         Adjust include path for pthread_barrier_wait.c move.
3744 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3746         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3747         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3749 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3751         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3752         6 argument cancellable syscalls.
3753         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3754         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3755         6 argument cancellable syscalls.
3756         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3758 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3760         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3761         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3763 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3765         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3766         __sync_lock_release instead of __sync_lock_release_si.
3768 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3770         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3771         Define.
3772         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3773         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3774         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3775         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3776         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3777         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3778         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3779         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3780         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3781         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3782         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3784 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3786         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3787         * pthread_barrier_wait.c: ...here.
3788         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3789         * pthread_cond_broadcast.c: ...here.
3790         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3791         * pthread_cond_signal.c: ...here.
3792         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3793         * pthread_cond_timedwait.c: ...here.
3794         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3795         * pthread_cond_wait.c: ...here.
3796         * sysdeps/pthread/pthread_once.c: Move to...
3797         * pthread_once.c: ...here.
3798         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3799         * pthread_rwlock_rdlock.c: ...here.
3800         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3801         * pthread_rwlock_timedrdlock.c: ...here.
3802         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3803         * pthread_rwlock_timedwrlock.c: ...here.
3804         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3805         * pthread_rwlock_unlock.c: ...here.
3806         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3807         * pthread_rwlock_wrlock.c: ...here.
3808         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3809         * pthread_spin_destroy.c: ...here.
3810         * sysdeps/pthread/pthread_spin_init.c: Move to...
3811         * pthread_spin_init.c: ...here.
3812         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3813         * pthread_spin_unlock.c: ...here.
3814         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3815         * pthread_getcpuclockid.c: ...here.
3817         * init.c: USE_TLS support is now always enabled.
3818         * tst-tls5.h: Likewise.
3819         * sysdeps/alpha/tls.h: Likewise.
3820         * sysdeps/i386/tls.h: Likewise.
3821         * sysdeps/ia64/tls.h: Likewise.
3822         * sysdeps/powerpc/tls.h: Likewise.
3823         * sysdeps/s390/tls.h: Likewise.
3824         * sysdeps/sh/tls.h: Likewise.
3825         * sysdeps/sparc/tls.h: Likewise.
3826         * sysdeps/x86_64/tls.h: Likewise.
3828 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3830         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3831         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3832         failed.
3834         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3835         Define to THREAD_SELF->header.multiple_threads.
3836         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3837         Likewise.
3838         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3839         Likewise.
3840         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3841         (SINGLE_THREAD_P): Likewise.
3842         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3843         (SINGLE_THREAD_P): Likewise.
3844         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3845         (SINGLE_THREAD_P): Likewise.
3846         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3847         (SINGLE_THREAD_P): Likewise.
3848         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3849         Likewise.
3850         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3851         (SINGLE_THREAD_P): Likewise.
3852         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3853         (SINGLE_THREAD_P): Likewise.
3854         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3855         Likewise.
3857 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3859         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3860         by default rather than 2_3_3.
3862 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3864         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3865         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3866         atomic_* instead of catomic_* macros.
3868 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3870         [BZ #3285]
3871         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3872         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3873         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3874         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3875         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3876         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3877         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3878         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3879         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3880         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3881         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3882         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3883         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3885 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3887         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3888         cancelable syscalls with six parameters.
3890         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3891         operations instead of atomic_*.
3893 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3895         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3897 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3899         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3900         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3901         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3902         New file.
3903         * pthread_attr_setstack.c: Allow overwriting the version number of the
3904         new symbol.
3905         * pthread_attr_setstacksize.c: Likewise.
3906         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3907         it.
3908         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3909         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3911 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3913         [BZ #3251]
3914         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3915         Patch by Petr Baudis.
3917 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3919         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3921         * tst-cancel2.c (tf): Loop as long as something was written.
3923 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3925         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3926         mutexes wake all mutexes.
3927         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3928         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3929         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3931 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3933         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3934         to guarantee the thread is always canceled.
3936 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3938         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3939         Include stdlib.h.
3940         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3941         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3942         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3946 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3948         [BZ #3123]
3949         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3950         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3952         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3953         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3954         * Makefile (tests): Add tst-cond22.
3955         * tst-cond22.c: New file.
3957 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3959         [BZ #3124]
3960         * descr.h (struct pthread): Add parent_cancelhandling.
3961         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3962         cancelhandling value to child.
3963         * pthread_create.c (start_thread): If parent thread was canceled
3964         reset the SIGCANCEL mask.
3965         * Makefile (tests): Add tst-cancel25.
3966         * tst-cancel25.c: New file.
3968 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3969             Ulrich Drepper  <drepper@redhat.com>
3971         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3972         counterp if it is already zero.
3973         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3975 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3976             Roland McGrath  <roland@redhat.com>
3978         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3979         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3980         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3981         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3982         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3983         lll_robust_mutex_timedlock, lll_mutex_unlock,
3984         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3985         Add _L_*_ symbols around the subsection.
3986         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3987         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3989 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3990             Roland McGrath  <roland@redhat.com>
3992         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3993         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3994         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3995         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3996         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3997         lll_robust_mutex_timedlock, lll_mutex_unlock,
3998         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3999         Add _L_*_ symbols around the subsection.
4000         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4001         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4003 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4005         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4006         change because it can disturb too much existing code.  If real hard
4007         reader preference is needed we'll introduce another type.
4008         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4009         (pthread_rwlock_timedwrlock): Likewise.
4010         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4011         Likewise.
4013 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4015         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4016         reader preference.
4017         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4018         (pthread_rwlock_timedwrlock): Likewise.
4019         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4020         Likewise.
4022 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4024         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4025         Only define ifdef SHARED.
4027 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4029         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4030         (free_stacks): ...here.
4031         (__free_stack_cache): New function.
4032         * pthreadP.h: Declare __free_stack_cache.
4033         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4034         ptr_freeres.
4035         * init.c (pthread_functions): Initialize ptr_freeres.
4036         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4037         New freeres function.
4039 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4041         [BZ #3018]
4042         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4044 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4046         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4047         _XOPEN_REALTIME_THREADS.
4049 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4051         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4052         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4053         HAVE_CLOCK_GETTIME_VSYSCALL.
4054         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4056 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4058         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4059         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4060         * descr.h (struct priority_protection_data): New type.
4061         (struct pthread): Add tpp field.
4062         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4063         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4064         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4065         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4066         TPP mutexes.
4067         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4068         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4069         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4070         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4071         * tpp.c: New file.
4072         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4073         boosted by TPP.
4074         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4075         * pthread_mutexattr_getprioceiling.c
4076         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4077         in the SCHED_FIFO priority range.
4078         * pthread_mutexattr_setprioceiling.c
4079         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4080         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4081         if mutex is not TPP.  Ceiling is now in __data.__lock.
4082         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4083         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4084         is now in __data.__lock.  Add locking.
4085         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4086         * Makefile (libpthread-routines): Add tpp.
4087         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4088         * tst-tpp.h: New file.
4089         * tst-mutexpp1.c: New file.
4090         * tst-mutexpp6.c: New file.
4091         * tst-mutexpp10.c: New file.
4092         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4093         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4095 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4097         [BZ #2843]
4098         * pthread_join.c (pthread_join): Account for self being canceled
4099         when checking for deadlocks.
4100         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4101         (tf1): Don't print anything after pthread_join returns, this would be
4102         another cancellation point.
4103         (tf2): Likewise.
4104         * tst-join6.c: New file.
4105         * Makefile (tests): Add tst-join6.
4107 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4109         [BZ #2892]
4110         * pthread_setspecific.c (__pthread_setspecific): Check
4111         out-of-range index before checking for unused key.
4113         * sysdeps/pthread/gai_misc.h: New file.
4115 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4117         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4118         file.  Don't use sysctl.
4119         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4120         overwrite the file if this is likely not true.
4122 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4124         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4125         * Makefile (tests): Add tst-getpid3.
4126         * tst-getpid3.c: New file.
4128 2006-07-30  Roland McGrath  <roland@redhat.com>
4130         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4132         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4133         (pause_not_cancel): New macro.
4134         (nanosleep_not_cancel): New macro.
4135         (sigsuspend_not_cancel): New macro.
4136         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4137         nanosleep_not_cancel macro from <not-cancel.h>.
4138         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4139         macro from <not-cancel.h>.
4141 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4142             Jakub Jelinek  <jakub@redhat.com>
4144         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4145         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4146         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4147         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4148         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4149         * pthread_mutex_lock.c: Likewise.
4150         * pthread_mutex_timedlock.c: Likewise.
4151         * pthread_mutex_trylock.c: Likewise.
4152         * pthread_mutex_unlock.c: Likewise.
4153         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4154         all mutexes.
4155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4157         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4158         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4159         pthread-pi-defines.sym.
4160         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4161         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4162         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4163         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4164         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4165         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4166         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4167         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4168         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4169         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4170         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4171         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4172         * tst-mutex2.c: Likewise.
4173         * tst-mutex3.c: Likewise.
4174         * tst-mutex4.c: Likewise.
4175         * tst-mutex5.c: Likewise.
4176         * tst-mutex6.c: Likewise.
4177         * tst-mutex7.c: Likewise.
4178         * tst-mutex7a.c: Likewise.
4179         * tst-mutex8.c: Likewise.
4180         * tst-mutex9.c: Likewise.
4181         * tst-robust1.c: Likewise.
4182         * tst-robust7.c: Likewise.
4183         * tst-robust8.c: Likewise.
4184         * tst-mutexpi1.c: New file.
4185         * tst-mutexpi2.c: New file.
4186         * tst-mutexpi3.c: New file.
4187         * tst-mutexpi4.c: New file.
4188         * tst-mutexpi5.c: New file.
4189         * tst-mutexpi6.c: New file.
4190         * tst-mutexpi7.c: New file.
4191         * tst-mutexpi7a.c: New file.
4192         * tst-mutexpi8.c: New file.
4193         * tst-mutexpi9.c: New file.
4194         * tst-robust1.c: New file.
4195         * tst-robust2.c: New file.
4196         * tst-robust3.c: New file.
4197         * tst-robust4.c: New file.
4198         * tst-robust5.c: New file.
4199         * tst-robust6.c: New file.
4200         * tst-robust7.c: New file.
4201         * tst-robust8.c: New file.
4202         * Makefile (tests): Add the new tests.
4204         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4205         * pthread_mutex_destroy.c: Remove unneeded label.
4207 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4209         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4210         computations to compile time.
4212 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4214         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4216 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4218         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4220 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4222         * pthread_key_create.c (__pthread_key_create): Do away with
4223         __pthread_keys_lock.
4225         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4226         (__kernel_cpumask_size): Mark as hidden.
4227         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4229         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4230         * semaphoreP.h (__sem_mappings_lock): Likewise.
4232 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4234         * pthread_atfork.c: Mark __dso_handle as hidden.
4236 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4238         [BZ #2644]
4239         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4240         the reload problem.  Change the one path in pthread_cancel_init
4241         which causes the problem.  Force gcc to reload.  Simplify callers.
4242         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4243         (_Unwind_GetBSP): Undo last patch.
4245 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4247         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4248         function pointer is reloaded after pthread_cancel_init calls.
4250         [BZ #2644]
4251         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4252         pointers are reloaded after pthread_cancel_init calls.
4254 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4256         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4257         __always_inline.
4259 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4261         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4262         Allocate new object which is passed to timer_sigev_thread so that
4263         the timer can be deleted before the new thread is scheduled.
4265 2006-04-26  Roland McGrath  <roland@redhat.com>
4267         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4269 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4271         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4272         suffix for conditional jumps.
4273         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4274         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4275         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4276         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4277         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4278         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4280         * init.c (sigcancel_handler): Compare with correct PID even if the
4281         thread is in the middle of a fork call.
4282         (sighandler_setxid): Likewise.
4283         Reported by Suzuki K P <suzuki@in.ibm.com> .
4285 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4287         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4289 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4291         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4292         fails [Coverity CID 105].
4294 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4296         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4298 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4300         [BZ #2505]
4301         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4302         Define __lll_rel_instr using lwsync.
4304 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4306         * allocatestack.c (allocate_stack): Always initialize robust_head.
4307         * descr.h: Define struct robust_list_head.
4308         (struct pthread): Use robust_list_head in robust mutex list definition.
4309         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4310         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4311         (__pthread_initialize_minimal_internal): Register robust_list with
4312         the kernel.
4313         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4314         Declare __set_robust_list_avail.
4315         * pthread_create.c (start_thread): Register robust_list of new thread.
4316         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4317         waiters.
4318         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4319         number of users, it's unreliable.
4320         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4321         set_robust_list syscall is available.
4322         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4323         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4324         Set robust_head.list_op_pending before trying to lock a robust mutex.
4325         * pthread_mutex_timedlock.c: Likewise.
4326         * pthread_mutex_trylock.c: Likewise.
4327         * pthread_mutex_unlock.c: Likewise for unlocking.
4328         * Makefile (tests): Add tst-robust8.
4329         * tst-robust8.c: New file.
4331 2006-03-08  Andreas Schwab  <schwab@suse.de>
4333         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4334         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4336 2006-03-05  Roland McGrath  <roland@redhat.com>
4338         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4339         and $config_os doesn't match *linux*.
4341 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4343         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4344         Use __syscall_error.
4345         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4346         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4347         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4348         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4349         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4350         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4352 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4354         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4356 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4358         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4359         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4360         mutex.
4361         (__lll_robust_timedlock_wait): Likewise.
4362         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4363         (__lll_robust_lock_wait): Likewise.
4364         (__lll_robust_timedlock_wait): Likewise.
4365         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4366         (__lll_robust_lock_wait): Likewise.
4367         (__lll_robust_timedlock_wait): Likewise.
4369 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4371         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4372         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4373         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4374         lll_robust_mutex_unlock): Define.
4375         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4377 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4379         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4380         instead of <clone.S>.
4382 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4384         * Makefile (libpthread-routines): Add
4385         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4386         and pthread_mutex_[sg]etprioceiling.
4387         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4388         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4389         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4390         pthread_mutex_setprioceiling.
4391         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4392         PTHREAD_PRIO_PROTECT): New enum values.
4393         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4394         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4395         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4396         prototypes.
4397         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4398         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4399         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4400         Define.
4401         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4402         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4403         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4404         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4405         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4406         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4407         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4408         protocol mutexes.
4409         * pthread_mutex_getprioceiling.c: New file.
4410         * pthread_mutex_setprioceiling.c: New file.
4411         * pthread_mutexattr_getprioceiling.c: New file.
4412         * pthread_mutexattr_setprioceiling.c: New file.
4413         * pthread_mutexattr_getprotocol.c: New file.
4414         * pthread_mutexattr_setprotocol.c: New file.
4416 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4418         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4420 2006-02-27  Roland McGrath  <roland@redhat.com>
4422         * sysdeps/pthread/Subdirs: List nptl here too.
4423         * configure (libc_add_on_canonical): New variable.
4425         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4427         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4428         self to get main source tree's file.
4429         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4430         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4431         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4432         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4433         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4434         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4435         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4436         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4437         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4438         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4439         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4440         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4441         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4443         * Makefile: Use $(sysdirs) in vpath directive.
4445         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4446         (CPPFLAGS-timer_routines.c): Likewise.
4448         * Makeconfig (includes): Variable removed.
4450 2006-02-26  Roland McGrath  <roland@redhat.com>
4452         * sysdeps/generic/pt-raise.c: Moved to ...
4453         * pt-raise.c: ... here.
4454         * sysdeps/generic/lowlevellock.h: Moved to ...
4455         * lowlevellock.h: ... here.
4457 2006-02-23  Roland McGrath  <roland@redhat.com>
4459         * descr.h (struct pthread): Add final member `end_padding'.
4460         (PTHREAD_STRUCT_END_PADDING): Use it.
4462 2006-02-20  Roland McGrath  <roland@redhat.com>
4464         * sysdeps/mips: Directory removed, saved in ports repository.
4465         * sysdeps/unix/sysv/linux/mips: Likewise.
4467 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4469         * tst-robust1.c: Add second mutex to check that the mutex list is
4470         handled correctly.
4472 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4474         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4475         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4476         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4477         lll_robust_mutex_unlock): New macros.
4478         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4479         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4480         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4481         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4482         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4484 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4486         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4487         definitions.
4488         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4490 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4492         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4493         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4494         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4495         (lll_robust_mutex_unlock): Likewise.
4497 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4499         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4500         Set robust_list.__next rather than robust_list.
4501         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4502         (__pthread_list_t): New typedef.
4503         (pthread_mutex_t): Replace __next and __prev fields with __list.
4504         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4505         (__pthread_list_t): New typedef.
4506         (pthread_mutex_t): Replace __next and __prev fields with __list.
4507         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4508         (__pthread_list_t, __pthread_slist_t): New typedefs.
4509         (pthread_mutex_t): Replace __next and __prev fields with __list.
4510         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4511         (__pthread_list_t, __pthread_slist_t): New typedefs.
4512         (pthread_mutex_t): Replace __next and __prev fields with __list.
4513         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4514         (__pthread_list_t, __pthread_slist_t): New typedefs.
4515         (pthread_mutex_t): Replace __next and __prev fields with __list.
4516         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4517         (__pthread_slist_t): New typedef.
4518         (pthread_mutex_t): Replace __next field with __list.
4520 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4522         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4523         PTHREAD_MUTEX_OWNERDEAD.
4524         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4525         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4526         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4527         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4528         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4529         to PTHREAD_MUTEX_INCONSISTENT.
4530         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4531         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4532         * pthread_mutex_trylock.c: Likewise.
4533         * pthread_mutex_timedlock.c: Likewise.
4534         * pthread_mutex_unlock.c: Likewise.
4535         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4536         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4537         lowlevelrobustlock.sym.
4538         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4539         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4540         definitions.
4541         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4542         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4543         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4544         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4545         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4547 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4549         * allocatestack.c (allocate_stack): Initialize robust_list.
4550         * init.c (__pthread_initialize_minimal_internal): Likewise.
4551         * descr.h (struct xid_command): Pretty printing.
4552         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4553         robust_list.  Adjust macros.
4554         * pthread_create.c (start_thread): Adjust robust_list handling.
4555         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4556         but the owner for all robust mutex types.
4557         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4558         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4559         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4560         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4562         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4563         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4565 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4567         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4568         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4570 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4572         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4573         Return status.
4574         (lll_futex_timed_wait): Define.
4576 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4578         * tst-cancel4.c: Test ppoll.
4580 2006-01-18  Andreas Jaeger  <aj@suse.de>
4582         [BZ #2167]
4583         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4584         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4585         by Jim Gifford <patches@jg555.com>.
4587 2006-01-13  Richard Henderson  <rth@redhat.com>
4589         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4591 2006-01-10  Roland McGrath  <roland@redhat.com>
4593         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4594         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4595         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4596         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4597         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4598         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4599         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4600         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4601         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4602         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4604 2006-01-09  Roland McGrath  <roland@redhat.com>
4606         * tst-initializers1-c89.c: New file.
4607         * tst-initializers1-c99.c: New file.
4608         * tst-initializers1-gnu89.c: New file.
4609         * tst-initializers1-gnu99.c: New file.
4610         * Makefile (tests): Add them.
4611         (CFLAGS-tst-initializers1-c89.c): New variable.
4612         (CFLAGS-tst-initializers1-c99.c): New variable.
4613         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4614         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4616         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4617         Use __extension__ on anonymous union definition.
4618         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4619         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4620         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4621         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4622         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4624 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4626         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4627         Don't give the union a name because it changes the mangled name.
4628         Instead name the struct for __data.
4629         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4630         Likewise.
4631         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4632         Likewise.
4634 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4636         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4637         stack bias to mc_ftp field.
4639 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4641         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4642         being too clever and reloading the futex value where it shouldn't.
4644 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4646         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4647         correct type.
4649 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4651         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4652         Add cfi directives.
4654 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4656         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4657         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4658         rename in tcbhead_t.
4660         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4661         Don't give the union a name because it changes the mangled name.
4662         Instead name the struct for __data.
4663         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4664         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4665         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4666         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4667         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4668         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4670 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4672         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4673         Return status.
4674         (lll_futex_timed_wait): Define.
4675         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4676         * sysdeps/pthread/aio_misc.h: New file.
4678 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4680         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4682 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4684         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4685         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4686         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4688 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4690         * tst-cancel24.cc: Use C headers instead of C++ headers.
4692 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4694         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4695         sparc-linux configured glibc.
4696         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4697         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4698         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4699         atomic_compare_and_exchange_val_24_acq instead of
4700         atomic_compare_and_exchange_val_acq.
4701         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4702         instead of atomic_exchange_rel.
4703         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4704         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4705         file.
4706         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4707         file.
4708         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4709         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4710         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4711         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4712         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4713         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4714         New file.
4715         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4716         New file.
4717         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4718         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4719         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4720         file.
4721         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4722         file.
4723         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4725 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4727         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4728         mutex initializers.
4730 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4732         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4733         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4734         THREAD_COPY_POINTER_GUARD): Define.
4735         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4736         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4738 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4740         * version.c: Update copyright year.
4742 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4744         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4745         .eh_frame section, use cfi_* directives.
4746         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4748 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4750         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4751         now.
4753 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4755         * sysdeps/pthread/sigaction.c: Removed.
4756         * sigaction.c: New file.
4757         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4759 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4761         * Makefile (tests): Add tst-signal7.
4762         * tst-signal7.c: New file.
4764 2005-12-27  Roland McGrath  <roland@redhat.com>
4766         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4767         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4768         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4769         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4770         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4771         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4772         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4773         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4774         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4775         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4776         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4778 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4780         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4781         and __prev field to pthread_mutex_t.
4782         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4783         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4784         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4785         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4786         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4787         to pthread_mutex_t.
4789 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4791         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4792         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4793         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4794         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4795         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4796         and PTHREAD_MUTEXATTR_FLAG_BITS.
4797         * descr.h (struct pthread): Add robust_list field and define
4798         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4799         * pthread_mutexattr_getrobust.c: New file.
4800         * pthread_mutexattr_setrobust.c: New file.
4801         * pthread_mutex_consistent.c: New file.
4802         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4803         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4804         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4805         Adjust pthread_mutex_t initializers.
4806         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4807         field to pthread_mutex_t.
4808         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4809         and __prev field to pthread_mutex_t.
4810         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4811         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4812         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4813         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4814         * pthread_mutexattr_gettype.c: Likewise.
4815         * pthread_mutexattr_setpshared.c: Likewise.
4816         * pthread_mutexattr_settype.c: Likewise.
4817         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4818         Initialize mutex kind according to robust flag.
4819         * pthread_mutex_lock.c: Implement local robust mutex.
4820         * pthread_mutex_timedlock.c: Likewise.
4821         * pthread_mutex_trylock.c: Likewise.
4822         * pthread_mutex_unlock.c: Likewise.
4823         * pthread_create.c (start_thread): Mark robust mutexes which remained
4824         locked as dead.
4825         * tst-robust1.c: New file.
4826         * tst-robust2.c: New file.
4827         * tst-robust3.c: New file.
4828         * tst-robust4.c: New file.
4829         * tst-robust5.c: New file.
4830         * tst-robust6.c: New file.
4831         * tst-robust7.c: New file.
4832         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4833         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4834         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4835         tst-robust5, tst-robust6, and tst-robust7.
4837         * tst-typesizes.c: New file.
4838         * Makefile (tests): Add tst-typesizes.
4840         * tst-once3.c: More debug output.
4842 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4844         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4845         missing after last change.
4847         * version.c: Update copyright year.
4849 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4851         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4852         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4853         * pthread_mutex_trylock.c: Likewise.
4854         * pthread_mutex_timedlock.c: Likewise.
4855         * pthread_mutex_unlock.c: Likewise.
4857 2005-12-22  Roland McGrath  <roland@redhat.com>
4859         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4860         so that #include_next's search location is not reset to the -I..
4861         directory where <nptl/...> can be found.
4863 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4865         [BZ #1913]
4866         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4867         Fix unwind info.  Remove useless branch prediction prefix.
4868         * tst-cancel24.cc: New file.
4869         * Makefile: Add rules to build and run tst-cancel24.
4871 2005-12-21  Roland McGrath  <roland@redhat.com>
4873         * libc-cancellation.c: Use <> rather than "" #includes.
4874         * pt-cleanup.c: Likewise.
4875         * pthread_create.c: Likewise.
4876         * pthread_join.c: Likewise.
4877         * pthread_timedjoin.c: Likewise.
4878         * pthread_tryjoin.c: Likewise.
4879         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4880         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4881         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4882         * unwind.c: Likewise.
4884 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4886         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4887         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4888         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4889         THREAD_COPY_POINTER_GUARD): Define.
4891 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4893         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4894         rather than one.
4895         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4896         THREAD_COPY_POINTER_GUARD): Define.
4897         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4898         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4899         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4900         THREAD_COPY_POINTER_GUARD): Define.
4901         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4902         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4903         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4904         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4905         Use PTR_DEMANGLE for B0 if defined.
4907 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4909         * pthread_create.c (__pthread_create_2_1): Use
4910         THREAD_COPY_POINTER_GUARD if available.
4911         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4912         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4913         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4914         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4915         * sysdeps/x86_64/tls.h: Likewise.
4917 2005-12-15  Roland McGrath  <roland@redhat.com>
4919         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4921 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4923         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4924         sysdeps/generic.
4925         * errno-loc.c: New file.
4927 2005-12-12  Roland McGrath  <roland@redhat.com>
4929         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4930         adjustments before choosing stack size.  Update minimum stack size
4931         calculation to match allocate_stack change.
4933 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4935         * allocatestack.c (allocate_stack): Don't demand that there is an
4936         additional full page available on the stack beside guard, TLS, the
4937         minimum stack.
4939 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4941         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4942         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4944         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4945         compiling 32-bit code we must define __cleanup_fct_attribute.
4947 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4949         [BZ #1920]
4950         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4951         __attribute__ instead of __attribute.
4952         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4953         (__cleanup_fct_attribute): Likewise.
4955 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4957         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4958         a write barrier before writing libgcc_s_getcfa.
4960 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4962         * sysdeps/unix/sysv/linux/configure: Removed.
4964 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4966         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4967         optional init_array/fini_array support.
4969 2005-10-24  Roland McGrath  <roland@redhat.com>
4971         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4972         versioned_symbol use.
4974 2005-10-16  Roland McGrath  <roland@redhat.com>
4976         * init.c (__pthread_initialize_minimal_internal): Even when using a
4977         compile-time default stack size, apply the minimum that allocate_stack
4978         will require, and round up to page size.
4980 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4982         * Makefile ($(test-modules)): Remove static pattern rule.
4984 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4985             Ulrich Drepper  <drepper@redhat.com>
4987         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4988         alignment in callback function.
4989         * Makefile: Add rules to build and run tst-align3.
4990         * tst-align3.c: New file.
4992 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4994         * allocatestack.c (setxid_signal_thread): Add
4995         INTERNAL_SYSCALL_DECL (err).
4997 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4999         * allocatestack.c (setxid_signal_thread): Need to use
5000         atomic_compare_and_exchange_bool_acq.
5002 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5003             Jakub Jelinek  <jakub@redhat.com>
5005         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5006         CANCEL_RESTMASK.
5007         (struct pthread): Move specific_used field to avoid padding.
5008         Add setxid_futex field.
5009         * init.c (sighandler_setxid): Reset setxid flag and release the
5010         setxid futex.
5011         * allocatestack.c (setxid_signal_thread): New function.  Broken
5012         out of the bodies of the two loops in __nptl_setxid.  For undetached
5013         threads check whether they are exiting and if yes, don't send a signal.
5014         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5015         * pthread_create.c (start_thread): For undetached threads, check
5016         whether setxid bit is set.  If yes, wait until signal has been
5017         processed.
5019         * allocatestack.c (STACK_VARIABLES): Initialize them.
5020         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5022 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5024         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5025         waiters, awake all waiters on the associated mutex.
5027 2005-09-22  Roland McGrath  <roland@redhat.com>
5029         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5030         ../sysdeps/x86_64/hp-timing.h).
5032 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5034         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5035         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5036         (lll_futex_wake_unlock): Define.
5037         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5038         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5039         (lll_futex_wake_unlock): Define.
5040         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5041         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5042         (lll_futex_wake_unlock): Define.
5043         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5044         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5045         (lll_futex_wake_unlock): Define.
5046         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5047         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5048         (lll_futex_wake_unlock): Define.
5049         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5050         lll_futex_wake_unlock.
5051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5052         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5053         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5055         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5056         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5058 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5060         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5061         Fix typo in register name.
5063 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5065         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5066         Use __sigfillset.  Document that sigfillset does the right thing wrt
5067         to SIGSETXID.
5069 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5071         [BZ #1102]
5072         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5073         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5074         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5075         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5076         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5077         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5078         in the structure.
5079         * Makefile (tests): Add tst-initializers1.
5080         (CFLAGS-tst-initializers1.c): Set.
5081         * tst-initializers1.c: New test.
5083 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5085         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5086         Make sure __flags are located at offset 48 from the start of the
5087         structure.
5089 2005-07-02  Roland McGrath  <roland@redhat.com>
5091         * Makeconfig: Comment fix.
5093 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5095         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5096         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5097         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5098         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5099         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5100         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5101         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5102         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5103         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5104         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5106 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5108         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5109         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5110         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5111         fields.
5112         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5113         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5114         field.  Put in sysinfo field unconditionally.
5115         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5116         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5117         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5118         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5119         fields.
5120         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5121         * pthread_create.c (__pthread_create_2_1): Use
5122         THREAD_COPY_STACK_GUARD macro.
5123         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5124         tests.
5125         * tst-stackguard1.c: New file.
5126         * tst-stackguard1-static.c: New file.
5128 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5130         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5131         Invoke CGOTSETUP and CGOTRESTORE.
5132         (CGOTSETUP, CGOTRESTORE): Define.
5134 2005-05-29  Richard Henderson  <rth@redhat.com>
5136         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5137         (tf_write, tf_writev): Use it.
5138         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5139         the system minimum.
5141 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5143         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5144         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5145         __librt_*_asynccancel@local.
5147 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5149         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5150         all occurrences of JUMPTARGET.  Instead append @local to labels.
5152 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5154         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5155         size/alignment of struct pthread rather than tcbhead_t.
5156         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5157         Likewise.
5158         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5159         Likewise.
5160         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5161         Likewise.
5163 2005-05-19  Richard Henderson  <rth@redhat.com>
5165         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5166         __sync_val_compare_and_swap, not explicit _si variant.
5167         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5169 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5171         [BZ #915]
5172         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5174 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5176         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5177         .eh_frame section, use cfi_* directives.
5179 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5181         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5182         of "" includes.
5184 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5186         [BZ #1075]
5187         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5188         aio_write blocks.
5190 2005-04-27  Roland McGrath  <roland@redhat.com>
5192         * Makefile (tests): Remove tst-clock2.
5194         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5195         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5196         translating to the kernel clockid_t for our own process/thread clock.
5198         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5200 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5202         * old_pthread_cond_init.c: Include <errno.h>.
5203         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5204         process shared or uses clock other than CLOCK_REALTIME.
5205         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5207 2005-04-13  David S. Miller  <davem@davemloft.net>
5209         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5210         * sysdeps/sparc/sparc64/clone.S: New file.
5212 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5214         [BZ #1102]
5215         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5216         __inline instead of inline.
5217         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5219 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5221         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5222         functionally equivalent, but shorter instructions.
5223         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5224         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5225         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5226         Likewise.
5227         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5228         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5229         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5230         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5232         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5233         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5234         Likewise.
5235         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5236         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5237         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5238         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5239         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5241 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5243         * sysdeps/mips/Makefile: New file.
5244         * sysdeps/mips/nptl-sysdep.S: New file.
5245         * sysdeps/mips/tcb-offsets.sym: New file.
5246         * sysdeps/mips/pthread_spin_lock.S: New file.
5247         * sysdeps/mips/pthread_spin_trylock.S: New file.
5248         * sysdeps/mips/pthreaddef.h: New file.
5249         * sysdeps/mips/tls.h: New file.
5250         * sysdeps/mips/jmpbuf-unwind.h: New file.
5251         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5252         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5253         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5254         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5255         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5256         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5257         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5258         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5259         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5260         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5262 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5264         [BZ #1112]
5265         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5266         variable to scerr.
5268 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5270         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5272 2005-02-25  Roland McGrath  <roland@redhat.com>
5274         * alloca_cutoff.c: Correct license text.
5275         * tst-unload.c: Likewise.
5276         * sysdeps/pthread/allocalim.h: Likewise.
5277         * sysdeps/pthread/pt-initfini.c: Likewise.
5278         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5279         * sysdeps/pthread/bits/sigthread.h: Likewise.
5280         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5281         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5283 2005-02-16  Roland McGrath  <roland@redhat.com>
5285         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5286         Use unsigned int * for ptr_nthreads.
5288 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5290         [BZ #721]
5291         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5292         gcc4.
5294 2005-02-07  Richard Henderson  <rth@redhat.com>
5296         [BZ #787]
5297         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5298         argument.
5300 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5302         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5303         order of arguments in invocation of atomic_add_zero.
5305 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5307         [BZ #737]
5308         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5309         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5310         at least gotntpoff relocation and addition.
5311         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5312         Likewise.
5313         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5314         Likewise.
5315         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5316         Likewise.
5318 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5320         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5321         entry for static tls deallocation fix.
5322         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5323         also contains information whether the memory pointed to is static
5324         TLS or not.
5325         * sysdeps/i386/tls.h: Likewise.
5326         * sysdeps/ia64/tls.h: Likewise.
5327         * sysdeps/powerpc/tls.h: Likewise.
5328         * sysdeps/s390/tls.h: Likewise.
5329         * sysdeps/sh/tls.h: Likewise.
5330         * sysdeps/sparc/tls.h: Likewise.
5331         * sysdeps/x86_64/tls.h: Likewise.
5333 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5335         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5337 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5339         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5340         %esp.
5341         * Makefile (tests): Add tst-align2.
5342         * tst-align2.c: New test.
5343         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5344         -mpreferred-stack-boundary=4.
5346 2004-12-18  Roland McGrath  <roland@redhat.com>
5348         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5349         New file removed withdrawn for the moment.
5351 2004-12-17  Richard Henderson  <rth@redhat.com>
5353         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5354         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5356 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5358         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5359         Increased PTHREAD_STACK_MIN.
5361         * tst-context1.c (stacks): Use bigger stack size.
5363 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5365         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5366         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5368 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5370         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5371         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5372         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5374 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5376         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5378 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5380         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5381         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5383         * tst-getpid1.c: If child crashes, report this first.  Print which
5384         signal.
5386 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5388         * init.c (__pthread_initialize_minimal_internal): Also unblock
5389         SIGSETXID.
5391 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5393         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5394         _POSIX_THREAD_CPUTIME): Define to 0.
5395         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5396         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5397         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5398         __timer_signal_thread_tclk): Remove.
5399         (init_module): Remove their initialization.
5400         (thread_cleanup): Remove their cleanup assertions.
5401         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5402         __timer_signal_thread_tclk): Remove.
5403         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5404         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5405         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5407 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5409         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5410         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5412         * Makefile (tests): Add tst-getpid2.
5413         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5414         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5415         * tst-getpid2.c: New test.
5417 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5419         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5421 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5423         * Makefile (tests): Add tst-getpid1.
5424         * tst-getpid1.c: New file.
5425         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5426         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5428 2004-12-02  Roland McGrath  <roland@redhat.com>
5430         * Makefile (libpthread-nonshared): Variable removed.
5431         ($(objpfx)libpthread_nonshared.a): Target removed.
5432         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5433         These are now handled by generic magic from
5434         libpthread-static-only-routines being set.
5436 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5438         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5439         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5440         _POSIX_THREAD_PRIO_PROTECT): Define.
5441         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5442         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5443         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5445 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5447         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5448         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5449         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5450         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5451         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5452         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5453         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5455 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5457         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5459         * Makefile (libpthread-routines): Add pthread_setschedprio.
5460         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5461         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5462         * pthread_setschedprio.c: New file.
5464 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5466         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5467         * pthread_cancel.c (pthread_create): Likewise.
5469         * Makefile (libpthread-routines): Add vars.
5470         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5471         * init.c (__default_stacksize, __is_smp): Remove.
5472         * vars.c: New file.
5473         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5474         and define a wrapper macro.
5475         (PTHREAD_STATIC_FN_REQUIRE): Define.
5476         * allocatestack.c (__find_thread_by_id): Undefine.
5477         * pthread_create (__pthread_keys): Remove.
5478         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5479         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5480         PTHREAD_STATIC_FN_REQUIRE.
5482 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5484         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5485         parameter to REGISTER macro.
5487 2004-11-17  Roland McGrath  <roland@redhat.com>
5489         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5490         Make sure SIGCANCEL is blocked as well.
5492 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5494         * sysdeps/pthread/setxid.h: New file.
5495         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5496         (struct xid_command): Add forward decl.
5497         (struct pthread_functions): Change return type of __nptl_setxid hook
5498         to int.
5499         * pthreadP.h (__nptl_setxid): Change return type to int.
5500         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5501         calling thread, return its return value and set errno on failure.
5502         * descr.h (struct xid_command): Change id type to long array.
5504         * Makefile: Add rules to build and test tst-setuid1 and
5505         tst-setuid1-static.
5506         * tst-setuid1.c: New test.
5507         * tst-setuid1-static.c: New test.
5509 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5511         * Makefile (tests): Add tst-exit3.
5512         * tst-exit3.c: New test.
5514 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5516         * Makefile (tests): Add tst-exit2.
5517         * tst-exit2.c: New file.
5519 2004-11-09  Roland McGrath  <roland@redhat.com>
5521         [BZ #530]
5522         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5523         here, before calling clone.
5524         * pthread_create.c (start_thread): Don't do it here.
5526 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5528         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5530 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5532         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5533         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5534         assembler warning.
5536 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5538         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5539         if sched_priority is not between minprio and maxprio.
5541 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5543         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5544         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5546         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5547         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5549 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5551         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5552         not-cancelable I/O functions.
5554 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5556         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5557         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5558         make sure 2 is stored in the futex and we looked at the old value.
5559         Fix a few other problems to return the correct value.
5561 2004-10-14  Richard Henderson  <rth@redhat.com>
5563         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5564         make gcc4 happy.
5566 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5568         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5569         of pthread-functions.h and pthreaddef.h.
5570         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5572         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5573         Change __data.__nwaiters from int to unsigned int.
5575         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5576         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5578         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5579         before return type.
5581         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5582         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5584 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5586         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5587         test fails, remove message queue.
5588         (tf_msgsnd): Likewise.
5590 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5592         * tst-clock1.c: Change #ifdef to #if defined.
5593         * tst-clock2.c: Likewise.
5594         * tst-cond11.c: Likewise.
5596         * sysdeps/pthread/timer_create.c (timer_create): Use
5597         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5598         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5599         THREAD_CPUTIME.
5601 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5603         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5604         _POSIX_THREAD_CPUTIME): Define to 0.
5606 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5608         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5609         and _POSIX_THREAD_CPUTIME to zero.
5610         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5611         * tst-barrier2.c: Fix testing for POSIX feature.
5612         * tst-clock1.c: Likewise.
5613         * tst-clock2.c: Likewise.
5614         * tst-cond11.c: Likewise.
5615         * tst-cond4.c: Likewise.
5616         * tst-cond6.c: Likewise.
5617         * tst-flock2.c: Likewise.
5618         * tst-mutex4.c: Likewise.
5619         * tst-mutex9.c: Likewise.
5620         * tst-rwlock12.c: Likewise.
5621         * tst-rwlock4.c: Likewise.
5622         * tst-signal1.c: Likewise.
5623         * tst-spin2.c: Likewise.
5624         * sysdeps/pthread/posix-timer.h: Likewise.
5625         * sysdeps/pthread/timer_create.c: Likewise.
5626         * sysdeps/pthread/timer_routines.c: Likewise.
5628 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5631         (__lll_mutex_timedlock_wait): Address futex correctly.
5633         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5634         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5635         make sure 2 is stored in the futex and we looked at the old value.
5636         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5637         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5638         which might very well made the code not working at all before.
5639         [BZ #417]
5641 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5643         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5644         allow SIGSETXID to be sent.
5645         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5646         for SIGSETXID to be defined.
5647         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5648         SIGSETXID cannot be blocked.
5650         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5651         Add __extension__ to long long types.
5652         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5653         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5654         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5655         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5656         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5657         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5658         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5660 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5662         * descr.h (struct pthread): Add stopped_start field.
5663         * sysdeps/pthread/createthread.c (create_thread): Set
5664         start_stopped flag in descriptor for new thread appropriately.
5665         * pthread_create.c (start_thread): Only take lock to be stopped on
5666         startup if stopped_start flag says so.
5668 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5670         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5671         is created detached and if yes, do not try to free the stack in case
5672         the thread creation failed.
5673         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5674         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5675         case there has been no error.  [BZ #405]
5677         * pthread_create.c (start_thread): Don't wait for scheduler data
5678         etc to be set at the beginning of the function.  The cancellation
5679         infrastructure must have been set up.  And enable async
5680         cancellation before potentially going to sleep.  [BZ #401]
5682 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5684         * Versions: Remove exports for pthread_set*id_np functions.
5685         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5686         for now.
5687         * Makefile: Don't build pthread_set*id code for now.
5689 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5691         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5692         internal use.
5693         * allocatestack.c (__nptl_setxid): New function.
5694         * descr.h (struct xid_command): Define type.
5695         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5696         (sighandler_setxid): New function.
5697         (__pthread_initialize_minimal): Register sighandler_setxid for
5698         SIGCANCEL.
5699         * pt-allocrtsig.c: Update comment.
5700         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5701         Declare __nptl_setxid.
5702         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5703         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5704         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5705         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5706         and pthread_setresuid_np.
5707         * pthread_setgid_np.c: New file.
5708         * pthread_setuid_np.c: New file.
5709         * pthread_setegid_np.c: New file.
5710         * pthread_seteuid_np.c: New file.
5711         * pthread_setregid_np.c: New file.
5712         * pthread_setreuid_np.c: New file.
5713         * pthread_setresgid_np.c: New file.
5714         * pthread_setresuid_np.c: New file.
5715         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5716         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5717         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5718         and pthread_setresuid_np.
5719         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5720         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5721         pthread_setregid, and pthread_setresgid.
5723 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5725         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5726         ENOMEM when out of memory.
5728 2004-09-10  Roland McGrath  <roland@redhat.com>
5730         [BZ #379]
5731         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5732         code, since we don't try to use the broken CLONE_STOPPED any more.
5733         * pthread_create.c (start_thread): Likewise.
5735 2004-09-15  Richard Henderson  <rth@redhat.com>
5737         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5739 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5741         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5742         (__libc_unwind_longjmp): Delete macro and declare as function.
5743         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5744         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5745         nptl directory.
5746         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5747         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5748         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5750 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5752         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5753         for __USE_XOPEN2K.
5754         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5755         types also for __USE_XOPEN2K.
5756         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5757         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5758         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5759         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5760         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5761         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5762         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5763         [BZ #320]
5765 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5767         * sysdeps/pthread/pthread.h
5768         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5769         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5770         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5771         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5772         [BZ #375]
5774 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5776         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5777         PSEUDO to be used with . prefix.
5779         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5780         Use atomic_increment instead of atomic_exchange_and_add.
5781         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5782         Likewise.
5783         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5784         Likewise.
5785         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5786         Likewise.
5788         * allocatestack.c (allocate_stack): Use atomic_increment_val
5789         instead of atomic_exchange_and_add.
5790         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5791         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5792         Likewise.
5793         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5794         Likewise.
5796         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5797         the initialization function might throw.
5799 2005-09-05  Richard Henderson  <rth@redhat.com>
5801         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5802         Move definition inside libpthread, libc, librt check.  Provide
5803         definition for rtld.
5805 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5807         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5808         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5809         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5810         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5811         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5812         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5813         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5814         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5815         * unwind.c: Use it.
5817         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5818         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5819         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5820         Likewise.
5821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5822         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5823         this is the last waiter, signal pthread_cond_destroy caller and
5824         avoid using the pthread_cond_t structure after unlock.
5825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5827         Read clock type from the least significant bits of __nwaiters instead
5828         of __clock.
5829         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5830         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5832 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5834         [BZ #342]
5835         * Makefile (tests): Add tst-cond20 and tst-cond21.
5836         * tst-cond20.c: New test.
5837         * tst-cond21.c: New test.
5838         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5839         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5840         it unsigned int.
5841         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5842         Likewise.
5843         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5844         (pthread_cond_t): Likewise.
5845         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5846         Likewise.
5847         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5848         Likewise.
5849         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5850         Likewise.
5851         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5852         (cond_nwaiters): New.
5853         (clock_bits): New.
5854         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5855         if there are waiters not signalled yet.
5856         Wait until all already signalled waiters wake up.
5857         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5858         __nwaiters.  If pthread_cond_destroy has been called and this is the
5859         last waiter, signal pthread_cond_destroy caller and avoid using
5860         the pthread_cond_t structure after unlock.
5861         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5862         decrement it when leaving.  If pthread_cond_destroy has been called
5863         and this is the last waiter, signal pthread_cond_destroy caller.
5864         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5865         Likewise.  Read clock type from the least significant bits of
5866         __nwaiters instead of __clock.
5867         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5868         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5869         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5870         clock type just from the last COND_CLOCK_BITS bits of value.
5871         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5872         instead of __clock, just from second bit of condattr's value.
5874 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5876         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5877         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5878         != 64.
5879         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5881 2004-08-15  Roland McGrath  <roland@frob.com>
5883         * pthread_atfork.c: Update copyright terms including special exception
5884         for these trivial files, which are statically linked into executables
5885         that use dynamic linking for the significant library code.
5887 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5889         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5890         pthread_rwlock_rdlock.
5891         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5892         Decrease __nr_readers_queued after reacquiring lock.
5893         * sysdeps/pthread/pthread_rwlock_timedrdlock
5894         (pthread_rwlock_timedrdlock): Likewise.
5895         Reported by Bob Cook <bobcook47@hotmail.com>.
5897 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5899         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5900         before pthread_barrier_wait.
5902 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5905         Remove unnecessary exception handling data.
5907 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5909         [BZ #284]
5910         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5911         instead of clockid_t.
5913 2004-07-21  Roland McGrath  <roland@redhat.com>
5915         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5917 2004-07-19  Roland McGrath  <roland@redhat.com>
5919         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5921 2004-07-02  Roland McGrath  <roland@redhat.com>
5923         * configure: Don't exit.
5925 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5927         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5928         (__pthread_cond_timedwait): Check for invalid nanosecond in
5929         timeout value.
5931 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5933         * Makefile: Add rules to build and run tst-fini1.
5934         * tst-fini1.c: New file.
5935         * tst-fini1mod.c: New file.
5937 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5939         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5940         if no cancellation support is needed.
5941         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5942         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5943         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5944         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5945         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5946         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5947         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5948         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5949         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5951         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5952         only if not already defined.
5954 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5956         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5957         constraint "m" instead of "0" for futex.
5959         * shlib-versions: Add powerpc64-.*-linux.*.
5961 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5963         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5964         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5965         for valid tv_nsec.
5966         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5967         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5968         bits.
5970 2004-06-29  Roland McGrath  <roland@redhat.com>
5972         * Banner: NPTL no longer has its own version number.
5973         * Makefile (nptl-version): Variable removed.
5974         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5975         using $(version), the glibc version number.
5977 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5979         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5980         Fix branch offset for a PLT entry.
5981         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5982         Likewise.
5983         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5984         Likewise.
5985         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5986         Likewise.
5987         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5988         Likewise.
5990 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5992         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5993         unconditionally.
5995 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5997         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5998         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5999         instead of tv_sec.
6000         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6001         (pthread_rwlock_timedrdlock): Likewise.
6003 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6005         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6006         Set __r7 to val, not mutex.
6008 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6010         * Makefile: Add rules to build tst-rwlock14.
6011         * tst-rwlock14.c: New file.
6013 2004-06-24  Boris Hu  <boris.hu@intel.com>
6015         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6016         check.
6017         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6019 2004-06-19  Andreas Jaeger  <aj@suse.de>
6021         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6022         assembler in last patch.
6024 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6026         * sysdeps/pthread/pthread_cond_timedwait.c
6027         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6029         (__pthread_cond_timedwait): Check for invalid nanosecond in
6030         timeout value.
6031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6032         * tst-cond19.c: New file.
6033         * Makefile: Add rules to build and run tst-cond19.
6035 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6037         * tst-context1.c (GUARD_PATTERN): Defined.
6038         (tst_context_t): Define struct containing ucontext_t & guard words.
6039         (ctx): Declare as an array of tst_context_t.
6040         (fct): Verify uc_link & guard words are still valid.
6041         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6043 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6045         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6046         Add __data.__futex field, reshuffle __data.__clock.
6047         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6048         (__pthread_cond_signal): Increment __futex at the same time as
6049         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6050         address of low 32-bits of __wakeup_seq to futex syscall.
6051         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6052         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6053         releasing internal lock to FUTEX_WAIT.
6054         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6055         (__pthread_cond_timedwait): Likewise.
6056         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6057         (FUTEX_CMP_REQUEUE): Define.
6058         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6059         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6060         Pass __futex value from before the unlock and __futex address instead
6061         of address of low 32-bits of __wakeup_seq to futex syscall.
6062         Fallback to FUTEX_WAKE all on any errors.
6064 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6066         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6067         comment typo.
6068         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6069         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6070         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6071         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6072         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6074 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6076         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6077         Add memory clobber to inline assembly.
6078         (__lll_mutex_trylock): Likewise.
6079         (__lll_mutex_cond_trylock): Likewise.
6081 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6083         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6084         Pass val argument as 6th system call argument in %r7.
6086 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6088         * Makefile (tests): Add tst-cond16.
6089         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6090         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6091         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6092         Add __data.__futex field, reshuffle __data.__clock.
6093         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6094         (__pthread_cond_signal): Increment __futex at the same time as
6095         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6096         address of low 32-bits of __wakeup_seq to futex syscall.
6097         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6098         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6099         releasing internal lock to FUTEX_WAIT.
6100         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6101         (__pthread_cond_timedwait): Likewise.
6102         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6103         (FUTEX_CMP_REQUEUE): Define.
6104         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6105         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6106         Pass __futex value from before the unlock and __futex address instead
6107         of address of low 32-bits of __wakeup_seq to futex syscall.
6108         Fallback to FUTEX_WAKE all on any errors.
6109         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6110         Define.
6111         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6112         internally.  Return non-zero if error, zero if success.
6113         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6114         Add __data.__futex field, reshuffle __data.__clock.
6115         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6116         Define.
6117         (lll_futex_requeue): Add val argument, return 1 unconditionally
6118         for the time being.
6119         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6120         Add __data.__futex field, reshuffle __data.__clock.
6121         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6122         Define.
6123         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6124         internally.  Return non-zero if error, zero if success.
6125         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6126         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6127         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6128         Define.
6129         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6130         internally.  Return non-zero if error, zero if success.
6131         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6132         Add __data.__futex field, reshuffle __data.__clock.
6133         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6134         Define.
6135         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6136         internally.  Return non-zero if error, zero if success.
6137         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6138         Add __data.__futex field, reshuffle __data.__clock.
6139         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6140         Add __data.__futex field, reshuffle __data.__clock.
6141         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6142         Increment __futex at the same time as __wakeup_seq or __total_seq.
6143         Pass address of __futex instead of address of low 32-bits of
6144         __wakeup_seq to futex syscall.
6145         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6146         Pass __futex value from before releasing internal lock
6147         to FUTEX_WAIT.
6148         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6149         Likewise.  Avoid unnecessary shadowing of variables.
6150         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6151         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6152         unlock and __futex address instead of address of low 32-bits of
6153         __wakeup_seq to futex_requeue macro, adjust for new return value
6154         meaning.
6155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6156         (__pthread_cond_signal): Increment __futex at the same time as
6157         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6158         address of low 32-bits of __wakeup_seq to futex syscall.
6159         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6160         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6161         releasing internal lock to FUTEX_WAIT.
6162         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6163         (__pthread_cond_timedwait): Likewise.
6164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6165         (FUTEX_CMP_REQUEUE): Define.
6166         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6167         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6168         Pass __futex value from before the unlock and __futex address instead
6169         of address of low 32-bits of __wakeup_seq to futex syscall.
6170         Fallback to FUTEX_WAKE all on any errors.
6172 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6174         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6175         Add nop to align the end of critical section.
6176         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6178 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6180         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6181         Add __broadcast_seq field.
6182         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6183         all waiters as woken with woken_seq and bump broadcast counter.
6184         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6185         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6186         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6187         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6189 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6192         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6193         Reported by Kaz Kojima.
6195 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6197         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6199 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6201         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6202         __broadcast_seq with bc_seq after acquiring internal lock instead of
6203         before it.
6205 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6207         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6208         compilation.
6209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6210         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6211         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6212         (pthread_cond_t): Add __data.__broadcast_seq field.
6213         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6214         (FRAME_SIZE): Define.
6215         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6216         Comment typo fixes.
6217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6218         Define.
6219         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6220         typo fixes.
6221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6222         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6223         fixes.
6225 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6227         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6228         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6229         Add __broadcast_seq field.
6230         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6231         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6232         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6233         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6234         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6236         all waiters as woken with woken_seq and bump broadcast counter.
6237         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6239         __broadcast_seq field.
6240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6241         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6242         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6243         * pthread_cond_init.c: Initialize __broadcast_seq field.
6244         * Makefile (tests): Add tst-cond17 and tst-cond18.
6245         Add .NOTPARALLEL goal.
6246         * tst-cond16.c: New file.  From Jakub.
6247         * tst-cond17.c: New file.  From Jakub.
6248         * tst-cond18.c: New file.  From Jakub.
6250 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6252         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6253         unwind info.
6255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6256         Parametrize frame size.  Correct some unwind info.
6257         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6259 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6261         * tst-stack3.c: Note testing functionality beyond POSIX.
6263 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6265         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6266         Change conditional from ifdef to if.
6268 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6270         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6271         SYSDEP_CANCEL_ERROR): Define.
6272         (PSEUDO): Use it.
6274 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6276         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6278 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6280         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6282 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6284         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6285         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6286         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6287         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6289 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6291         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6292         thread has all signals blocked.
6294 2004-04-18  Andreas Jaeger  <aj@suse.de>
6296         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6297         (SEM_VALUE_MAX): Add missing brace.
6299 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6301         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6302         in rt subdir.
6303         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6304         * sysdeps/pthread/tst-mqueue8x.c: New test.
6305         * tst-cancel4.c: Update comment about message queues.
6307         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6308         return it_value { 0, 0 }.
6309         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6310         like SIGEV_SIGNAL.
6311         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6312         assertion for SIGEV_NONE.
6313         (thread_attr_compare): Compare all attributes, not just a partial
6314         subset.
6316 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6318         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6320 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6322         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6323         Just use a plain number.
6324         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6325         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6326         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6327         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6328         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6329         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6330         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6332 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6334         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6335         frame info.
6336         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6338 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6340         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6341         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6342         of calling sigwaitinfo.
6344 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6346         * allocatestack.c (allocate_stack): Set reported_guardsize
6347         unconditionally.
6348         * pthread_getattr_np.c (pthread_getattr_np): Use
6349         reported_guardsize instead of guardsize.
6350         * descr.h (struct pthread): Add reported_guardsize field.
6352 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6354         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6356 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6358         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6360 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6362         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6363         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6364         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6365         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6366         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6367         Define.
6368         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6369         (_POSIX_MESSAGE_PASSING): Define.
6370         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6371         (_POSIX_MESSAGE_PASSING): Define.
6372         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6373         (_POSIX_MESSAGE_PASSING): Define.
6375 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6377         * tst-context1.c (fct): Check whether correct stack is used.
6379 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6381         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6382         matching constraints for asm mem parameters.
6384         * tst-clock2.c (tf): Don't define unless needed.
6386 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6388         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6389         $(gnulib).
6391 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6393         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6394         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6395         * pthreadP.h: Declare __nptl_deallocate_tsd.
6396         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6397         Adjust caller.
6399         * Makefile (tests): Add tst-tsd5.
6400         * tst-tsd5.c: New file.
6402 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6404         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6405         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6406         is SHLIB_COMPAT check.
6407         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6408         (__pthread_attr_getaffinity_old): Likewise.
6409         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6410         (__pthread_getaffinity_old): Likewise.
6411         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6412         (__pthread_setaffinity_old): Likewise.
6414 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6416         * allocatestack.c (_make_stacks_executable): Call
6417         _dl_make_stack_executable first.
6419 2004-03-24  Roland McGrath  <roland@redhat.com>
6421         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6422         constraint instead of "0".
6424 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6426         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6427         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6429         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6430         code to avoid warning.
6432 2004-03-24  Andreas Jaeger  <aj@suse.de>
6434         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6435         (__pthread_attr_setaffinity_old): Remove const.
6437 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6439         * sysdeps/unix/sysv/linux/smp.h: New file.
6440         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6441         * init.c: Define __is_smp.
6442         (__pthread_initialize_minimal_internal): Call is_smp_system to
6443         initialize __is_smp.
6444         * pthreadP.h: Declare __is_smp.
6445         Define MAX_ADAPTIVE_COUNT is necessary.
6446         * pthread_mutex_init.c: Add comment regarding __spins field.
6447         * pthread_mutex_lock.c: Implement adaptive mutex type.
6448         * pthread_mutex_timedlock.c: Likewise.
6449         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6450         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6451         Add __spins field.
6452         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6453         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6454         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6455         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6456         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6457         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6459         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6460         lll_mutex_cond_trylock.
6461         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6462         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6463         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6464         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6465         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6466         Define BUSY_WAIT_NOP.
6467         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6468         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6470         * tst-mutex5.c: Add support for testing adaptive mutexes.
6471         * tst-mutex7.c: Likewise.
6472         * tst-mutex5a.c: New file.
6473         * tst-mutex7a.c: New file.
6474         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6476         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6477         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6478         vgettimeofday call might destroy the content.
6480         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6481         @pause in the loop.
6483         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6484         No need to restrict type of ret.  Make it int.  Add comment.
6486         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6487         Remove unnecessary setne instruction.
6489 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6491         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6492         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6493         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6494         If realloc fails, break out of the loop.
6496 2004-03-20  Andreas Jaeger  <aj@suse.de>
6498         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6499         (__pthread_setaffinity_old): Fix interface.
6500         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6501         (__pthread_getaffinity_old): Likewise.
6503         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6504         (__pthread_setaffinity_new): Remove duplicate declaration.
6506 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6508         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6509         the return value to a safe register.
6510         (CDISABLE): Set the function argument correctly.
6512 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6514         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6515         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6516         Rewrite so that only one locked memory operation per round is needed.
6517         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6518         (pthread_barrier_wait): After wakeup, release lock only when the
6519         last thread stopped using the barrier object.
6520         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6521         (__pthread_cond_wait): Don't store mutex address if the current
6522         value is ~0l.  Add correct cleanup support and unwind info.
6523         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6524         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6525         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6526         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6527         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6528         Add correct cleanup support and unwind info.
6529         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6530         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6531         information for syscall wrappers.
6533 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6535         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6536         cpusetsize field, remove next.
6537         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6538         parameter for size of the CPU set.
6539         (pthread_setaffinity_np): Likewise.
6540         (pthread_attr_getaffinity_np): Likewise.
6541         (pthread_attr_setaffinity_np): Likewise.
6542         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6543         interface change, keep compatibility code.
6544         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6545         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6546         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6547         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6548         __pthread_getaffinity_np.
6549         * Versions: Add version for changed interfaces.
6550         * tst-attr3.c: Adjust test for interface change.
6551         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6552         increasing buffer sizes.
6553         * pthread_attr_destroy.c: Remove unused list handling.
6554         * pthread_attr_init.c: Likewise.
6556 2004-03-17  Roland McGrath  <roland@redhat.com>
6558         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6559         first argument to clock_getres so we ever enable kernel timers.
6561 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6563         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6565 2004-03-12  Richard Henderson  <rth@redhat.com>
6567         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6568         oldvalue from CENABLE to CDISABLE.
6570 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6572         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6573         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6574         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6575         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6577 2004-03-11  Richard Henderson  <rth@redhat.com>
6579         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6580         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6581         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6583 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6585         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6586         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6587         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6589 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6591         * forward.c (__pthread_cond_broadcast_2_0,
6592         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6593         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6594         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6596 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6598         * sysdeps/sh/tcb-offsets.sym: Add PID.
6599         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6600         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6602 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6604         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6605         include <sysdep-cancel.h>, vfork is no cancellation point.
6606         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6607         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6608         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6610 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6612         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6613         libc_hidden_def.
6614         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6615         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6616         Likewise.
6617         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6618         Likewise.
6619         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6620         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6621         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6622         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6623         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6625         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6626         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6627         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6628         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6629         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6630         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6632         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6633         a local register for saving old PID.  Negate PID in parent upon exit.
6635         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6636         tcb-offsets.h.
6637         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6638         before syscall, set to the old value in the parent afterwards.
6639         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6640         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6641         tcb-offsets.h.
6642         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6643         before syscall, set to the old value in the parent afterwards.
6644         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6645         * sysdeps/s390/tcb-offsets.sym: Add PID.
6647         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6648         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6649         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6650         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6651         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6652         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6654 2004-03-10  Andreas Schwab  <schwab@suse.de>
6656         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6657         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6658         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6660 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6662         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6663         * tst-cancel21.c (do_one_test): Likewise.
6664         Reported by Gordon Jin <gordon.jin@intel.com>.
6666 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6668         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6669         if non-zero and set to INT_MIN if zero.
6670         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6671         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6672         (SAVE_PID, RESTORE_PID): Define.
6673         (__vfork): Use it.
6674         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6675         Use relative path to avoid including NPTL i386/vfork.S.
6676         (SAVE_PID, RESTORE_PID): Define.
6677         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6678         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6679         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6680         tst-vfork2x.
6681         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6682         * tst-vfork1.c: New test.
6683         * tst-vfork2.c: New test.
6684         * tst-vfork1x.c: New test.
6685         * tst-vfork2x.c: New test.
6687 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6689         * sysdeps/i386/tcb-offsets.sym: Add PID.
6690         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6691         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6692         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6694 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6696         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6698 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6700         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6701         _rtld_global_ro.
6703 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6705         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6706         _rtld_global_ro.
6708         * tst-once4.c: Remove unnecessary macro definition.
6710         * tst-mutex7.c (do_test): Limit thread stack size.
6711         * tst-once2.c (do_test): Likewise.
6712         * tst-tls3.c (do_test): Likewise.
6713         * tst-tls1.c (do_test): Likewise.
6714         * tst-signal3.c (do_test): Likewise.
6715         * tst-kill6.c (do_test): Likewise.
6716         * tst-key4.c (do_test): Likewise.
6717         * tst-join4.c (do_test): Likewise.
6718         * tst-fork1.c (do_test): Likewise.
6719         * tst-context1.c (do_test): Likewise.
6720         * tst-cond2.c (do_test): Likewise.
6721         * tst-cond10.c (do_test): Likewise.
6722         * tst-clock2.c (do_test): Likewise.
6723         * tst-cancel10.c (do_test): Likewise.
6724         * tst-basic2.c (do_test): Likewise.
6725         * tst-barrier4.c (do_test): Likewise.
6727 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6729         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6731 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6733         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6734         (__pthread_cond_timedwait): Optimize wakeup test.
6735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6736         (__pthread_cond_wait): Likewise.
6737         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6738         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6739         Likewise.
6741 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6743         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6744         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6745         the atomic instruction needed.
6746         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6747         (__lll_mutex_lock_wait): Likewise.
6749 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6751         * Makefile (tests): Add tst-cond14 and tst-cond15.
6752         * tst-cond14.c: New file.
6753         * tst-cond15.c: New file.
6755 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6757         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6758         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6759         needs to be implemented differently to be useful.
6761 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6763         * pthread_attr_setschedparam.c: Don't test priority against limits
6764         here.  Set ATTR_FLAG_SCHED_SET flag.
6765         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6766         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6767         from parent thread to child.  If attribute is used and scheduling
6768         parameters are not inherited, copy parameters from attribute or
6769         compute them.  Check priority value.
6770         * pthread_getschedparam.c: If the parameters aren't known yet get
6771         them from the kernel.
6772         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6773         ATTR_FLAG_POLICY_SET flag for thread.
6774         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6775         and ATTR_FLAG_POLICY_SET.
6777         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6779         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6780         fail if stack address hasn't been set.  Just return 0.
6782 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6784         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6785         libpthread for the files in this list.
6786         (CFLAGS-tst-unload): Removed.
6787         * tst-unload.c (do_test): Don't use complete path for
6788         LIBPHREAD_SO.
6790         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6791         tst-_res1mod2.
6793 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6795         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6796         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6797         operation per round is needed.
6798         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6799         (__lll_mutex_lock_wait): Likewise.
6801 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6803         * tst-cancel9.c (cleanup): Don't print to stderr.
6805 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6807         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6809 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6811         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6812         (__syscall_error_handler2): Call CDISABLE.
6813         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6814         (__syscall_error_handler2): Call CDISABLE.
6816         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6817         Release lock before the loop, don't reacquire it.
6819         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6821 2004-02-19  Andreas Schwab  <schwab@suse.de>
6823         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6824         Fix last change.
6826 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6828         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6829         (pthread_barrier_wait): After wakeup, release lock only when the
6830         last thread stopped using the barrier object.
6831         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6832         (pthread_barrier_wait): Likewise.
6833         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6834         Likewise.
6835         * Makefile (tests): Add tst-barrier4.
6836         * tst-barrier4.c: New file.
6838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6839         (__pthread_cond_timedwait): Perform timeout test while holding
6840         internal lock to prevent wakeup race.
6841         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6842         * sysdeps/pthread/pthread_cond_timedwait.c
6843         (__pthread_cond_timedwait): Likewise.
6844         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6845         (__pthread_cond_timedwait): Likewise.
6847 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6850         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6851         * Makefile (tests): Add tst-rwlock13.
6852         * tst-rwlock13.c: New test.
6854 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6857         (__condvar_tw_cleanup): Little optimization.
6858         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6860 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6862         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6863         libpthread as "lib" parameter to SHLIB_COMPAT.
6864         (__novmx_siglongjmp): Fix typo in function name.
6865         (__novmx_longjmp): Fix typo in function name.
6867 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6869         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6870         __builtin_expect.
6872         * sysdeps/generic/pt-longjmp.c: Moved to...
6873         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6875 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6877         * Makefile (libpthread-routines): Add pt-cleanup.
6878         * pt-longjmp.c: Removed.
6879         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6880         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6881         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6882         Version longjmp, siglongjmp for GLIBC_2.3.4.
6883         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6885 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6887         * sysdeps/pthread/pthread_cond_timedwait.c
6888         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6889         Reuse code.  Add __builtin_expects.
6891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6892         (__pthread_cond_timedwait): Get internal lock in case timeout has
6893         passed before the futex syscall.
6894         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6896 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6898         * allocatestack.c: Pretty printing.
6900         * sysdeps/pthread/createthread.c (create_thread): Don't add
6901         CLONE_DETACHED bit if it is not necessary.
6903 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6905         * pthread_getattr_np.c: Include ldsodefs.h.
6907 2004-01-16  Richard Henderson  <rth@redhat.com>
6909         * allocatestack.c: Don't declare __libc_stack_end.
6910         * init.c (__pthread_initialize_minimal_internal): Likewise.
6911         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6913 2004-01-15  Richard Henderson  <rth@redhat.com>
6915         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6916         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6917         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6918         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6919         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6920         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6921         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6922         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6924 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6926         * init.c (pthread_functions): Make array const.
6928 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6930         * allocatestack.c (__make_stacks_executable): Change interface.
6931         Check parameters.  Pass parameter on to libc counterpart.
6932         * pthreadP.h: Change declaration.
6934 2004-01-13  Richard Henderson  <rth@redhat.com>
6936         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6937         prototype form.
6938         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6939         Likewise.
6941         * sysdeps/alpha/Makefile: New file.
6942         * sysdeps/alpha/tcb-offsets.sym: New file.
6943         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6944         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6946         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6947         on powerpc version.
6949 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6951         * Makefile (tests): Add tst-backtrace1.
6952         * tst-backtrace1.c: New test.
6954 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6956         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6957         register as second parameter to the REGISTER macro.
6958         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6959         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6960         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6961         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6962         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6963         of thread register as second parameter to REGISTER macro in 64 case.
6965 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6967         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6968         (CFLAGS-getpid.o): Defined.
6969         (CFLAGS-getpid.os): Defined.
6971 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6973         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6974         returned for main thread does not overlap with any other VMA.
6975         Patch by Jakub Jelinek.
6977 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6979         * tst-raise1.c: Include stdio.h.
6981 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6983         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6984         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6985         If pid is 0, set it to selftid.
6986         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6987         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6988         != 0, return self->tid without doing a syscall.
6989         * descr.h (struct pthread): Move pid field after tid.
6991         * Makefile (tests): Add tst-raise1.
6992         * tst-raise1.c: New file.
6994 2003-12-23  Roland McGrath  <roland@redhat.com>
6996         * tst-oddstacklimit.c: New file.
6997         * Makefile (tests): Add it.
6998         (tst-oddstacklimit-ENV): New variable.
7000         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7001         value up to page size for __default_stacksize.
7003 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7005         * Makefile (tests): Add tst-eintr5.
7006         * tst-eintr5.c: New file.
7008         * eintr.c (eintr_source): Prevent sending signal to self.
7010         * tst-eintr2.c (tf1): Improve error message.
7012 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7014         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7015         * sysdeps/unix/sysv/linux/getpid.c: New file.
7016         * pthread_cancel.c: Add comment explaining use of PID field.
7017         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7018         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7019         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7020         temporarily to signal the field must not be relied on and updated
7021         by getpid().
7022         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7023         temporarily negative.
7024         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7026 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7028         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7029         (eintr_source): If ARG != NULL, use pthread_kill.
7030         * tst-eintr1.c: Adjust for this change.
7031         * tst-eintr2.c: Likewise.
7032         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7033         * tst-eintr3.c: New file.
7034         * tst-eintr4.c: New file.
7036 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7038         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7039         if CANCELSTATE_BITMASK is set.
7040         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7041         Likewise.
7043         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7044         (tests-reverse): Add tst-cancel23.
7045         * tst-cancel22.c: New test.
7046         * tst-cancel23.c: New test.
7048 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7050         * tst-eintr1.c: Better error messages.
7052         * Makefile (tests): Add tst-eintr2.
7053         * tst-eintr2.c: New file.
7055 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7057         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7058         (CFLAGS-tst-cancelx21.c): Set.
7059         * tst-cancel21.c: New test.
7060         * tst-cancelx21.c: New test.
7062         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7063         comparison operand.
7064         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7065         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7066         * pt-longjmp.c: Include jmpbuf-unwind.h.
7067         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7068         _JMPBUF_UNWINDS.  Adjust compared pointers.
7069         * init.c (__pthread_initialize_minimal_internal): Initialize
7070         pd->stackblock_size.
7071         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7072         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7073         * sysdeps/i386/jmpbuf-unwind.h: New file.
7074         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7075         * sysdeps/s390/jmpbuf-unwind.h: New file.
7076         * sysdeps/sh/jmpbuf-unwind.h: New file.
7077         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7078         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7079         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7080         (_JMPBUF_CFA_UNWINDS): Remove.
7081         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7083 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7085         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7086         (CFLAGS-tst-cancelx20.c): Set.
7087         * tst-cancel20.c: New test.
7088         * tst-cancelx20.c: New test.
7090 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7092         * init.c (__pthread_initialize_minimal_internal): Don't treat
7093         architectures with separate register stack special here when
7094         computing default stack size.
7096 2003-12-17  Roland McGrath  <roland@redhat.com>
7098         * Makefile (tst-cancelx7-ARGS): New variable.
7099         Reportd by Greg Schafer <gschafer@zip.com.au>.
7101 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7103         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7104         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7105         (tst-stack3-ENV): Set.
7106         ($(objpfx)tst-stack3-mem): New.
7107         * tst-stack3.c: New test.
7109 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7111         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7112         Add unwind directives.  Drop unused .regstk directive.
7113         (_fini_EPILOG_BEGINS): Add unwind directives.
7115 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7117         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7118         Assume parameter is a pointer.
7119         (lll_futex_wake): Likewise.
7120         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7121         Likewise.
7122         (lll_futex_wake): Likewise.
7123         Reported by Boris Hu.
7124         * sysdeps/unix/sysv/linux/unregister-atfork.c
7125         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7127         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7129 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7131         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7132         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7133         __rtld_lock_initialize for ld.so lock.
7134         Patch in part by Adam Li <adam.li@intel.com>.
7136 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7138         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7139         in $(gnulib).  Also, remove stale comment.
7141 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7143         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7144         advantage of new syscall stub and optimize accordingly.
7146         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7147         from SYS_futex, to match expectations of
7148         sysdep.h:DO_INLINE_SYSCALL.
7149         (lll_futex_clobbers): Remove.
7150         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7151         (lll_futex_wake): Likewise.
7152         (lll_futex_requeue): Likewise.
7153         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7154         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7155         Jelinek).
7156         (__lll_mutex_lock): Likewise.
7157         (__lll_mutex_cond_lock): Likewise.
7158         (__lll_mutex_timed_lock): Likewise.
7159         (__lll_mutex_unlock): Likewise.
7160         (__lll_mutex_unlock_force): Likewise.
7162         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7163         comes before the include of <sysdep.h>.
7164         (THREAD_SELF_SYSINFO): New macro.
7165         (THREAD_SYSINFO): Likewise.
7166         (INIT_SYSINFO): New macro.
7167         (TLS_INIT_TP): Call INIT_SYSINFO.
7169         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7171         * sysdeps/pthread/createthread.c (create_thread): Use
7172         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7173         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7174         THREAD_SELF_SYSINFO instead of open code.
7175         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7176         (THREAD_SYSINFO): Likewise.
7178         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7180         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7182 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7184         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7185         instead of .init.  Patch by David Mosberger.
7187 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7189         * sysdeps/pthread/configure.in: Remove broken declaration in C
7190         cleanup handling check.
7192 2003-11-30  Andreas Jaeger  <aj@suse.de>
7194         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7195         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7196         Likewise.
7198 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7200         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7201         * pthread_attr_destroy.c: Include shlib-compat.h.
7202         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7203         is set in iattr->flags.
7204         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7206 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7208         * Makefile (distribute): Add tst-cleanup4aux.c.
7210         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7211         include.
7213 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7215         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7216         pthread_cond_signal.
7218         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7219         store mutex address if the current value is ~0l.
7220         * sysdeps/pthread/pthread_cond_timedwait.c
7221         (__pthread_cond_timedwait): Likewise.
7222         * sysdeps/pthread/pthread_cond_broadcast.c
7223         (__pthread_cond_broadcast): Don't use requeue for pshared
7224         condvars.
7226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7227         (__pthread_cond_wait): Don't store mutex address if the current
7228         value is ~0l.
7229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7230         (__pthread_cond_timedwait): Likewise.
7231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7232         (__pthread_cond_broadcast): Don't use requeue for pshared
7233         condvars.
7235         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7236         element with ~0l for pshared condvars, with NULL otherwise.
7238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7239         (__pthread_cond_wait): Don't store mutex address if the current
7240         value is ~0l.
7241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7242         (__pthread_cond_timedwait): Likewise.
7243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7244         (__pthread_cond_broadcast): Don't use requeue for pshared
7245         condvars.
7247         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7248         * tst-cond12.c: New file.
7249         * tst-cond13.c: New file.
7251 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7253         * sysdeps/pthread/configure.in: Make missing forced unwind support
7254         fatal.
7256 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7258         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7260 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7262         * Makefile: Add magic to clean up correctly.
7264 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7266         * unwind.c (FRAME_LEFT): Define.
7267         (unwind_stop): Handle old style cleanups here.
7268         (__pthread_unwind): Handle old style cleanups only if
7269         !HAVE_FORCED_UNWIND.
7270         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7271         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7272         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7273         ($(objpfx)tst-cleanupx4): Likewise.
7274         * tst-cleanup4.c: New test.
7275         * tst-cleanup4aux.c: New.
7276         * tst-cleanupx4.c: New test.
7278 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7280         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7281         lll_mutex_*lock macros to skip atomic operations on some archs.
7283 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7285         * sysdeps/pthread/tst-timer.c (main): Initialize
7286         sigev2.sigev_value as well.
7288 2003-10-15  Roland McGrath  <roland@redhat.com>
7290         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7291         is missing.
7292         * sysdeps/pthread/configure: Regenerated.
7294 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7296         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7297         locking macros.  No distinction between normal and mutex locking
7298         anymore.
7299         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7300         Merge bits from lowlevelmutex.S we still need.
7301         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7302         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7303         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7304         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7305         new mutex implementation.
7306         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7307         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7308         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7309         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7310         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7311         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7312         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7313         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7314         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7315         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7316         symbol for entry point to avoid cancellation.
7318 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7320         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7321         changes.
7322         (SAVE_OLDTYPE_0): Fix a typo.
7324 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7326         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7327         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7329 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7331         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7332         correct offset.
7334 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7336         * Makefile (tests): Add tst-cancel19.
7337         * tst-cancel19.c: New test.
7339 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7341         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7342         restoring of the old cancellation type.
7344 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7346         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7348 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7350         * sysdeps/pthread/malloc-machine.h: New file
7352 2003-09-24  Roland McGrath  <roland@redhat.com>
7354         * allocatestack.c (__make_stacks_executable): Don't ignore return
7355         value from _dl_make_stack_executable.
7357 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7359         * allocatestack.c (__make_stacks_executable): Also change
7360         permission of the currently unused stacks.
7362         * allocatestack.c (change_stack_perm): Split out from
7363         __make_stacks_executable.
7364         (allocate_stack): If the required permission changed between the time
7365         we started preparing the stack and queueing it, change the permission.
7366         (__make_stacks_executable): Call change_stack_perm.
7368         * Makefile: Build tst-execstack-mod locally.
7369         * tst-execstack-mod.c: New file.
7371 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7373         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7375 2003-09-23  Roland McGrath  <roland@redhat.com>
7377         * tst-execstack.c: New file.
7378         * Makefile (tests): Add it.
7379         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7380         (LDFLAGS-tst-execstack): New variable.
7382         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7383         whether to use PROT_EXEC for stack mmap.
7384         (__make_stacks_executable): New function.
7385         * pthreadP.h: Declare it.
7386         * init.c (__pthread_initialize_minimal_internal): Set
7387         GL(dl_make_stack_executable_hook) to that.
7389 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7391         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7392         recommendation from AMD re avoidance of lock prefix.
7394 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7396         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7397         lll_futex_timed_wait instead of lll_futex_wait.
7398         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7399         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7400         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7401         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7402         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7403         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7404         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7405         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7406         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7407         Completely revamp the locking macros.  No distinction between
7408         normal and mutex locking anymore.
7409         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7410         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7411         __lll_lock_timedwait): Fix prototypes.
7412         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7413         __lll_lock_timedwait): Likewise.
7414         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7415         macros, add __builtin_expect.
7416         (lll_mutex_timedlock): Likewise.  Fix return value.
7417         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7418         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7419         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7420         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7421         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7422         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7423         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7424         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7426 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7428         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7429         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7430         operation if possible.
7432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7433         like jumping over the lock prefix.
7435 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7437         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7438         locking macros.  No distinction between normal and mutex locking
7439         anymore.
7440         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7441         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7442         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7443         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7444         locking.  Merge bits from lowlevelmutex.S we still need.
7445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7446         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7447         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7448         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7449         * Makefile (routines): Remove libc-lowlevelmutex.
7450         (libpthread-rountines): Remove lowlevelmutex.
7451         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7452         for new mutex implementation.
7453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7458         Likewise.
7459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7460         Likewise.
7461         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7463         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7465         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7466         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7467         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7468         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7469         Likewise.
7470         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7471         Likewise.
7472         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7473         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7475         Don't use requeue.
7476         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7477         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7479 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7481         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7482         in parameters of asm with output parameters.
7484         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7485         type of DECR parameter to int.
7486         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7488 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7490         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7491         guardsize for each thread.
7493 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7495         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7496         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7497         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7499         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7500         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7501         NULL.
7502         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7503         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7504         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7505         (pthread_getaffinity_np): Add hidden_def.
7507         * Makefile (tests): Add tst-attr3.
7508         * tst-attr3.c: New test.
7510         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7512 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7514         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7515         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7517 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7519         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7520         * tst-align.c: Include tst-stack-align.h.
7521         (tf, do_test): Use TEST_STACK_ALIGN macro.
7523 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7525         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7526         variable.
7528 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7530         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7531         stack-related values for the initial thread.
7533 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7535         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7537 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7539         * pthread_mutex_lock.c: Minor code rearrangements.
7541 2003-09-05  Roland McGrath  <roland@redhat.com>
7543         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7544         Instead, include ../nptl_db/db_info.c to do its magic.
7545         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7546         (__pthread_pthread_key_2ndlevel_size): Likewise.
7547         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7548         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7549         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7550         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7551         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7552         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7553         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7554         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7555         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7556         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7557         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7558         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7559         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7560         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7561         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7562         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7563         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7565 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7567         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7568         of pthread_t to be compatible with LT.
7569         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7570         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7571         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7572         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7573         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7574         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7575         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7577 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7579         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7581 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7583         * unwind-forcedunwind.c: Move to...
7584         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7585         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7586         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7587         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7588         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7589         * unwind.c: Include jmpbuf-unwind.h.
7590         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7592 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7594         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7595         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7596         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7597         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7598         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7599         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7600         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7601         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7602         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7603         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7604         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7605         function.
7606         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7607         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7608         * Makefile (tests): Add tst-stack2.
7609         * tst-stack2.c: New test.
7610         * tst-stack1.c: Include limits.h and sys/param.h.
7611         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7613         * pthread_condattr_setpshared.c: Include errno.h.
7614         (pthread_condattr_setpshared): Return EINVAL if pshared
7615         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7617         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7618         defined symbol for entry point to avoid cancellation.
7619         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7620         Likewise.
7621         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7622         Likewise.
7623         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7624         Likewise.
7625         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7626         Likewise.
7627         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7628         Likewise.
7629         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7630         __close_nocancel, __read_nocancel, __write_nocancel,
7631         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7632         libpthread.so or librt.so, define to corresponding function
7633         without _nocancel suffix.
7634         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7635         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7636         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7638         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7640 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7642         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7643         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7645         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7646         in subsections has a symbol associated with it.
7648         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7649         defined symbol for entry point to avoid cancellation.
7650         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7652 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7654         * Makefile (tests): Add tst-tls5.
7655         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7656         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7657         ($(objpfx)tst-tls5): New.
7658         ($(objpfx)tst-tls6.out): Likewise.
7659         (tests): Depend on $(objpfx)tst-tls6.out.
7660         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7661         (do_test): Check pthread_self () return value alignment.
7662         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7663         (tf): Check pthread_self () return value alignment.
7664         * tst-tls5.c: New test.
7665         * tst-tls5.h: New.
7666         * tst-tls5mod.c: New.
7667         * tst-tls5moda.c: New.
7668         * tst-tls5modb.c: New.
7669         * tst-tls5modc.c: New.
7670         * tst-tls5modd.c: New.
7671         * tst-tls5mode.c: New.
7672         * tst-tls5modf.c: New.
7673         * tst-tls6.sh: New test.
7675         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7676         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7677         * init.c (pthread_functions): Initialize them.
7678         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7679         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7680         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7681         pthread_cond_timedwait@@GLIBC_2.3.2.
7683 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7685         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7686         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7687         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7688         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7689         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7690         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7692         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7694         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7695         _POSIX_THREAD_PRIORITY_SCHEDULING.
7696         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7698 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7700         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7701         nested function, use static inline function from libio.h.
7702         Code by Richard Henderson.
7704         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7705         weak.
7707 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7709         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7710         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7711         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7712         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7713         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7714         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7715         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7716         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7717         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7718         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7719         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7720         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7721         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7722         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7723         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7724         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7725         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7726         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7727         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7728         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7729         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7730         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7731         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7732         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7733         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7734         * sysdeps/sparc/tls.h: New file.
7735         * sysdeps/sparc/tcb-offsets.sym: New file.
7736         * sysdeps/sparc/Makefile: New file.
7737         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7738         * init.c [__sparc__] (__NR_set_tid_address): Define.
7740 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7742         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7743         _IO_release_lock): Define.
7745 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7747         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7748         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7750 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7752         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7753         (__pthread_cleanup_class): Add missing return types of member
7754         functions.
7756 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7758         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7759         (lll_mutex_unlock_force): Add memory barrier between store and futex
7760         syscall.
7762 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7764         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7765         tempmsg in first loop.
7767 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7769         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7770         _POSIX_THREAD_PRIORITY_SCHEDULING.
7771         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7773 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7775         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7776         (__rtld_lock_default_lock_recursive,
7777         __rtld_lock_default_unlock_recursive): Define.
7778         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7779         __rtld_lock_unlock_recursive): Define using
7780         GL(_dl_rtld_*lock_recursive).
7781         * init.c (__pthread_initialize_minimal_internal): Initialize
7782         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7783         Lock GL(_dl_load_lock) the same number of times as
7784         GL(_dl_load_lock) using non-mt implementation was nested.
7786         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7787         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7789 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7791         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7792         PIPE_BUF.
7794 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7796         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7798 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7800         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7801         to first syscall error check.  Move syscall error check for tkill
7802         into __ASSUME_CLONE_STOPPED #ifdef.
7804 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7806         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7807         is not defined, do explicit synchronization.
7808         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7809         is not defined also unlock pd->lock for non-debugging case in case
7810         it is necessary.
7811         * pthread_create.c (start_thread): Always get and release pd->lock
7812         if __ASSUME_CLONE_STOPPED is not defined.
7813         (start_thread_debug): Removed.  Adjust users.
7814         * allocatestack.c (allocate_stack): Always initialize lock if
7815         __ASSUME_CLONE_STOPPED is not defined.
7816         * Makefile (tests): Add tst-sched1.
7817         * tst-sched1.c: New file.
7819         * sysdeps/pthread/createthread.c (do_clone): Only use
7820         sched_setschduler and pass correct parameters.
7822 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7824         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7825         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7826         PTHREAD_STACK_MIN in comments.
7828 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7830         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7831         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7832         argument.
7833         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7834         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7835         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7836         (__pthread_cleanup_upto): Fix prototype.
7837         (_longjmp_unwind): Adjust caller.
7838         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7839         Change second argument to const struct pointer.
7840         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7841         * tst-sem9.c (main): Likewise.
7842         * unwind.c: Include string.h for strlen prototype.
7844 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7846         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7847         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7848         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7849         Define HAVE_CMOV.
7850         Patch by Nicholas Miell <nmiell@attbi.com>.
7852 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7854         * init.c (__pthread_initialize_minimal_internal): Initialize
7855         GL(dl_init_static_tls).
7856         * pthreadP.h (__pthread_init_static_tls): New prototype.
7857         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7858         New functions.
7859         * Makefile (tests): Add tst-tls4.
7860         (modules-names): Add tst-tls4moda and tst-tls4modb.
7861         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7862         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7863         tst-tls4modb.so.
7864         * tst-tls4.c: New file.
7865         * tst-tls4moda.c: New file.
7866         * tst-tls4modb.c: New file.
7868 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7870         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7871         before __timer_dealloc.
7872         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7873         Don't call list_unlink.
7875 2003-07-29  Roland McGrath  <roland@redhat.com>
7877         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7879 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7881         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7882         Don't reuse struct aiocb A if it failed.
7883         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7884         not just one byte, as that does not block.
7886 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7888         * sysdeps/pthread/unwind-resume.c: New file.
7889         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7890         unwind-resume in csu subdir.
7891         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7892         exceptions.
7893         (librt-sysdep_routines, librt-shared-only-routines): Add
7894         rt-unwind-resume.
7895         * sysdeps/pthread/rt-unwind-resume.c: New file.
7896         * unwind-forcedunwind.c: New file.
7897         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7898         (libpthread-shared-only-routines): Likewise.
7899         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7900         * pthreadP.h (pthread_cancel_init): New prototype.
7901         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7903         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7904         attr argument const struct pthread_attr *.
7906         * res.c (__res_state): Return __resp.
7907         * descr.h: Include resolv.h.
7908         (struct pthread): Add res field.
7909         * pthread_create.c: Include resolv.h.
7910         (start_thread): Initialize __resp.
7911         * Makefile (tests): Add tst-_res1.
7912         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7913         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7914         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7915         libpthread.
7916         * tst-_res1.c: New file.
7917         * tst-_res1mod1.c: New file.
7918         * tst-_res1mod2.c: New file.
7920 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7922         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7924         * Makefile: Define various *-no-z-defs variables for test DSOs
7925         which has undefined symbols.
7927 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7929         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7930         Retry if the stwcx fails to store once_control.
7932 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7934         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7935         pthread_attr_setaffinity.
7936         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7937         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7938         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7939         * pthread_attr_destroy.c: Free cpuset element if allocated.
7940         * pthread_create.c: Pass iattr as additional parameter to
7941         create_thread.
7942         * sysdeps/pthread/createthread.c: If attribute is provided and
7943         a new thread is created with affinity set or scheduling parameters,
7944         start thread with CLONE_STOPPED.
7945         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7946         pthread_attr_setaffinity.
7947         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7948         cpuset element.
7950 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7952         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7954 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7956         * sysdeps/pthread/configure.in: Require CFI directives also for
7957         ppc and s390.
7959 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7961         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7962         Add cfi directives.
7964 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7966         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7967         CLEANUP_JMP_BUF.
7968         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7969         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7970         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7971         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7972         not self pointer in __writer.  Compare with TID to determine
7973         deadlocks.
7974         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7975         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7976         Likewise.
7977         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7978         Likewise.
7979         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7980         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7981         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7982         macros also when compiling librt.
7984 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7986         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7987         -fasynchronous-unwind-tables.
7988         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7989         (PSEUDO): Add cfi directives.
7990         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7991         Likewise.
7992         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7993         Likewise.
7995 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7997         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7998         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7999         * unwind.c (__pthread_unwind_next): Add hidden_def.
8000         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8001         Likewise.
8002         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8003         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8004         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8005         Likewise.
8006         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8007         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8008         Likewise.
8009         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8010         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8011         __pthread_unregister_cancel and __pthread_unwind_next.
8013 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8015         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8016         different symbol for the cancellation syscall wrapper and
8017         non-cancellation syscall wrapper.
8018         (PSEUDO_END): Define.
8020 2003-07-05  Richard Henderson  <rth@redhat.com>
8022         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8023         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8024         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8025         return actual return value from the syscall, not 0.
8027 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8029         * descr.h (struct pthread): Add pid field.
8030         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8031         (__reclaim_stacks): Likewise.
8032         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8033         also check for PID of the signal source.
8034         (__pthread_initialize_minimal_internal): Also initialize pid field
8035         of initial thread's descriptor.
8036         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8037         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8038         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8039         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8040         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8042 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8044         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8045         Fix use of parameter.
8046         (__libc_cleanup_pop): Likewise.
8048 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8050         * init.c (sigcancel_handler): Change parameters to match handler
8051         for SA_SIGACTION.  Check signal number and code to recognize
8052         invalid invocations.
8054 2003-07-03  Roland McGrath  <roland@redhat.com>
8056         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8057         Apply sizeof (struct pthread) bias to r13 value.
8059 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8061         * sysdeps/pthread/configure.in: Require CFI directives.
8063         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8064         definition.
8065         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8066         libpthread compilation.
8067         * unwind.c (__pthread_unwind): Add hidden_def.
8068         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8070 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8072         * libc-cancellation.c (__libc_cleanup_routine): Define.
8073         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8074         (__pthread_cleanup_pop): Define.
8076 2003-07-01  Richard Henderson  <rth@redhat.com>
8078         * sysdeps/alpha/elf/pt-initfini.c: New file.
8079         * sysdeps/alpha/pthread_spin_lock.S: New file.
8080         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8081         * sysdeps/alpha/pthreaddef.h: New file.
8082         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8083         * sysdeps/alpha/tls.h: New file.
8084         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8085         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8086         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8087         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8088         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8089         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8090         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8091         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8092         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8093         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8095 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8097         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8098         cleanup support and unwind info.
8100 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8102         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8103         Use correct cleanup handler registration.  Add unwind info.
8104         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8105         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8106         * tst-once3.c: Add cleanup handler and check it is called.
8107         * tst-once4.c: Likewise.
8108         * tst-oncex3.c: New file.
8109         * tst-oncex4.c: New file.
8110         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8112 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8114         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8116 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8118         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8119         (tf_msgsnd): Likewise.
8121         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8122         premature returns a bit more.
8124 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8126         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8127         definition to the front.
8129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8130         the cleanup functions to make the names unique.  Fix dwarf opcode
8131         un unwind table.
8132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8133         functions to make the names unique.  Fix CFA offset for two blocks.
8135 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8137         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8138         missing closing braces.
8139         Patch by Christophe Saout <christophe@saout.de>.
8141 2003-06-24  Roland McGrath  <roland@redhat.com>
8143         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8145 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8147         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8148         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8150         * pthreadP.h: Declare __find_thread_by_id.
8151         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8152         * pthread_clock_gettime.c: Allow using other thread's clock.
8153         * pthread_clock_settime.c: Likewise.
8154         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8155         * Makefile: Add rules to build and run tst-clock2.
8156         * tst-clock2.c: New file.
8158 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8161         to use exception-based cleanup handler.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8164         * tst-cond8.c (ch): Announce that we are done.
8166         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8168         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8169         Also test aio_suspend with timeout value.
8171 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8173         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8174         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8175         attribute_hidden.
8177         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8178         (__pthread_mutex_lock_internal): Likewise.
8179         (__pthread_mutex_unlock_internal): Likewise.
8180         (__pthread_mutex_unlock_usercnt): Declare.
8181         * pthread_mutex_destroy.c: Always fail if used in any way.
8182         * pthread_mutex_init.c: Update comment.
8183         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8184         * pthread_mutex_timedlock.c: Adjust __nusers.
8185         * pthread_mutex_trylock.c: Adjust __nusers.
8186         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8187         and public interfaces are wrapper with pass additional parameter.
8188         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8189         parameter zero.
8190         * tst-mutex8.c: New file.
8191         * Makefile (tests): Add tst-mutex8.
8192         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8193         __pthread_mutex_unlock_usercnt.
8194         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8196         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8198         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8199         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8200         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8201         Add __nusers.
8202         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8203         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8204         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8205         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8206         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8208         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8209         * pthread_mutex_timedlock.c: Likewise.
8210         * pthread_mutex_trylock.c: Adjust __nusers.
8211         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8212         * tst-mutex9.c: New file.
8213         * Makefile (tests): Add tst-mutex9.
8214         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8215         * sysdeps/ia64/tls.h: Likewise.
8216         * sysdeps/powerpc/tls.h: Likewise.
8217         * sysdeps/s390/tls.h: Likewise.
8218         * sysdeps/sh/tls.h: Likewise.
8219         * sysdeps/x86_64/tls.h: Likewise.
8220         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8221         Change type of __owner.
8222         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8223         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8224         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8225         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8226         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8228 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8230         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8231         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8233         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8234         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8235         instead of nr to lll_futex_wake.  Only set errno and return -1
8236         if err < 0.
8238         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8239         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8240         return actual return value from the syscall, not 0.
8242 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8244         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8245         find a random value.
8246         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8247         errno==EIDRM.
8249         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8250         compat_timer_settime.
8251         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8252         compat_timer_gettime.
8253         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8254         compat_timer_getoverrun.
8255         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8256         compat_timer_delete.
8258         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8259         error-checking mutex detect busy mutexes.
8261 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8263         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8264         Add ax to clobber list.
8265         (lll_mutex_cond_lock): Likewise.
8266         (lll_mutex_unlock): Likewise.
8267         (lll_lock): Likewise.
8268         (lll_unlock): Likewise.
8270         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8271         * tst-cancel18.c: New file.
8272         * tst-cancelx18.c: New file.
8274         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8275         and tcdrain.
8277         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8278         * tst-cancel17.c: New file.
8279         * tst-cancelx17.c: New file.
8281         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8282         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8283         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8285         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8287 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8289         * sysdeps/pthread/createthread.c (create_thread): Set
8290         header.multiple_threads unconditionally.
8291         * allocatestack.c (allocate_stack): Likewise.
8292         * descr.h (struct pthread): Add header.multiple_threads
8293         unconditionally.
8294         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8295         Define for librt.  #error if neither libpthread, libc nor librt.
8296         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8297         Likewise.
8298         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8299         CDISABLE): Likewise.
8300         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8301         CDISABLE): Likewise.
8302         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8303         CDISABLE): Likewise.
8304         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8305         CDISABLE): Likewise.  Access header.multiple_threads outside of
8306         libc and libpthread.
8307         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8308         Likewise.
8309         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8310         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8312 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8314         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8315         Also test early cancellation before the thread reaches the cancellation
8316         point.
8318         * Makefile: Compile forward.c with exceptions.
8320         * sysdeps/unix/sysv/linux/sleep.c: New file.
8322 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8324         * Makefile: Add CFLAGS definition to compile function wrappers
8325         duplicated from libc with exceptions.
8326         * tst-cancel4.c: Also check cancellation handlers.
8328         * Makefile: Add rules to build and run tst-cancel16 and
8329         tst-cancelx16.  Add missing CFLAGS definitions.
8330         * tst-cancel16.c: New file.
8331         * tst-cancelx16.c: New file.
8333 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8335         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8336         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8337         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8338         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8340         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8341         (LIBC_CANCEL_RESET): Likewise.
8342         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8343         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8344         librt-cancellation.
8345         (CFLAGS-libcrt-cancellation.c): Define.
8346         * sysdeps/pthread/librt-cancellation.c: New file.
8347         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8348         macros also when compiling librt.
8349         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8350         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8351         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8352         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8353         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8354         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8355         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8357         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8358         compat_timer_create.
8360 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8362         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8364         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8365         __register_atfork.
8366         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8367         Add libc_hidden_def.
8369 2003-06-13  Roland McGrath  <roland@redhat.com>
8371         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8372         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8374 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8376         * allocatestack.c (queue_stack): Always inline.
8377         * ptreadhP.h (__do_cancel): Likewise.
8379 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8381         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8382         a typo.
8384 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8387         (__pthread_cond_signal): Remove incorrect second addition for
8388         cond_lock!=0.
8390 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8393         (__pthread_cond_signal): Use correct futex pointer in
8394         __lll_mutex_lock_wait call.
8396         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8397         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8399 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8401         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8402         cancelable.
8403         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8404         Likewise.
8406         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8407         hand-written CFI generation code.  Since ENTRY/END also initiated
8408         CFI frames this caused two CFI sets to be generated.
8410 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8412         * cleanup_routine.c: New file.
8413         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8414         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8415         cleanup handling.
8416         * Makefile (libpthread-routines): Add cleanup_routine.
8417         Add more CFLAGS variables to compile with exceptions.  Add comments
8418         why which file needs unwind tables.
8419         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8420         tests.
8421         * tst-cancelx1.c: New file.
8422         * tst-cancelx2.c: New file.
8423         * tst-cancelx3.c: New file.
8424         * tst-cancelx4.c: New file.
8425         * tst-cancelx5.c: New file.
8426         * tst-cancelx6.c: New file.
8427         * tst-cancelx7.c: New file.
8428         * tst-cancelx8.c: New file.
8429         * tst-cancelx9.c: New file.
8430         * tst-cancelx10.c: New file.
8431         * tst-cancelx11.c: New file.
8432         * tst-cancelx12.c: New file.
8433         * tst-cancelx13.c: New file.
8434         * tst-cancelx14.c: New file.
8435         * tst-cancelx15.c: New file.
8436         * tst-cleanupx0.c: New file.
8437         * tst-cleanupx0.expect: New file.
8438         * tst-cleanupx1.c: New file.
8439         * tst-cleanupx2.c: New file.
8440         * tst-cleanupx3.c: New file.
8442         * tst-cleanup0.c: Make standard compliant.
8443         * tst-cleanup1.c: Likewise.
8445         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8446         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8447         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8448         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8449         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8450         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8451         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8452         CLEANUP_JMP_BUF.
8453         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8454         * tst-cancel12.c: New file.
8455         * tst-cancel13.c: New file.
8456         * tst-cancel14.c: New file.
8457         * tst-cancel15.c: New file.
8458         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8459         and tst-cancel15.
8461         * tst-cancel1.c: Add some comments.
8463         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8464         timeout correctly.
8466 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8468         * Makefile (CFLAGS-pthread_cancel.c): Define.
8470 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8472         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8473         Change type of __writer element to int.
8474         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8475         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8476         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8477         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8478         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8479         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8480         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8481         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8482         Compare with TID to determine deadlocks.
8483         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8484         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8485         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8486         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8488         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8489         Likewise.
8490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8491         Likewise.
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8493         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8494         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8495         Likewise.
8496         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8497         Likewise.
8498         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8499         * Makefile (tests): Add tst-rwlock12.
8500         * tst-rwlock12.c: New file.
8502 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8504         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8505         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8506         Remove bogus hidden_proto.
8507         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8508         Likewise.
8509         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8510         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8511         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8512         ___lll_mutex_timedlock): Likewise.
8514 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8517         (__pthread_cond_signal): Add some code to eventually handle
8518         cond_lock!=0.
8520 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8522         * Makefile (tests): Add tst-exec4.
8523         (tst-exec4-ARGS): Define.
8524         * tst-exec4.c: New file.
8526 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8528         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8529         Also fail if tv_nsec < 0.
8530         (__lll_timedwait_tid): Likewise.
8531         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8532         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8533         Likewise.
8534         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8535         Likewise.
8536         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8537         Likewise.
8538         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8539         Likewise.
8540         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8541         Likewise.
8542         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8543         Likewise.
8545         * Makefile (tests): Add tst-sem8 and tst-sem9.
8546         * tst-sem8.c: New file.
8547         * tst-sem9.c: New file.
8548         * sem_open.c: Fix creation of in_use record if the file exists but
8549         no internal record.
8551         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8552         definitions.
8554         * sysdeps/pthread/timer_create.c (timer_create): In case
8555         evp==NULL, assign timer ID to sival_ptr.
8557         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8558         struct pthread_unwind_buf *.
8559         (struct pthread): Likewise for cleanup_jmp_buf element.
8561         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8562         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8563         * unwind.c (__pthread_unwind_next): Likewise.
8565 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8567         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8568         (lll_futex_timed_wait): Use int for futex value parameter.
8569         (lll_futex_wake): Likewise.
8570         (lll_futex_requeue): Likewise.
8572         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8573         Replace one memory operation with one register operation.
8575         * tst-join4.c (do_test): Fix error message.
8577         * tst-rwlock6.c (do_test): Use correct format specifier.
8579         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8580         (__lll_mutex_lock_wait): Replace one memory operation with one
8581         register operation.
8582         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8583         (__lll_mutex_lock_wait): Likewise.
8585         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8586         (__lll_mutex_cond_lock): Add one to value parameter of
8587         __lll_lock_wait to reflect reality in the futex syscall.
8588         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8589         (lll_mutex_cond_lock): Likewise.
8591 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8593         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8594         New function.
8595         (lll_mutex_cond_lock): Define.
8597 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8599         * Makefile (tests): Add tst-signal6.
8600         * tst-signal6.c: New file.
8602         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8603         (__lll_mutex_unlock_force): New function
8604         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8606         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8607         (__lll_mutex_unlock_force): New function.
8608         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8610         * tst-rwlock7.c (do_test): Use correct format specifier.
8612         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8613         Find break parameter in correct asm argument.
8615 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8617         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8618         Remove out4.
8619         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8620         error occured.
8621         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8622         Add __mutex.
8623         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8624         lll_futex_requeue, lll_mutex_unlock_force): Define.
8626 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8628         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8629         (pthread_cond_t): Add __mutex.
8630         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8631         lll_futex_requeue, lll_mutex_unlock_force): Define.
8633 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8635         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8636         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8637         Add __mutex field.
8638         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8639         Define.
8640         (lll_futex_wait, lll_futex_wake): Define.
8641         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8642         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8643         FUTEX_REQUEUE instead of FUTEX_WAIT.
8644         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8645         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8646         mutex which was used in condvar structure.  Call
8647         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8648         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8650         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8651         include tcb-offsets.h.  Read wakeup value in locked region.
8652         Use the value of gbr register as THREAD_ID.
8653         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8654         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8655         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8657         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8658         macros.
8660 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8662         * sysdeps/pthread/pthread_cond_broadcast.c
8663         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8665 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8667         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8668         typo in register name.
8669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8670         correctly.  Actually use requeue.  Little optimization.
8671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8672         mutex address early.  Handle cancellation state as 32-bit value.
8673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8674         Remove unnecessary label.
8676 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8678         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8679         instead of FUTEX_WAIT.
8680         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8682         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8683         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8685         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8686         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8687         of __pthread_mutex_lock_internal.
8688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8690         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8691         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8694         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8695         Add pthread_mutex_cond_lock.
8696         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8697         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8698         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8699         lll_mutex_cond_lock.
8700         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8701         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8702         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8703         Add __mutex field.
8704         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8707         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8708         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8710         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8711         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8712         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8713         macro don't define aliases.
8715         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8716         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8717         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8718         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8720         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8721         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8722         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8723         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8725 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8727         * sem_open.c: Fix one endless loop.  Implement correct semantics
8728         wrt opening the same semaphore more then once.
8729         * sem_close.c: Adjust for sem_open change.
8730         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8731         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8732         * Makefile (tests): Add tst-sem7.
8733         * tst-sem7.c: New file.
8735 2003-05-16  Roland McGrath  <roland@redhat.com>
8737         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8738         uninitialized variable braino.
8740 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8742         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8743         test for syscall availability.
8745         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8746         __no_posix_timers to -1 if the syscalls don't exist.
8748         * pthread_join.c (pthread_join): Set tid field of the joined
8749         thread to -1.  This isn't necessary but helps to recognize some
8750         error conditions with almost no cost.
8752         * allocatestack.c (FREE_P): Also negative values indicate an
8753         unused stack.
8755         * unwind.c: Include <unistd.h>.
8757 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8759         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8761 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8763         * Makefile (crti-objs, crtn-objs): New variables.
8764         (omit-deps, extra-objs): Add crtn.
8765         ($(objpfx)libpthread.so): Depend on both crti and crtn
8766         and links to them in multidir.
8767         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8769 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8771         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8772         (lll_mutex_unlock): Use atomic_exchange_rel.
8774 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8776         * cond-perf.c (cons): Add missing locking around setting of alldone.
8778 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8780         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8781         related macros.
8782         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8784 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8786         * tst-sem6.c: New file.
8787         * Makefile (tests): Add tst-sem6.
8789         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8790         Use atomic_exchange_rel instead of atomic_exchange.
8791         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8792         Likewise.
8794         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8795         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8796         vsyscall is possible.
8798         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8799         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8800         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8801         pthread_setaffinity_np.
8802         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8803         and pthread_setaffinity_np.
8804         * Makefile (libpthread-routines): Add pthread_getaffinity and
8805         pthread_setaffinity.
8807         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8808         use it in case mmap to allocate the stack fails.
8809         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8810         ARCH_MAP_FLAGS here.
8811         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8812         ARCH_RETRY_MMAP.
8814 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8816         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8817         handler implementation.  It is now lockless in fork().
8818         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8819         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8820         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8821         declare the __fork_*_lists.
8822         (struct fork_handler): Include pointers to all three functions.
8823         Add next, refcntr and need_signal elements.
8824         (__fork_handlers): New declaration.
8825         (__register_atfork_malloc): Remove declaration.
8826         (HAVE_register_atfork_malloc): Remove definition.
8827         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8828         __pthread_child_handler variable.
8829         (__libc_pthread_init): Use __register_atfork instead of explicitly
8830         adding to the list.
8831         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8832         and lll_futex_wake.
8833         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8835         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8836         function must never be reached.
8838         * cond-perf.c: New file.
8840 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8842         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8844 2003-05-04  Roland McGrath  <roland@redhat.com>
8846         * Makefile ($(objpfx)../libc.so): New target.
8848 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8850         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8851         (pthread_condattr_t): Size is only an int, don't use long for
8852         alignment.
8853         (pthread_mutexattr_t): Likewise.
8854         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8855         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8856         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8858 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8860         * sysdeps/i386/tls.h: Define THREAD_ID.
8861         * sysdeps/ia64/tls.h: Likewise.
8862         * sysdeps/powerpc/tls.h: Likewise.
8863         * sysdeps/s390/tls.h: Likewise.
8864         * sysdeps/sh/tls.h: Likewise.
8865         * sysdeps/x86_64/tls.h: Likewise.
8866         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8867         record ownership.
8868         * pthread_mutex_timedlock.c: Likewise.
8869         * pthread_mutex_trylock.c: Likewise.
8870         * pthread_mutex_unlock.c: Likewise.
8871         * pthread_rwlock_trywrlock.c: Likewise.
8872         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8873         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8874         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8875         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8877         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8878         flag.
8880 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8882         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8883         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8884         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8885         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8886         Make __align long long instead of long.
8887         (pthread_rwlock_t): Formatting.
8888         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8889         (pthread_rwlock_t): Formatting.
8890         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8891         (pthread_cond_t): Make __align long long instead of long.
8892         (pthread_rwlock_t): Move __flags field to the same position as in
8893         linuxthreads.
8895 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8897         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8898         * tst-rwlock7.c (do_test): Likewise.
8900 2003-04-26  Roland McGrath  <roland@redhat.com>
8902         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8904 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8906         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8907         sizeof (struct pthread).
8908         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8909         1 struct pthread.
8910         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8911         to 0.
8912         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8913         struct pthread.
8914         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8915         to 32-bit bytes.
8916         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8917         tcbp.
8918         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8919         unneccessarily.
8920         (NO_TLS_OFFSET): Define.
8921         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8922         add TLS_TCB_SIZE unnecessarily.
8924 2003-04-22  Roland McGrath  <roland@redhat.com>
8926         * Makeconfig (shared-thread-library): Reverse link order to work
8927         around linker bug.
8929 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8931         * semaphore.h: Fix typo in comment.
8933 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8935         * sysdeps/pthread/sigfillset.c: New file.
8937         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8938         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8939         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8940         * sysdeps/pthread/sigaction.c: Likewise.
8941         * sysdeps/pthread/sigprocmask.c: New file.
8942         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8943         __SIGRTMIN+1.
8944         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8945         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8946         in this case.
8948 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8950         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8951         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8953         * sysdeps/unix/sysv/linux/unregister-atfork.c
8954         (__unregister_atfork): Don't free memory not allocated dynamically.
8956         * semaphore.h: Remove __THROW marker from cancellation points.
8957         * nptl/sysdeps/pthread/pthread.h: Likewise.
8959 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8961         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8962         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8963         __THROW.
8965 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8967         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8969 2003-04-15  Roland McGrath  <roland@redhat.com>
8971         * forward.c (__pthread_unwind): Tweak to avoid warning.
8973 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8975         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8977 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8979         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8980         overflow CFA advance instructions.
8981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8983 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8985         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8986         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8987         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8988         defined.
8990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8991         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8993         DW_CFA_advance_loc for .Laddl-.Lsubl.
8995 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8997         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8998         position-independent unwind data for static libraries.
8999         Add missing unwind info.  Add comments.
9001         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9006 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9008         * Makefile: Make sure all cancellation points are compiled with
9009         exception and asynchronous unwind tables.
9011         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9012         which mishandles loading of global object addresses in PIC.
9013         (THREAD_SETMEM_NC): Likewise.
9015 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9017         * pthread.h: Define new data structure for cleanup buffer.  Declare
9018         new cleanup handler interfaces.
9019         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9020         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9021         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9022         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9023         it.  Declare old cleanup handler installation functions.
9024         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9025         handling.
9026         * cleanup_defer.c: Likewise.
9027         * cleanup_compat.c: New file.  Old cleanup code.
9028         * cleanup_def_compat.c: New file.  Old cleanup code.
9029         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9030         if own thread descriptor.
9031         * unwind.c: New file.
9032         * forward.c: Add __pthread_unwind.
9033         * init.c (pthread_functions): Add __pthread_unwind.
9034         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9035         Add ptr___pthread_unwind.
9036         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9037         and unwind function.
9038         * Makefile (libpthread-routines): Add cleanup_compat,
9039         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9040         table generation if necessary.
9041         * version.c: Record whether unwind support is compiled in.
9042         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9043         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9044         handler interfaces.
9045         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9046         complication to generate unwind information for syscall wrappers.
9047         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9048         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9049         __cleanup_fct_attribute.
9051         * Makefile: Add rules to build and run tst-cleanup0.
9052         * tst-cleanup0.c: New file.
9053         * tst-cleanup0.expect: New file.
9055         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9056         caller.  Optimize to avoid often unecessary local variable.
9058 2003-04-11  Roland McGrath  <roland@redhat.com>
9060         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9061         sets variable `multidir'; include that.
9062         (generated): Add it.
9063         ($(objpfx)$(multidir)/crti.o): New target.
9064         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9066 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9068         * tst-attr2.c (do_test): Add cast to avoid warning.
9069         * tst-mutex4.c (do_test): Likewise.
9071 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9073         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9074         in child.
9076 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9078         * Makefile (tests): Add tst-detach1.
9079         * tst-detach1.c: New file.
9081 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9083         * sysdeps/pthread/pthread.h: Remove duplicate
9084         pthread_cleanup_{push,pop} definitions.
9086         * tst-barrier2.c: Eliminate warnings.
9087         * tst-cancel4.c: Likewise.
9088         * tst-cond4.c: Likewise.
9089         * tst-cond6.c: Likewise.
9090         * tst-detach1.c: Likewise.
9091         * tst-rwlock4.c: Likewise.
9092         * tst-rwlock6.c: Likewise.
9093         * tst-rwlock7.c: Likewise.
9094         * tst-sem3.c: Likewise.
9095         * tst-spin2.c: Likewise.
9096         * tst-umask1.c: Likewise.
9098 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9100         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9102 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9104         * descr.h (struct pthread): Move cancelhandling member to the front.
9106 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9108         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9109         malloc_parent, and malloc_child statically.
9110         (__register_atfork_malloc): New function.
9111         (free_mem): Don't free any of the malloc_* variables on the list.
9112         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9113         Define HAVE_register_atfork_malloc.
9115 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9117         * sysdeps/pthread/createthread.c (create_thread): Add some more
9118         comments explaining when to set multiple_threads and when not.
9120         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9121         THREAD_ATOMIC_BIT_SET if not already defined.
9122         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9123         THREAD_ATOMIC_BIT_SET:
9124         * sysdeps/x86_64/tls.h: Likewise.
9125         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9126         THREAD_ATOMIC_CMPXCHG_VAL.
9127         (_pthread_cleanup_pop_restore): Likewise.
9128         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9129         (__pthread_enable_asynccancel_2): Likewise.
9130         (__pthread_disable_asynccancel): Likewise.
9131         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9132         (__libc_disable_asynccancel): Likewise.
9133         * init.c (sigcancel_handler): Likewise.
9134         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9135         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9137 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9139         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9140         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9141         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9142         * Makefile (tests): Add tst-cancel11.
9143         * tst-cancel11.c: New file.
9145 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9147         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9148         round, not the first.  Use specific_used flag instead of local
9149         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9150         (__free_tcb): Don't call deallocate_tsd here.
9151         (start_thread): Call deallocate_tsd here.
9152         * pthread_setspecific.c: Set specific_used flag really only when
9153         needed.
9154         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9155         * tst-tsd3.c: New file.
9156         * tst-tsd4.c: New file.
9158 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9160         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9161         Use atomic_exchange_and_add instead of __lll_add.
9162         (__lll_mutex_timedlock): Likewise.
9163         Patch by Ian Wienand.
9165 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9167         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9168         (SINGLE_THREAD_P): Fix typo.
9169         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9171 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9173         * Makefile (tests): Add tst-align.
9174         * tst-align.c: New file.
9175         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9177         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9178         function correctly.
9180         * tst-tsd2.c: Add casts to avoid warnings.
9182 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9184         * descr.h (struct pthread): Move most often used elements to the front.
9186 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9188         * Makefile (libpthread-routines): Add pthread_atfork.
9189         (libpthread-static-only-routines): Add pthread_atfork.
9191 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9193         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9194         of TLS_DTV_AT_TP.
9195         (INSTALL_DTV): Add parens.
9196         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9197         Use passed descr instead of THREAD_SELF.
9198         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9199         (__lll_mutex_timedlock_wait): Correct expected value after
9200         spurious wakeup.
9201         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9202         Release lock before waking up the waiters.
9203         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9204         criteria.  Reorderstruct passed to cleanup handler.  Fix
9205         handling of cancellation and failung pthread_mutex_unlock call.
9206         Use __pthread_enable_asynccancel_2 instead of
9207         __pthread_enable_asynccancel.
9208         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9209         Return result of lock re-get if it fails.
9210         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9211         for __pthread_cleanup_push.
9212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9213         completely broken rwlock implementation.
9214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9215         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9217         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9219         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9220         versioned_symbol macro.
9221         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9222         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9224 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9226         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9227         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9228         and __helper_tid.
9229         (struct timer): Remove th and bar field.
9230         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9231         debugging code.  Create only one helper thread.
9232         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9233         helper thread.
9234         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9235         Renamed.  Define statically.  Use thread info from siginfo.
9236         (__helper_once): New variable.
9237         (__helper_tid): New variable.
9238         (__reset_helper_control): New function.
9239         (__start_helper_thread): New function.
9241         * pthread_create.c (start_thread): Don't use setjmp inside
9242         __builtin_expect to work around gcc bug.
9244         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9245         timer_delete syscall fails, but not with ENOSYS, set
9246         __no_posix_timers.
9248         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9249         (timer_settime): Fix typo.
9250         * sysdeps/unix/sysv/linux/timer_getoverr.c
9251         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9253 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9256         offset of cleanupbuf.__prev.
9258 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9260         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9261         of included file.
9263 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9265         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9266         NULL provide default definition to syscall.
9268 2003-03-25  Roland McGrath  <roland@redhat.com>
9270         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9271         (timer_id2ptr): Fix typo.
9273 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9275         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9276         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9277         * sysdeps/ia64/pthreaddef.h: Likewise.
9278         * sysdeps/powerpc/pthreaddef.h: Likewise.
9279         * sysdeps/s390/pthreaddef.h: Likewise.
9280         * sysdeps/sh/pthreaddef.h: Likewise.
9281         * sysdeps/x86_64/pthreaddef.h: Likewise.
9282         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9283         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9284         being changed.
9285         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9286         SIGTIMER is not unblocked.
9287         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9288         RT signal taken.
9289         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9290         be send.
9291         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9292         pass pointer through as ID.
9293         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9294         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9295         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9296         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9297         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9298         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9299         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9300         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9301         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9302         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9303         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9304         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9305         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9306         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9307         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9308         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9309         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9310         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9311         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9313         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9314         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9315         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9316         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9317         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9318         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9319         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9320         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9321         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9322         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9323         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9324         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9325         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9327         * pthreadP.h: Remove FRAME_LEFT definition.
9328         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9329         already left frame.  Programs which have this problem are not POSIX
9330         compliant.
9331         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9333 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9335         * sysdeps/pthread/tst-timer.c: Check return values of the
9336         functions we test.
9338 2003-03-23  Roland McGrath  <roland@redhat.com>
9340         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9341         * tst-tls3mod.c: Likewise.
9342         * tst-tls1.c: Likewise.
9343         * tst-tls2.c: Likewise.
9345         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9346         undefined behavior.
9348         * tst-join5.c (tf1, tf2): Add a cast.
9350         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9352         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9353         Don't test anything.
9354         * tst-cond4.c: Likewise.
9355         * tst-cond6.c: Likewise.
9356         * tst-flock2.c: Likewise.
9357         * tst-mutex4.c: Likewise.
9358         * tst-rwlock4.c: Likewise.
9359         * tst-signal1.c: Likewise.
9360         * tst-spin2.c: Likewise.
9361         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9363         * tst-mutex4.c: Use test-skeleton.c.
9364         * tst-spin2.c: Likewise.
9365         * tst-sysconf.c: Likewise.
9366         * tst-barrier2.c: Likewise.
9367         * tst-cond4.c: Likewise.
9368         * tst-cond6.c: Likewise.
9369         * tst-rwlock4.c: Likewise.
9370         * tst-unload.c: Likewise.
9371         * tst-flock2.c (do_test): Use return instead of exit.
9373 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9375         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9377 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9379         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9380         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9381         instead of __lll_compare_and_swap.
9382         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9383         Likewise.
9384         Removed definition if __lll_compare_and_swap.
9386         * cancellation.c: Adjust for new form of compare&exchange macros.
9387         * cleanup_defer.c: Likewise.
9388         * init.c: Likewise.
9389         * libc-cancellation.c: Likewise.
9390         * old_pthread_cond_broadcast.c: Likewise.
9391         * old_pthread_cond_signal.c: Likewise.
9392         * old_pthread_cond_timedwait.c: Likewise.
9393         * old_pthread_cond_wait.c: Likewise.
9394         * pthread_cancel.c: Likewise.
9395         * pthread_create.c: Likewise.
9396         * pthread_detach.c: Likewise.
9397         * pthread_join.c: Likewise.
9398         * pthread_key_delete.c: Likewise.
9399         * pthread_setcancelstate.c: Likewise.
9400         * pthread_setcanceltype.c: Likewise.
9401         * pthread_timedjoin.c: Likewise.
9402         * pthread_tryjoin.c: Likewise.
9403         * sysdeps/pthread/createthread.c: Likewise.
9405 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9408         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9409         definitions.  Replace uses with calls to atomic_* functions.
9410         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9411         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9412         __lll_test_and_set calls with atomic_exchange_and_add and
9413         atomic_exchange calls respectively.
9414         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9415         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9416         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9417         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9418         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9419         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9420         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9422         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9423         returns the old value.
9425 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9427         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9428         int for variable OLDVAL and correct inline assembler contraint.
9429         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9430         type int for variable OLD.
9432         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9433         only for s390-32.
9434         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9435         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9436         instead of multiple_threads field in the TCB.
9438 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9440         * sysdeps/i386/i686/bits/atomic.h: Removed.
9441         * sysdeps/i386/i586/bits/atomic.h: Removed.
9442         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9443         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9444         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9445         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9446         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9447         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9448         * atomic.h: Removed.  Moved to glibc.
9450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9451         support for clock selection.
9453         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9454         signalling waiters.
9456 2003-03-18  Roland McGrath  <roland@redhat.com>
9458         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9459         Add __lll_rel_instr first.  Add memory clobber.
9460         (lll_mutex_unlock): Use __lll_test_and_set.
9461         From Paul Mackerras <paulus@samba.org>.
9463         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9464         unconditionally.
9465         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9466         (SINGLE_THREAD_P):  Add `header.' prefix.
9467         From Paul Mackerras <paulus@samba.org>.
9469         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9470         pthread_timedjoin_np to ...
9471         (libpthread: GLIBC_2.3.3): ... here.
9472         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9474         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9475         Avoid shadowing VAL variable.
9477         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9478         New macro.
9480 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9482         * Makefile (tests): Add tst-cond11.
9483         * tst-cond11.c: New file.
9485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9486         struct passed to cleanup handler to eliminate one more
9487         instruction.
9488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9490         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9491         (pthrad_cond_t): Replace __unused field with __clock.
9493         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9494         waken all waiters in cleanup handler.
9495         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9498         * pthread_condattr_getclock.c: New file.
9499         * pthread_condattr_setclock.c: New file.
9500         * sysdeps/pthread/pthread.h: Declare these new functions.
9501         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9502         * Makefile (libpthread-routines): Add the new functions.
9503         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9504         Renamed field to value.  Document use of the bits.
9505         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9506         change.
9507         * pthread_condattr_setpshared.c: Likewise.
9508         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9509         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9510         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9511         Add __clock field.
9512         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9513         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9514         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9515         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9517         Implement clock selection.
9518         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9519         * pthread-errnos.sym: Add ENOSYS.
9520         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9521         _POSIX_CLOCK_SELECTION.
9522         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9524         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9525         invalid .size directive.
9527 2003-03-17  Roland McGrath  <roland@redhat.com>
9529         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9530         Formatting tweaks.
9532 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9534         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9535         Use __lll_add instead of spelling it out.  Use protected symbol names.
9536         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9537         Use __lll_add.
9538         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9539         Renamed from lll_compare_and_swap.  Use new name where necessary.
9540         (__lll_add): Defined.
9541         (__lll_dec_if_positive): Defined.
9542         (__lll_test_and_set): Defined.
9543         * sysdeps/ia64/pthread_spin_init.c: Removed.
9544         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9545         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9546         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9547         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9548         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9549         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9550         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9551         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9552         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9553         __sync_lock_release_si.
9554         Patch by Jakub Jelinek.
9556         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9557         Fix timeout handling.
9558         (__lll_timedwait_tid): Likewise.
9559         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9560         Patch by Jakub Jelinek.
9562         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9564 2003-03-17  Roland McGrath  <roland@redhat.com>
9566         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9567         * sysdeps/pthread/pthread_spin_init.c: New file.
9568         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9569         * sysdeps/powerpc/Makefile: New file.
9570         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9571         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9572         * sysdeps/powerpc/pthreaddef.h: New file.
9573         * sysdeps/powerpc/tcb-offsets.sym: New file.
9574         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9575         * sysdeps/powerpc/tls.h: New file.
9576         * sysdeps/powerpc/bits/atomic.h: New file.
9577         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9578         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9579         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9581         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9582         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9583         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9584         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9585         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9586         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9587         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9588         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9590         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9591         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9592         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9593         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9594         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9595         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9597         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9598         not gettimeofday.
9599         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9600         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9601         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9602         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9603         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9605 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9607         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9608         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9611         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9613 2003-03-16  Roland McGrath  <roland@redhat.com>
9615         * tst-fork4.c: Include <string.h>.
9616         * tst-signal2.c: Likewise.
9617         * tst-mutex5.c (do_test): exit -> return.
9618         * tst-mutex2.c: Include <stdlib.h>.
9620 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9622         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9623         (__lll_mutex_timedlock_wait): Correct expected value after
9624         spurious wakeup.  Otherwise we would never wait again.
9626         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9627         zone versus inline asm stupidity.  Use correct instructions.
9629         * tst-rwlock6.c: Add some more status output.
9631 2003-03-15  Roland McGrath  <roland@redhat.com>
9633         * sysdeps/pthread/configure.in: New file.
9634         * sysdeps/pthread/configure: New file (generated).
9636 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9638         * allocatestack.c (allocate_stack): Store the exact stack size of
9639         user allocated stacks.
9641 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9643         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9644         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9645         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9646         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9647         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9648         Use `header.' prefix.
9649         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9651 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9653         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9654         __builtin_frame_address, use stack pointer.
9656         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9657         instead of __builtin_frame_pointer.
9659 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9661         * tst-basic1.c (do_test): Add cast to avoid warning.
9662         * tst-basic2.c (do_test): Likewise.
9664         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9665         amount of stack correction.
9667         * tst-fork4.c: Use test-skeleton.c.
9669 2003-03-14  Roland McGrath  <roland@redhat.com>
9671         * init.c: Fix typo "#eli" for "#else".
9673 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9675         * allocatestack.c (__stack_user): Use hidden_data_def.
9676         * pthread_create.c (__pthread_keys): Likewise.
9678         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9680 2003-03-14  Roland McGrath  <roland@redhat.com>
9682         * tst-fork4.c: New file.
9683         * Makefile (tests): Add it.
9685         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9686         we always define the padding space.
9687         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9688         stopped supporting its own extensions fully.
9689         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9690         struct also called `header', so `header.multiple_threads' is the field
9691         name to use on all machines.
9692         * allocatestack.c (allocate_stack): Use `header.' prefix.
9693         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9694         * pthread_create.c (__pthread_create_2_1): Likewise.
9695         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9696         (THREAD_SELF): Likewise.
9697         * sysdeps/x86_64/tls.h: Likewise.
9698         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9699         (SINGLE_THREAD_P): Likewise.
9700         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9701         (SINGLE_THREAD_P): Likewise.
9702         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9703         (SINGLE_THREAD_P): Likewise.
9705         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9706         value directly.
9708 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9710         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9711         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9713         * pthread_create.c (start_thread): setjmp is expected to return 0.
9715         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9716         (THREAD_GETMEM_NC): Likewise.
9718 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9720         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9721         and the size of the stack which must be allocated is a multiple,
9722         allocate one more page.
9723         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9724         MULTI_PAGE_ALIASING.
9726 2003-03-13  Roland McGrath  <roland@redhat.com>
9728         * pthread_create.c (start_thread): Set EXITING_BIT after the
9729         event-reporting (and destructors), not before.
9731 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9733         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9734         lll_futex_wake): Declare register variables as long int instead of
9735         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9736         Make syscall arguments clobbered by the syscall.
9737         (lll_futex_wait): Define using lll_futex_timed_wait.
9739         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9740         to void *.
9742         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9743         PPID if [! NDEBUG].
9745         * allocatestack.c (nptl_ncreated): Only declare if
9746         COLORING_INCREMENT != 0.
9748         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9749         (__libc_enable_asynccancel_2): Remove prototype.
9751         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9752         ctid to match kernel.
9754 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9756         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9757         libc_multiple_threads.
9758         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9759         __libc_multiple_threads to...
9760         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9762         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9763         versioning.
9764         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9765         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9767         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9768         (__pthread_once_internal): Define.
9770         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9771         macros instead of .symver directly.
9772         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9773         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9775         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9776         * sysdeps/x86_64/tcb-offsets.sym: New file.
9777         * sysdeps/x86_64/Makefile: New file.
9779         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9780         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9781         to access own pthread_t in TCB.
9782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9783         Likewise.
9784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9785         Likewise.
9786         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9788 2003-03-12  Roland McGrath  <roland@redhat.com>
9790         * pthread-errnos.sym: New file.
9791         * Makefile (gen-as-const-headers): New variable, list that file.
9792         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9793         header <pthread-errnos.h> instead of defining errno values here.
9794         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9795         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9796         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9797         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9798         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9799         Likewise.
9800         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9801         Likewise.
9802         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9803         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9804         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9805         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9806         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9807         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9808         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9809         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9811         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9812         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9813         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9814         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9815         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9816         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9817         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9818         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9819         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9820         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9821         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9822         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9823         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9824         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9825         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9826         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9827         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9828         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9830         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9831         CLONE_CHILD_SETTID worked.
9833 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9836         file.
9837         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9838         file.
9840         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9841         (pthread_cond_t): Add padding.
9843         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9844         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9845         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9847         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9848         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9849         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9850         (__pthread_rwlock_timedrdlock): Likewise.
9851         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9852         (__pthread_rwlock_wrlock): Likewise.
9853         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9854         (__pthread_rwlock_rdlock): Likewise.
9856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9858         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9859         result of lock re-get if it fails.
9861 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9863         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9864         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9865         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9868         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9869         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9870         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9871         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9872         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9874         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9875         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9877         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9878         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9879         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9880         (create_thread): Likewise.
9881         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9882         * init.c (__pthread_initialize_minimal_internal): Initialize
9883         __libc_multiple_threads_ptr if necessary.
9884         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9885         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9886         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9887         __libc_multiple_threads.
9888         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9889         necessary.
9891         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9892         (THREAD_SETMEM_NC): Likewise.
9894         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9895         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9896         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9897         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9899         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9900         Eliminate one entire instruction.
9902         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9903         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9905         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9906         instead of __pthread_enable_asynccancel.
9907         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9908         (__pthread_cond_wait): Likewise.
9909         * sysdeps/pthread/pthread_cond_timedwait.c
9910         (__pthread_cond_timedwait): Likewise.
9911         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9914         (__condvar_cleanup): Wake up all waiters in case we got signaled
9915         after being woken up but before disabling asynchronous
9916         cancellation.
9917         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9918         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9919         (__condvar_cleanup): Likewise.
9921         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9922         Make it an error if architecture has no #if case.  Add x86-64.
9924         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9925         pt-initfini.s generation.
9927         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9928         (TLS_INIT_TP): Fix typo.
9930 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9932         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9933         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9935         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9936         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9937         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9938         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9939         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9940         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9941         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9942         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9944 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9946         * sysdeps/pthread/pthread_cond_timedwait.c
9947         (__pthread_cond_timedwait): Return the result of the final
9948         locking.  If it succeeds, the regular function return value.
9950         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9951         Return result of the final locking.
9952         * version.c (__nptl_main): Work around problems with the strange
9953         INTERNAL_SYSCALL macro on ppc32.
9954         * init.c (__pthread_initialize_minimal_internal): Unblock
9955         SIGCANCEL in case the parent blocked it.
9956         Reported by Paul Mackerras <paulus@samba.org>.
9958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9959         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9960         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9962 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9964         * sysdeps/pthread/pthread_cond_timedwait.c
9965         (__pthread_cond_timedwait): Unlock and fail if
9966         __pthread_mutex_unlock_internal failed.
9968         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9969         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9970         Use ARCH_CLONE.
9971         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9972         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9973         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9974         ALLOCATE_STACK): New macros.
9975         (TLS_TPADJ): New macro.
9976         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9977         (allocate_stack): Handle TLS_DTV_AT_TP and
9978         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9979         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9980         Don't set PD->self.
9981         * init.c [__ia64__] (__NR_set_tid_address): Define.
9983         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9984         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9985         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9986         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9987         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9988         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9989         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9990         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9991         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9992         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9993         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9994         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9995         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9996         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9997         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9998         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9999         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10000         * sysdeps/ia64/bits/atomic.h: New file.
10001         * sysdeps/ia64/Makefile: New file.
10002         * sysdeps/ia64/pthread_spin_init.c: New file.
10003         * sysdeps/ia64/pthread_spin_lock.c: New file.
10004         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10005         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10006         * sysdeps/ia64/pthreaddef.h: New file.
10007         * sysdeps/ia64/tcb-offsets.sym: New file.
10008         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10009         * sysdeps/ia64/tls.h: New file.
10011         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10012         to syscall instead of no arguments.
10014 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10016         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10017         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10018         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10019         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10021         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10022         unused code.
10024         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10026         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10027         lowlevelbarrier.sym.
10028         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10029         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10030         Include lowlevelbarrier.h and don't define offsets locally.
10031         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10033         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10034         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10035         (__lll_mutex_timedlock_wait): Likewise.
10036         (lll_mutex_lock): Adjust asm for that.
10037         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10038         (lll_lock): Adjust asm for operand order change.
10039         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10040         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10042         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10043         Reverse order of parameters.
10044         (__lll_timedwait_tid): Remove regparms attribute.
10045         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10046         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10048         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10049         (__lll_timedwait_tid): Remove one unnecessary instruction.
10051         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10052         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10053         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10054         lowlevelmutex.S.
10056         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10057         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10058         for NOT_IN_libc.
10059         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10060         lowlevellock.S.
10062         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10063         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10064         for libc.so.
10065         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10066         define LOCK here (if UP is not defined).  The actual code is in
10067         lowlevelmutex.S.
10069         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10070         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10071         __lll_timedwait_tid for libc.so.
10072         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10073         define LOCK here (if UP is not defined).  The actual code is in
10074         lowlevellock.S.
10076         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10077         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10078         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10079         instead of lowlevelsem.h.
10080         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10081         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10082         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10084         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10085         lowlevelrwlock.sym.
10086         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10087         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10088         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10090         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10091         register loading.
10092         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10093         last changed.  D'oh.
10095         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10097         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10098         of __libc_locking_needed.
10099         (lll_trylock): Initialize %eax to zero.
10101         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10102         pthread_cond_t definition.
10104 2003-03-10  Roland McGrath  <roland@redhat.com>
10106         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10107         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10108         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10109         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10110         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10112         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10113         Instead of setting PD->multiple_threads, set globals
10114         __pthread_multiple_threads and __libc_multiple_threads.
10115         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10116         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10117         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10119         * descr.h (struct pthread): Conditionalize first member on
10120         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10121         containing an anonymous tcbhead_t.  Move `list' member out.
10122         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10123         * allocatestack.c: Remove use of `header.data.' prefix.
10124         * pthread_create.c: Likewise.
10125         * init.c (__pthread_initialize_minimal_internal): Likewise.
10126         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10127         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10128         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10129         * sysdeps/x86_64/tls.h: Likewise.
10130         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10131         (SINGLE_THREAD_P): Likewise.
10132         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10133         (SINGLE_THREAD_P): Likewise.
10134         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10135         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10137 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10139         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10141         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10142         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10144         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10145         leftovers from the ia32 code.
10147         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10148         memory load.
10149         (clear_once_control): Don't load %esi.
10151         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10152         handling.
10154         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10156         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10157         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10159         * Makefile (tests): Add tst-cond10.
10160         * tst-cond10.c: New file.
10162 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10164         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10165         * tst-signal3.c (do_test): Likewise.
10166         * tst-sem5.c (do_test): Likewise.
10167         * tst-kill6.c (do_test): Likewise.
10168         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10170         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10171         of inc/dec.
10172         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10173         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10174         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10175         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10176         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10177         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10178         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10179         Likewise.
10180         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10181         Likewise.
10182         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10183         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10184         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10187         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10188         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10189         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10191         * allocatestack.c (allocate_stack): If mprotect() fails free the
10192         TLS memory.
10194 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10196         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10198         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10199         lll_wake_tid.  This was used only to work around kernel limits in
10200         the early days.
10201         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10202         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10203         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10204         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10206         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10207         (__pthread_initialize_minimal_internal): Change initialization of
10208         __static_tls_align_m1 appropriately.
10209         * pthreadP.h (__static_tls_align_m1): Renamed from
10210         __static_tls_align.
10211         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10212         instead of __static_tls_align-1.
10214 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10216         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10218         * pthread_create.c: Define __pthread_keys using nocommon
10219         attribute, not by placing it explicitly in bss.
10220         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10222         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10223         Use it in mmap call to allocate stacks.
10225         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10227         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10228         result of the thread function.
10230 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10232         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10233         version is just fine.
10235         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10236         (__pthread_child_handler): Renamed from pthread_child_handler,
10237         exported, and marked hidden.  Change all users.
10238         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10239         free __pthread_child_handler from child list.
10241 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10243         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10245         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10246         Fix handling of cancellation and failing pthread_mutex_unlock call.
10247         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10248         (__pthread_cond_wait): Likewise.
10250         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10251         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10252         lll_futex_timed_wait call.
10253         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10254         (pthread_rwlock_timedwrlock): Likewise.
10256         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10257         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10258         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10260         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10261         check of lll_futex_wake return value.
10263 2003-03-03  Roland McGrath  <roland@redhat.com>
10265         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10267         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10268         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10269         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10271 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10273         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10274         error for CPU clocks.
10276         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10277         _POSIX_MONOTONIC_CLOCK.
10278         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10280         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10281         recent kernels.
10283 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10285         * descr.h (struct pthread): Move cleanup field to the front.
10287 2003-03-01  Roland McGrath  <roland@redhat.com>
10289         * sem_open.c (sem_open): Braino fix.
10291 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10293         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10294         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10295         __pthread_cleanup_pop functionality.
10296         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10298         * descr.h (struct pthread): Move tid field to the front now that
10299         it is often used.
10301         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10302         (__lll_mutex_timedlock_wait): Remove.
10303         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10304         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10305         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10306         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10307         (lll_unlock_wake_cb): Don't save and restore %esi.
10308         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10309         %esi.
10310         (__lll_timedwait_tid): Add alignment.
10311         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10312         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10313         %esi.
10314         (__lll_timedwait_tid): Removed.
10315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10316         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10317         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10318         (pthread_barrier_wait): Don't save, load, and restore %esi for
10319         last thread.
10320         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10321         (__pthread_cond_signal): Don't save, load, and restore %esi.
10322         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10323         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10324         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10325         Don't save, load, and restore %esi.
10327 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10329         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10330         Release lock before waking up the waiters.
10332         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10334         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10335         (reader_thread): Likewise.
10337         * sysdeps/pthread/pthread_rwlock_unlock.c
10338         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10339         to wake up readers if there are none.
10341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10342         Release internal lock before wake threads.
10344 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10346         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10347         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10348         predefined.
10349         * tst-rwlock9.c: Likewise.
10350         * tst-rwlock10.c: New file.
10351         * tst-rwlock11.c: New file.
10353         * Makefile (tests): Add tst-dlsym1.
10354         * tst-dlsym1.c: New file.
10356         * init.c (__pthread_initialize_minimal_internal): Set
10357         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10358         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10360 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10362         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10364         * tst-cond2.c: Fix sychronization with child.
10366         * tst-rwlock8.c (reader_thread): Remove unused variable.
10368         * Makefile: Add rules to build and run tst-tls3.
10369         * tst-tls3.c: New file.
10370         * tst-tls3mod.c: New file.
10372         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10373         * tst-rwlock8.c: New file.
10374         * tst-rwlock9.c: New file.
10375         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10376         complete broken rwlock implementation.
10377         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10378         Likewise.
10379         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10380         Likewise.
10381         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10383         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10384         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10385         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10386         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10387         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10389 2003-02-23  Roland McGrath  <roland@redhat.com>
10391         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10393 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10395         * Makefile (tests): Add tst-context1.
10396         * tst-context1.c: New file.
10398         * Makefile (tests): Add tst-tls1 and tst-tls2.
10399         * tst-tls1.c: New file.
10400         * tst-tls2.c: New file.
10402         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10403         for failed cmpxchg.
10405         * pthread_create.c (start_thread): Set EXITING_BIT early.
10407         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10408         (THREAD_GETMEM_NC): Likewise.
10410 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10412         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10413         off 3 more bytes by using offset-less instructions when possible.
10415         * Makefile: Add dependency for $(objpfx)version.d.
10417         * eintr.c (eintr_source): Add unnecessary return but the compiler
10418         insists.
10420         * tst-kill3.c: Include <unistd.h>.
10422 2003-02-21  Roland McGrath  <roland@redhat.com>
10424         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10426 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10428         * Makefile (tests): Add tst-eintr1.
10429         (distribute): Add eintr.c.
10430         * tst-eintr1.c: New file.
10431         * eintr.c: New file.
10433         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10435         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10436         Disallow sending SIGCANCEL.
10438         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10439         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10440         * tst-kill1.c: New file.
10441         * tst-kill2.c: New file.
10442         * tst-kill3.c: New file.
10443         * tst-kill5.c: New file.
10444         * tst-kill6.c: New file.
10445         * tst-basic7.c: Renamed to...
10446         * tst-kill4.c: ...this.
10448 2003-02-21  Roland McGrath  <roland@redhat.com>
10450         * Makefile (install-lib-ldscripts): New variable.
10452 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10454         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10455         * pthread_cancel.c: Use INVALID_TD_P.
10456         * pthread_detach.c: Likewise.
10457         * pthread_getschedparam.c: Likewise.
10458         * pthread_setschedparam.c: Likewise.
10459         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10460         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10461         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10462         * pthread_timedjoin.c: Likewise.
10464         * tst-basic7.c: Include <signal.h>.
10466         * pthread_join.c (pthread_join): Limited checking for invalid
10467         descriptors.
10468         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10470 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10472         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10473         beginning of the loop.  Clear the entire first block of TSD.
10474         * Makefile (tests): Add tst-key4.
10475         * tst-key4.c: New file.
10477 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10479         * Makefile (tests): Add tst-basic7.
10480         * tst-basic7.c: New file.
10482         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10483         Add some more __builtin_expect.
10485         * pthreadP.h: Define dummy version of DEBUGGING_P.
10487 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10489         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10490         _POSIX_THREAD_PRIORITY_SCHEDULING.
10491         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10492         _XOPEN_REALTIME_THREADS.
10493         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10495         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10496         kernel returns EINVAL for PID <= 0, work around it.
10498         * Makefile (tests): Add tst-signal5.
10499         * tst-signal5.c: New file.
10501         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10502         and LOGIN_NAME_MAX.
10504         * tst-cancel1.c (tf): Block all signals.
10506         * Makefile (tests): Add tst-basic6.
10507         * tst-basic6.c: New file.
10509         * tst-basic1.c: Add test for process ID.
10511         * Makefile (tests): Add tst-cancel10.
10512         * tst-cancel10.c: New file.
10514         * Makefile (tests): Add tst-signal4.
10515         * tst-signal4.c: New file.
10517         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10518         __sigismember instead of sigismember.  Add __builtin_expect.
10520 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10522         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10523         pthread_setcancelstate, and pthread_rwlock_setpshared.
10525         * tst-cancel7.c (do_test): Make sure the pid file exists before
10526         canceling the thread.
10528         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10529         pthread_rwlock_timedrdlock tests.
10530         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10531         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10532         Check for invalid tv_nsec field.
10533         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10534         Likewise.
10536         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10537         recursive mutex of overflow.
10539         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10541         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10542         going into an endless loop.
10543         * Makefile (tests): Add tst-cancel9.
10544         * tst-cancel9.c: New file.
10546         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10548 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10550         * tst-mutex5.c (do_test): Add more timedlock tests.
10552         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10553         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10555         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10556         use INLINE_SYSCALL.  Error number is returned, not -1.
10558         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10559         and __deallocate_stack with internal_function.
10560         * pthread_create.c: Adjust definitions appropriately.
10561         * allocatestack.c: Likewise.
10563         * pthread_join.c: Add one more __builtin_expect.
10564         * pthread_timedjoin.c: Likewise.
10566         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10567         not data of sequence number does not match.
10568         Add one __builtin_expect.
10570         * Makefile (tests): Add tst-clock1.
10571         * tst-clock1.c: New file.
10573         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10574         negative arguments.
10575         * Makefile (tests): Add tst-basic5.
10576         * tst-basic5.c: New file.
10578 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10580         * Makefile (tests): Add tst-basic4.
10581         * tst-basic4.c: New file.
10583         * pthreadP.h: Add declaraction for __nptl_nthreads.
10584         * pthread_create.c: Define __nptl_nthreads
10585         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10586         after thread is done.  If then zero, call exit(0).
10587         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10588         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10589         * init.c (pthread_functions): Initialize ptr_nthreads.
10590         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10591         (__reclaim_stacks): Decrement __nptl_nthreads.
10592         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10593         Define.
10594         * Makefile (tests): Add tst-basic3.
10595         * tst-basic3.c: New file.
10597         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10598         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10599         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10600         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10601         if asynchronous canceling is enabled.
10602         * pthread_join.c (pthread_join): When recognizing circular joins,
10603         take into account the other thread might be already canceled.
10604         * Makefile (tests): Add tst-join5.
10605         * tst-join5.c: New file.
10607         * Makefile (tests): Add tst-join4.
10608         * tst-join4.c: New file.
10610 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10612         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10614 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10616         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10617         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10618         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10619         warning.
10620         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10621         to avoid warning.
10622         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10623         error if lll_futex_wake failed.
10625 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10628         handling of cancellation and failung pthread_mutex_unlock call.
10629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10630         * Makefile (tests): Add tst-cond8 and tst-cond9.
10631         * tst-cond8.c: New file.
10632         * tst-cond9.c: New file.
10634         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10636         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10637         non-standard initializers with __USE_GNU.
10639         * Makefile (tests): Add tst-cleanup3.
10640         * tst-cleanup3.c: New file.
10642 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10644         * Makefile (tests): Add tst-attr1 and tst-attr2.
10645         * tst-attr1.c: New file.
10646         * tst-attr2.c: New file.
10648         * Makefile: Add rules to build and run tst-atfork2 test.
10649         * tst-atfork2.c: New file.
10650         * tst-atfork2mod.c: New file.
10652         * sysdeps/unix/sysv/linux/unregister-atfork.c
10653         (__unregister_atfork): Free the memory allocated for the handlers
10654         after removing them from the lists.
10656         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10657         cleanup function.
10659         * tst-atfork1.c (do_test): Wait for the child we forked.
10660         Report error in child.
10662         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10664         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10666 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10668         * Makefile (tests): Add tst-cancel8.
10669         * tst-cancel8.c: New file.
10671         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10672         clearing of control variable.
10673         * Makefile (tests): Add tst-once3 and tst-once4.
10674         * tst-once3.c: New file.
10675         * tst-once4.c: New file.
10677 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10679         * sysdeps/sh/Makefile: New file.
10680         * sysdeps/sh/bits/atomic.h: New file.
10681         * sysdeps/sh/pthread_spin_init.c: New file.
10682         * sysdeps/sh/pthread_spin_lock.c: New file.
10683         * sysdeps/sh/pthread_spin_trylock.S: New file.
10684         * sysdeps/sh/pthread_spin_unlock.S: New file.
10685         * sysdeps/sh/pthreaddef.h: New file.
10686         * sysdeps/sh/tcb-offsets.sym: New file.
10687         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10688         * sysdeps/sh/tls.h: New file.
10689         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10690         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10691         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10692         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10693         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10694         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10695         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10696         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10697         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10698         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10699         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10700         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10701         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10702         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10703         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10704         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10705         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10706         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10707         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10708         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10709         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10710         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10711         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10712         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10713         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10714         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10715         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10716         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10717         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10718         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10720 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10722         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10723         according to POSIX.
10725         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10727 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10729         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10730         (TLS_GET_FS): New #define.
10731         (TLS_SET_FS): New #define.
10732         Correct value of __NR_set_thread_area.
10734         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10736 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10738         * Makefile (tests): Add tst-popen1.
10739         * tst-popen1.c: New file.
10741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10742         but inactive generalization.
10743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10744         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10745         Minor optimization, remove one instruction.
10746         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10748 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10750         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10752 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10754         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10755         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10756         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10757         * sysdeps/pthread/pthread_cond_signal.c: New file.
10758         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10759         * sysdeps/pthread/pthread_cond_wait.c: New file.
10760         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10761         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10762         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10763         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10764         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10765         * sysdeps/s390/Makefile: New file.
10766         * sysdeps/s390/bits/atomic.h: New file.
10767         * sysdeps/s390/pthread_spin_init.c: New file.
10768         * sysdeps/s390/pthread_spin_lock.c: New file.
10769         * sysdeps/s390/pthread_spin_trylock.c: New file.
10770         * sysdeps/s390/pthread_spin_unlock.c: New file.
10771         * sysdeps/s390/pthreaddef.h: New file.
10772         * sysdeps/s390/tcb-offsets.sym: New file.
10773         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10774         * sysdeps/s390/tls.h: New file.
10775         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10776         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10777         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10778         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10779         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10780         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10781         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10782         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10783         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10784         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10785         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10786         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10787         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10788         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10789         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10790         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10791         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10792         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10793         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10794         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10795         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10796         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10797         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10799 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10801         * atomic.h: Add a couple more default implementations.
10802         (atomic_compare_and_exchange_acq): Use
10803         __arch_compare_and_exchange_32_acq in return value definition.  It
10804         always exists.
10805         (atomic_bit_set): Renamed from atomic_set_bit.
10806         Add missing atomic_ prefixes.
10808         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10809         thread library is available, use correct value to mark initialized
10810         once variable.
10812 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10814         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10815         __sysconf to determine pagesize.
10817         * pthread_create.c: Include <atomic.h>.
10818         * allocatestack.c (allocate_stack): Implement coloring of the
10819         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10820         size minus one.  Adjust users.
10821         * sysdeps/i386/i686/Makefile: New file.
10823 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10825         * allocatestack.c: Improve comment throughout the file.
10827         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10828         (__lll_lock_wait): Add branch prediction.
10829         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10830         (__lll_lock_wait): Likewise.
10831         (lll_unlock_wake_cb): Removed.
10833 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10835         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10836         _POSIX_THREAD_PRIORITY_SCHEDULING.
10838 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10840         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10841         Fix return type of ptr___pthread_getspecific.
10843 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10845         * Makefile (tests): Add tst-umask1.
10846         (tst-umask1-ARGS): Define.
10847         * tst-umask1.c: New file.
10849 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10851         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10852         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10853         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10854         pthread_rwlock_unlock.
10855         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10856         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10857         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10858         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10859         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10860         New file.
10861         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10862         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10863         New file.
10864         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10865         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10866         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10867         New file.
10868         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10869         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10870         New file.
10871         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10872         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10873         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10874         New file.
10875         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10876         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10877         New file.
10878         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10880         * Makefile (libpthread-routines): Remove lowlevelcond and
10881         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10882         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10883         and pthread_cond_broadcast.
10884         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10885         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10886         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10887         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10888         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10889         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10890         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10891         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10892         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10893         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10894         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10897         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10898         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10899         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10900         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10901         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10902         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10903         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10904         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10905         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10906         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10907         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10908         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10909         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10910         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10911         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10912         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10913         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10914         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10916         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10917         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10918         of the code is moved to ...
10919         * sysdeps/pthread/createthread.c: ...here.  New file.
10921 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10923         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10924         (__new_sem_post): Clear %eax before returning.
10925         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10927         * Makefile (tests): Add tst-cleanup2.
10928         * tst-cleanup2.c: New file.
10930         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10931         Interpret first parameter correctly.
10933 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10935         * Makefile (headers): Add bits/semaphore.h.
10937 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10939         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10940         if not SHARED.
10942 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10944         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10945         must be used and mapping failed.
10946         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10948         * Makefile (CFLAGS-pthread_self.os): Define this, not
10949         CFLAGS-pthread_self.c.
10951 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10953         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10954         lll_unlock_wake_cb.
10956         * Makefile (libpthread-routines): Add version.  Add rules to build
10957         version.os and banner.h.
10958         * version.c: New file.
10960 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10962         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10963         the alias unconditional.
10964         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10966 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10968         * Makefile (CFLAGS-pthread_self.c): New definition.
10970 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10972         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10973         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10974         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10975         * init.c (__pthread_initialize_minimal_internal): Likewise.
10977 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10979         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10981         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10982         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10983         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10984         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10985         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10986         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10988 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10990         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10991         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10992         * tst-cancel-wrappers.sh: Remove all exceptions.
10994 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10996         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10997         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10999         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11000         Use __libc_pthread_functions array if SHARED.
11002         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11003         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11005         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11006         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11007         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11008         __libc_ptf_call instead of __libc_maybe_call.
11009         (PTF): New #define.
11010         (__libc_cleanup_region_start): Wrap function name with PTF call.
11011         (__libc_cleanup_region_end): Likewise.
11012         (__libc_cleanup_end): Likewise.
11014         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11015         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11016         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11017         * pthreadP.h: Add prototypes.
11019         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11020         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11021         __pthread_rwlock_unlock aliases.
11022         * pthreadP.h: Add prototypes for new aliases.
11024         * pthreadP.h (struct pthead_functions): Moved to...
11025         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11026         * init.c (pthread_functions): Add initializers for new elements.
11028         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11029         __pthread_cleanup_pop_restore aliases.
11030         * pthreadP.h: Add prototypes.
11032         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11033         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11034         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11035         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11036         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11037         * pthreadP.h: Adjust prototypes and callers.
11039 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11041         * Makefile (tests): Add tst-cancel7.
11042         (tst-cancel7-ARGS): New variable.
11043         * tst-cancel7.c: New file.
11045         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11046         around gcc defficiencies.
11047         * old_pthread_cond_signal.c: Likewise.
11048         * old_pthread_cond_timedwait.c: Likewise.
11049         * old_pthread_cond_wait.c: Likewise.
11051         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11053 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11055         * Makefile (tests): Add tst-cond7.
11056         * tst-cond7.c: New file.
11058         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11059         (condvar_cleanup): Get condvar address from the right place.
11061         * atomic.h: Correct definitions of atomic_full_barrier,
11062         atomic_read_barrier, atomic_write_barrier.
11064         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11065         race-free.
11066         * old_pthread_cond_signal.c: Likewise.
11067         * old_pthread_cond_timedwait.c: Likewise.
11068         * old_pthread_cond_wait.c: Likewise.
11070 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11072         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11074 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11076         * pthreadP.h (pthread_cond_2_0_t): New type.
11077         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11078         Use new type for the 2.0 condvar function prototypes.
11079         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11080         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11081         parameter.
11082         * old_pthread_cond_destroy.c: Likewise.
11083         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11084         * old_pthread_cond_signal.c: Likewise.
11085         * old_pthread_cond_timedwait.c: Likewise.
11086         * old_pthread_cond_wait.c: Likewise.
11088         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11089         (__pthread_cond_wait): Don't save cancellation mode and seq value
11090         in same location.
11092         * herrno.c (__h_errno_location): Don't define as weak.
11094 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11096         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11097         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11098         and pthread_cond_wait.
11099         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11100         Renamed to...
11101         (__pthread_cond_broadcast_2_0): ... this.
11102         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11103         Renamed to...
11104         (__pthread_cond_destroy_2_0): ... this.
11105         * old_pthread_cond_init.c (__old_pthread_cond_init):
11106         Renamed to...
11107         (__pthread_cond_init_2_0): ... this.
11108         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11109         Renamed to...
11110         (__pthread_cond_signal_2_0): ... this.
11111         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11112         Renamed to...
11113         (__pthread_cond_wait_2_0): ... this.
11114         * pthread_cond_destroy.c: Include shlib-compat.h.
11115         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11116         * pthread_cond_init.c: Include shlib-compat.h.
11117         (pthread_cond_init): Change strong_alias into versioned_symbol.
11118         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11119         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11120         fields.
11121         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11122         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11123         __pthread_cond_wait_2_0): New prototypes.
11124         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11125         __old_pthread_cond_init, __old_pthread_cond_signal,
11126         __old_pthread_cond_wait): Removed.
11127         * init.c: Include shlib-compat.h.
11128         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11129         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11130         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11131         ptr___pthread_cond_*_2_0 fields.
11132         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11133         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11135         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11136         LIBC_SIGACTION was not yet defined.
11137         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11138         [!defined LIBC_SIGACTION] (__sigaction): New function and
11139         libc_hidden_weak.
11140         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11141         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11143 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11145         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11147 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11149         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11150         New, larger type definition.
11151         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11152         implementation.
11153         * Versions [libpthread]: Add definitions for new pthread_cond_*
11154         interfaces for version GLIBC_2.3.2.
11155         * pthread_cond_init.c: Update initialization for new type definition.
11156         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11157         pthread_cond_timedwait, pthread_cond_signal, and
11158         pthread_cond_broadcast.  Add old_pthread_cond_init,
11159         old_pthread_cond_destroy, old_pthread_cond_wait,
11160         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11161         old_pthread_cond_broadcast.
11162         * old_pthread_cond_broadcast.c: New file.
11163         * old_pthread_cond_destroy.c: New file.
11164         * old_pthread_cond_init.c: New file.
11165         * old_pthread_cond_signal.c: New file.
11166         * old_pthread_cond_timedwait.c: New file.
11167         * old_pthread_cond_wait.c: New file.
11168         * pthreadP.h: Add prototypes for the compatibility interfaces.
11170         * pthread_cond_destroy.c: Don't include <errno.h>.
11172 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11174         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11175         unnecessary zero offset when addressing MUTEX.
11177 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11179         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11180         __register_atfork.
11181         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11182         for __register_atfork.
11184 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11186         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11187         instead of ASSEMBLER test macro.
11189         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11190         __libc_current_sigrtmax): Add libc_hidden_def.
11192         * sysdeps/pthread/list.h: Remove assert.h include.
11194 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11196         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11197         __pthread_initialize_minimal_internal not
11198         __pthread_initialize_minimal.
11200 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11202         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11203         __pthread_initialize_minimal as hidden.
11205         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11206         constructor.
11208 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11210         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11211         $(common-objpfx)format.lds, include that into the output script.
11212         Fix comment.
11213         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11215 2002-12-28  Andreas Jaeger  <aj@suse.de>
11217         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11218         nsec resolution changes.
11219         (xstat64_conv): Likewise.
11220         (xstat32_conv): Likewise.
11221         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11222         struct kernel_stat.
11223         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11224         structs stat and stat64.
11225         * time/time.h (__timespec_defined): Define for __USE_MISC.
11226         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11228 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11230         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11231         argument.
11232         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11233         (pthread_exit): Use strong_alias to avoid warnings.
11234         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11235         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11236         ptr___pthread_attr_init_2_*.
11237         * init.c (pthread_functions): Adjust.
11239 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11241         * forward.c: Make all functions available by default again.  It
11242         caused too much trouble.
11244         * pt-siglongjmp.c: Removed.
11246 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11248         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11249         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11250         * sysdeps/i386/Makefile: New file.
11251         * sysdeps/i386/tcb-offsets.sym: New file.
11252         * sysdeps/pthread/tcb-offsets.h: New file.
11253         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11254         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11256         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11257         __register_atfork...
11258         (GLIBC_2.3.2): ...here.
11260 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11262         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11263         pthread_attr_setstackaddr with __attribute_deprecated__.
11265 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11267         * pt-system.c (system): Remove cancellation handling.
11268         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11269         cancellation routines.
11271 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11273         * descr.h: Include <dl-sysdep.h>.
11274         (struct pthread): Move header.data.list to the back of the struct.
11275         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11276         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11277         (SYSINFO_OFFSEET): Likewise.
11279 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11281         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11282         Define.
11283         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11284         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11285         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11286         (USE_DL_SYSINFO): Undef.
11288 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11290         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11291         $(common-objpfx)libc.so.
11292         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11293         it is bigger than pipe buffer size even on arches with bigger
11294         page size.
11295         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11297 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11299         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11300         correct errno access for case that USE___THREAD is not defined.
11302 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11304         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11305         Patch by Marijn Ros <marijn@mad.scientist.com>.
11307 2002-12-22  Roland McGrath  <roland@redhat.com>
11309         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11311 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11313         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11315 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11317         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11318         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11319         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11321         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11322         of int $0x80.
11323         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11324         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11325         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11326         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11327         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11328         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11329         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11330         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11332         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11333         sysenter.
11334         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11336         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11338         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11339         in new TCB.
11340         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11341         that sysinfo is properly initialized.
11342         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11343         to 1 only for ld.so.
11345         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11346         RTLD_CORRECT_DYNAMIC_WEAK.
11348 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11350         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11351         Use return 0 as 6th argument to FORWARD4.
11352         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11354 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11356         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11357         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11358         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11359         (INIT_SYSINFO): New #define.
11360         (TLS_TP_INIT): Use INIT_SYSINFO.
11361         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11362         At test to make sure SYSINFO_OFFSET value is correct.
11363         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11365 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11367         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11368         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11369         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11370         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11371         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11372         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11373         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11375 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11377         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11378         macro instead of using int $0x80 directly.
11380         * sysdeps/pthread/bits/stdio-lock.h: New file.
11381         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11382         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11383         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11384         * Makefile (routines): Add libc-lowlevelmutex.
11386         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11387         __i686.get_pc_thunk.dx.
11389 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11391         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11392         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11393         ($(objpfx)tst-cancel-wrappers.out): New rule.
11394         * tst-cancel-wrappers.sh: New test.
11395         * tst-locale1.c: Include signal.h.
11396         (uselocale): Test static linking of __libc_current_sigrt*.
11398 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11400         * Makefile (tests): Add tst-cancel6.
11401         * tst-cancel6.c: New file
11403 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11405         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11406         Define meaningfully for assembler as well.
11407         * pthreadP.h (struct pthread_functions): Remove
11408         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11409         and ptr_pthread_attr_init_2_1 fields.
11410         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11411         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11412         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11413         (FORWARD3): Define using FORWARD4.
11414         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11415         versions.
11416         * pt-system.c: Remove duplicate stdlib.h include.
11418 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11420         * sem_init.c: Define sem_init@GLIBC_2.0.
11421         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11422         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11424         * flockfile.c: Moved to...
11425         * sysdeps/pthread/flockfile.c: ...here.  New file.
11426         * funlockfile.c: Moved to...
11427         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11428         * ftrylockfile.c: Moved to...
11429         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11431 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11433         * libc-cancellation.c: Guard both function with
11434         #if !defined NOT_IN_libc.
11435         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11436         automatically provided pthread wrappers.
11437         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11438         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11439         nor in libpthread.
11440         * pt-open.c: Removed.
11441         * pt-fcntl.c: Removed.
11442         * pt-fsync.c: Removed.
11443         * pt-lseek.c: Removed.
11444         * pt-msgrcv.c: Removed.
11445         * pt-msgsnd.c: Removed.
11446         * pt-msync.c: Removed.
11447         * pt-nanosleep.c: Removed.
11448         * pt-open64.c: Removed.
11449         * pt-pause.c: Removed.
11450         * pt-pread.c: Removed.
11451         * pt-pread64.c: Removed.
11452         * pt-pwrite.c: Removed.
11453         * pt-pwrite64.c: Removed.
11454         * pt-read.c: Removed.
11455         * pt-recv.c: Removed.
11456         * pt-recvfrom.c: Removed.
11457         * pt-recvmsg.c: Removed.
11458         * pt-send.c: Removed.
11459         * pt-sendto.c: Removed.
11460         * pt-sigtimedwait.c: Removed.
11461         * pt-sigwait.c: Removed.
11462         * pt-wait.c: Removed.
11463         * pt-waitpid.c: Removed.
11464         * pt-write.c: Removed.
11465         * pt-accept.c: Removed.
11466         * pt-close.c: Removed.
11467         * pt-connect.c: Removed.
11468         * pt-lseek64.c: Removed.
11469         * pt-sendmsg.c: Removed.
11470         * pt-tcdrain.c: Removed.
11472 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11474         * init.c (__pthread_initialize_minimal_internal): Renamed from
11475         __pthread_initialize_minimal.  Make old name an alias.  This
11476         converts a normal relocation into a relative relocation.
11478         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11480         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11481         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11482         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11483         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11484         pt-sigwaitinfo, pt-waitid, and pt-writev.
11485         * pt-creat.c: Removed.
11486         * pt-poll.c: Removed.
11487         * pt-pselect.c: Removed.
11488         * pt-readv.c: Removed.
11489         * pt-select.c: Removed.
11490         * pt-sigpause.c: Removed.
11491         * pt-sigsuspend.c: Removed.
11492         * pt-sigwaitinfo.c: Removed.
11493         * pt-waitid.c: Removed.
11494         * pt-writev.c: Removed.
11496         * init.c (pthread_functions): New variable.
11497         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11498         (or NULL) to __libc_pthread_init.
11499         * forward.c: Rewrite to use __libc:pthread_functions array to get
11500         function addresses.
11501         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11502         prototype.
11503         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11504         Take new parameter.  Copy content of variable pointed to by it
11505         to __libc_pthread_init.
11507         * pthreadP.h (struct pthread_functions): New type.
11508         (__libc_pthread_init): Declare.
11510         * pthread_attr_destroy.c: Add namespace protected alias.
11511         * pthread_attr_getdetachstate.c: Likewise.
11512         * pthread_attr_getinheritsched.c: Likewise.
11513         * pthread_attr_getschedparam.c: Likewise.
11514         * pthread_attr_getschedpolicy.c: Likewise.
11515         * pthread_attr_getscope.c: Likewise.
11516         * pthread_attr_setdetachstate.c: Likewise.
11517         * pthread_attr_setinheritsched.c: Likewise.
11518         * pthread_attr_setschedparam.c: Likewise.
11519         * pthread_attr_setschedpolicy.c: Likewise.
11520         * pthread_attr_setscope.c: Likewise.
11521         * pthread_cond_broadcast.c: Likewise.
11522         * pthread_cond_destroy.c: Likewise.
11523         * pthread_cond_init.c: Likewise.
11524         * pthread_cond_signal.c: Likewise.
11525         * pthread_cond_wait.c: Likewise.
11526         * pthread_condattr_destroy.c: Likewise.
11527         * pthread_condattr_init.c: Likewise.
11528         * pthread_equal.c: Likewise.
11529         * pthread_exit.c: Likewise.
11530         * pthread_getschedparam.c: Likewise.
11531         * pthread_self.c: Likewise.
11532         * pthread_setcancelstate.c: Likewise.
11533         * pthread_setschedparam.c: Likewise.
11534         * pthread_mutex_destroy.c: Likewise.
11535         * pthread_mutex_init.c: Likewise.
11536         * pthreadP.h: Add prototypes for the aliases.
11538         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11539         multiple_threads member in correct TCB to 1.
11541         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11542         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11543         member of thread decriptor, otherwise return unconditionally 1.
11545 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11547         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11548         regular Linux version.  Remove file.
11549         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11550         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11551         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11552         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11553         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11554         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11555         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11556         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11557         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11558         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11559         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11560         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11561         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11562         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11563         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11564         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11565         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11566         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11567         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11568         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11569         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11570         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11571         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11572         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11573         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11574         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11575         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11576         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11577         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11578         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11580 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11582         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11583         * sysdeps/unix/sysv/linux/open.c: Removed.
11584         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11585         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11586         * sysdeps/unix/sysv/linux/msync.c: Removed.
11587         * sysdeps/unix/sysv/linux/read.c: Removed.
11588         * sysdeps/unix/sysv/linux/close.c: Removed.
11589         * sysdeps/unix/sysv/linux/creat.c: Removed.
11590         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11591         * sysdeps/unix/sysv/linux/pause.c: Removed.
11592         * sysdeps/unix/sysv/linux/select.c: Removed.
11593         * sysdeps/unix/sysv/linux/write.c: Removed.
11595 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11597         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11598         element in TCB to see whether locking is needed.
11600         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11601         MULTIPLE_THREADS_OFFSET value is correct.
11603         * sysdeps/unix/sysv/linux/close.c: New file.
11604         * sysdeps/unix/sysv/linux/connect.S: New file.
11605         * sysdeps/unix/sysv/linux/creat.c: New file.
11606         * sysdeps/unix/sysv/linux/fsync.c: New file.
11607         * sysdeps/unix/sysv/linux/llseek.c: New file.
11608         * sysdeps/unix/sysv/linux/lseek.c: New file.
11609         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11610         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11611         * sysdeps/unix/sysv/linux/msync.c: New file.
11612         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11613         * sysdeps/unix/sysv/linux/open.c: New file.
11614         * sysdeps/unix/sysv/linux/open64.c: New file.
11615         * sysdeps/unix/sysv/linux/pause.c: New file.
11616         * sysdeps/unix/sysv/linux/poll.c: New file.
11617         * sysdeps/unix/sysv/linux/pread.c: New file.
11618         * sysdeps/unix/sysv/linux/pread64.c: New file.
11619         * sysdeps/unix/sysv/linux/pselect.c: New file.
11620         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11621         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11622         * sysdeps/unix/sysv/linux/readv.c: New file.
11623         * sysdeps/unix/sysv/linux/recv.S: New file.
11624         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11625         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11626         * sysdeps/unix/sysv/linux/select.c: New file.
11627         * sysdeps/unix/sysv/linux/send.S: New file.
11628         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11629         * sysdeps/unix/sysv/linux/sendto.S: New file.
11630         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11631         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11632         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11633         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11634         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11635         * sysdeps/unix/sysv/linux/system.c: New file.
11636         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11637         * sysdeps/unix/sysv/linux/wait.c: New file.
11638         * sysdeps/unix/sysv/linux/waitid.c: New file.
11639         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11640         * sysdeps/unix/sysv/linux/writev.c: New file.
11641         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11643         * pt-readv.c: Fix comment.
11645 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11647         * tst-cleanup1.c: Include stdlib.h.
11649         * tst-cancel5.c: New test.
11650         * Makefile (tests): Add tst-cancel5.
11651         (tst-cancel5): Link against libc.so libpthread.so in that order.
11653 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11655         * forward.c (test_loaded): Prevent recursive calls.
11657         * Makefile (routines): Add libc-cancellation.
11658         * libc-cancellation.c: New file.
11659         * descr.h (struct pthread): Add multiple_threads field.
11660         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11661         new thread descriptor to 1.
11662         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11663         Initialize multiple_thread field after successful thread creation.
11664         * cancellation.c (__do_cancel): Move to pthreadP.h.
11665         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11666         (__pthread_disable_asynccancel): Add internal_function attribute.
11667         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11668         * pthread_setcancelstate.c: Likewise.
11669         * pthread_setcanceltype.c: Likewise.
11670         * pthread_exit.c: Likewise.
11671         * pthreadP.h (CANCELLATION_P): Likewise.
11672         (__do_cancel): Define as static inline.
11673         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11674         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11675         declarations.
11676         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11677         fields.  Define MULTIPLE_THREADS_OFFSET.
11678         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11679         declaration.
11680         * sysdeps/unix/sysv/linux/accept.S: New file.
11681         * sysdeps/unix/sysv/linux/read.c: New file.
11682         * sysdeps/unix/sysv/linux/write.c: New file.
11683         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11684         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11685         initialization of __libc_locking_needed.
11686         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11687         __libc_locking_needed, use multiple_threads field in TCB.
11688         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11690 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11692         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11693         version.
11694         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11696         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11697         access to __libc_locking_needed for PIC.
11699 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11701         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11702         declare for libc.so.
11703         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11704         expression.
11705         (__libc_lock_lock): Put into statement expression.
11706         (__libc_lock_unlock): Remove trailing semicolon.
11707         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11709 2002-12-12  Roland McGrath  <roland@redhat.com>
11711         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11712         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11714 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11716         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11717         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11718         Initialize __libc_locking_needed.
11719         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11720         instead of __register_pthread_fork_handler.
11721         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11722         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11723         fork-gen with libc_pthread_init.
11724         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11725         of __register_pthread_fork_handler.
11726         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11727         of __register_pthread_fork_handler.
11728         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11729         __libc_locking_needed to determine whether lock prefix can be avoided.
11730         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11732 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11734         * Makefile (tests): Add tst-cleanup1.
11735         * tst-cleanup1.c: New file.
11736         * cancellation.c (__cleanup_thread): Removed.
11737         (__do_cancel): Remove call to __cleanup_thread.
11738         * pthreadP.h: Remove __cleanup_thread prorotype.
11740         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11741         Remember function and argument even if cancellation handler
11742         function is not available.
11743         (__libc_cleanup_region_end): Execute registered function directly if
11744         pthread functions are not available.
11745         (__libc_cleanup_end): Likewise.
11747         * init.c (__pthread_initialize_minimal): Fix initialization in
11748         static lib by preventing gcc from being too clever.
11750 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11752         * init.c (__pthread_initialize_minimal): Remove unneccesary
11753         sigaddset call.
11755         * Makefile (tests): We can run tst-locale2 now.
11757 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11759         * Versions: Remove duplicated sigwait entry.
11761 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11763         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11764         inside libpthread.
11766         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11768         * pthreadP.h: Declare __pthread_enable_asynccancel and
11769         __pthread_disable_asynccancel.
11770         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11771         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11772         * cancellation.c (__pthread_enable_asynccancel): New function.
11773         (__pthread_disable_asynccancel): New function.
11774         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11775         * pt-close.c: Likewise.
11776         * pt-connect.c: Likewise.
11777         * pt-creat.c: Likewise.
11778         * pt-fcntl.c: Likewise.
11779         * pt-fsync.c: Likewise.
11780         * pt-lseek.c: Likewise.
11781         * pt-lseek64.c: Likewise.
11782         * pt-msgrcv.c: Likewise.
11783         * pt-msgsnd.c: Likewise.
11784         * pt-msync.c: Likewise.
11785         * pt-nanosleep.c: Likewise.
11786         * pt-open.c: Likewise.
11787         * pt-open64.c: Likewise.
11788         * pt-pause.c: Likewise.
11789         * pt-poll.c: Likewise.
11790         * pt-pread.c: Likewise.
11791         * pt-pread64.c: Likewise.
11792         * pt-pselect.c: Likewise.
11793         * pt-pwrite.c: Likewise.
11794         * pt-pwrite64.c: Likewise.
11795         * pt-read.c: Likewise.
11796         * pt-readv.c: Likewise.
11797         * pt-recv.c: Likewise.
11798         * pt-recvfrom.c: Likewise.
11799         * pt-recvmsg.c: Likewise.
11800         * pt-select.c: Likewise.
11801         * pt-send.c: Likewise.
11802         * pt-sendmsg.c: Likewise.
11803         * pt-sendto.c: Likewise.
11804         * pt-sigpause.c: Likewise.
11805         * pt-sigsuspend.c: Likewise.
11806         * pt-sigtimedwait.c: Likewise.
11807         * pt-sigwait.c: Likewise.
11808         * pt-sigwaitinfo.c: Likewise.
11809         * pt-system.c: Likewise.
11810         * pt-tcdrain.c: Likewise.
11811         * pt-wait.c: Likewise.
11812         * pt-waitid.c: Likewise.
11813         * pt-waitpid.c: Likewise.
11814         * pt-write.c: Likewise.
11815         * pt-writev.c: Likewise.
11816         * pthread_join.c: Likewise.
11817         * pthread_timedjoin.c: Likewise.
11819         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11820         (__xpg_sigpause): New function.
11821         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11823 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11825         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11827         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11828         _GI_pthread_cleanup_pop to pthreadP.h.
11830         * ftrylockfile.c: Use _IO_lock_trylock instead of
11831         pthread_mutex_trylock.
11833         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11834         (CANCEL_RESET): Likewise.
11835         (__pthread_setcanceltype_): Declare.
11836         (__pthread_mutex_lock_internal): Declare.
11837         (__pthread_mutex_unlock_internal): Declare.
11838         (__pthread_once_internal): Declare.
11839         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11840         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11842         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11843         and pthread_mutex_unlock.
11844         * pthread_cond_wait.c: Likewise.
11845         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11846         * pthread_mutex_unlock.c: Likewise.
11848         * pthread_setcanceltype.c: Add additional alias
11849         __pthread_setcanceltype.
11851         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11852         * sem_open.c (sem_open): Likewise.
11853         Use __libc_open, __libc_write, and __libc_close instead of
11854         open, write, and close respectively.
11856         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11857         Rewrite as statement expression since it must return a value.
11859         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11860         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11861         __pthread_kill.
11863         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11864         alias __pthread_once_internal.
11866         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11868 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11870         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11871         * tst-stdio1.c: New file.
11872         * tst-stdio2.c: New file.
11874         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11876         * Makefile (tests): Comment out tst-locale2 for now.
11877         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11879         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11880         -D_IO_MTSAFE_IO.
11881         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11882         Use _IO_lock_init instead of explicit assignment.
11884         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11885         Define __libc_lock_* and __libc_lock_recursive macros with
11886         lowlevellock macros, not pthread mutexes.
11888         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11889         of pthread_mutex_lock.
11890         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11891         instead of pthread_mutex_unlock.
11893 2002-12-06  Roland McGrath  <roland@redhat.com>
11895         * allocatestack.c (__stack_user): Use uninitialized defn.
11896         * init.c (__pthread_initialize_minimal): Initialize it here.
11898 2002-12-05  Roland McGrath  <roland@redhat.com>
11900         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11901         string.
11902         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11904         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11905         missing & here too.
11907 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11909         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11910         lowlevellock.
11911         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11912         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11913         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11914         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11915         for __libc_lock_* macros.
11916         * Makefile (routines): Add libc-lowlevellock.
11918 2002-10-09  Roland McGrath  <roland@redhat.com>
11920         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11921         Under [__PIC__], call the function via the pointer fetched for
11922         comparison rather than a call by name that uses the PLT.
11923         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11924         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11925         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11926         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11927         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11929 2002-12-04  Roland McGrath  <roland@redhat.com>
11931         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11933         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11934         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11936         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11938 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11940         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11941         a completely opaque, non-integer type.
11942         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11944 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11946         * sysdeps/i386/tls.h: Include stdlib.h.
11947         * sysdeps/x86_64/tls.h: Likewise.
11949 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11951         * Makefile (tests): Add tst-locale2.
11952         (tests-static): Likewise.
11953         * tst-locale2.c: New file.
11955         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11956         volatile and add memory clobbers to lock operations.
11958 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11960         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11961         * sysdeps/i386/i486/bits/atomic.h: New file.
11962         * sysdeps/i386/i586/bits/atomic.h: New file.
11963         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11964         include i486 version.
11965         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11966         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11967         Patch by Marijn Ros <marijn@mad.scientist.com>.
11969         * allocatestack.c (get_cached_stack): Don't crash if we first
11970         found a stack with a larger size then needed.
11971         Reported by Hui Huang <hui.huang@sun.com>.
11973         * Makefile (tests): Add tst-sysconf.
11974         * tst-sysconf.c: New file.
11976         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11977         PTHREAD_THREADS_MAX.
11979 2002-12-02  Roland McGrath  <roland@redhat.com>
11981         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11982         Declare using hidden_proto instead of attribute_hidden, so there are
11983         non-.hidden static symbols for gdb to find.
11984         (__pthread_keys): Likewise.
11985         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11986         * allocatestack.c (__stack_user): Likewise.
11987         * pthread_create.c (__pthread_keys): Likewise.
11988         (__nptl_threads_events, __nptl_last_event): Make these static instead
11989         of hidden.
11990         * pthread_key_create.c (__pthread_pthread_keys_max,
11991         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11993 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11995         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11996         statically.
11997         * tst-locale1.c: New file.
11999         * pthread_cond_timedwait.c: Include <stdlib.h>.
12001         * Makefile (tests): Add tst-fork2 and tst-fork3.
12002         * tst-fork2.c: New file.
12003         * tst-fork3.c: New file.
12005 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12007         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12009         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12010         require it to 200112L.
12012         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12013         instruction only if HAVE_CMOV is defined.
12014         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12016         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12018         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12020         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12022         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12024 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12026         * sysdeps/x86_64/bits/atomic.h: New file.
12028         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12029         16-bit operations.
12031         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12032         possible since gettid cannot fail.
12034         * sysdeps/x86_64/pthreaddef.h: New file.
12036         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12038         * sysdeps/x86_64/pthread_spin_init.c: New file.
12039         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12040         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12041         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12043         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12044         Add missing lock prefix.  Minute optimization.
12046         * tst-spin2.c (main): Also check successful trylock call.
12048         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12049         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12051         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12052         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12054         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12055         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12056         value in case of an error.  Add support for INTERNAL_SYSCALL.
12058         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12059         value in case of an error.
12061         * sysdeps/x86_64/tls.h: New file.
12063 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12065         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12066         takes the array member name and the index as parameters.
12067         (THREAD_SETMEM_NC): Likewise.
12068         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12069         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12070         interfaces.
12072         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12073         to decide which code to use.
12074         (THREAD_SETMEM_NC): Likewise.
12076         * allocatestack.c (queue_stack): Don't remove stack from list here.
12077         Do it in the caller.  Correct condition to prematurely terminate
12078         loop to free stacks.
12079         (__deallocate_stack): Remove stack from list here.
12081 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12083         * Makefile (tests): Add tst-stack1.
12084         * tst-stack1.c: New file.
12086         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12087         provided stack.
12089         * pthread_attr_getstack.c: Return bottom of the thread area.
12091 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12093         * Makefile (libpthread-routines): Add pt-allocrtsig and
12094         pthread_kill_other_threads.
12095         * pt-allocrtsig.c: New file.
12096         * pthread_kill_other_threads.c: New file.
12097         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12098         all three functions.
12099         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12100         allocrtsig.
12101         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12102         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12103         and __libc_allocate_rtsig_private.
12104         * Versions (libpthread): Export pthread_kill_other_threads_np,
12105         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12107 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12109         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12110         the end of the stack.  Adjust computations.
12111         When mprotect call fails dequeue stack and free it.
12112         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12113         attribute.
12114         * pthread_getattr_np.c: Likewise.
12116         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12117         surprises.
12119 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12121         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12122         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12124 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12126         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12127         * pthread_setspecific.c: Likewise.
12129 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12131         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12132         definitions.  Get them from the official place.
12133         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12135         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12136         Use new CLONE_ flags in clone() calls.
12138         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12139         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12141         * Versions: Add pthread_* functions for libc.
12142         * forward.c: New file.
12144         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12145         errno-loc.
12146         * herrno.c: New file.
12147         * res.c: New file.
12149         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12150         sem_trywait, and sem_timedwait.  Add herrno and res.
12151         * sem_init.c: Don't initialize lock and waiters members.
12152         * sem_open.c: Likewise.
12153         * sem_post.c: Removed.
12154         * sem_wait.c: Removed.
12155         * sem_trywait.c: Removed.
12156         * sem_timedwait.c: Removed.
12157         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12158         Includes full implementations of sem_post, sem_wait, sem_trywait,
12159         and sem_timedwait.
12160         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12161         for new implementation.
12162         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12163         and waiters fields.
12165         * tst-sem3.c: Improve error message.
12166         * tst-signal3.c: Likewise.
12168         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12169         to tell the kernel about the termination futex and to initialize tid
12170         member.  Don't initialize main_thread.
12171         * descr.h (struct pthread): Remove main_thread member.
12172         * cancelllation.c (__do_cancel): Remove code handling main thread.
12173         The main thread is not special anymore.
12175         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12176         size of the stacks to stack_cache_actsize.
12178         * pt-readv.c: Add missing "defined".
12179         * pt-sigwait.c: Likewise.
12180         * pt-writev.c: Likewise.
12182 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12184         * Versions: Export __connect from libpthread.
12185         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12187         * Makefile (libpthread-routines): Add pt-raise.
12188         * sysdeps/unix/sysv/linux/raise.c: New file.
12189         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12190         * sysdeps/generic/pt-raise.c: New file.
12192         * pthread_cond_init.c: Initialize all data elements of the condvar
12193         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12195         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12196         * pthread_create.c: Likewise.
12198         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12199         * tst-key1.c: New file.
12200         * tst-key2.c: New file.
12201         * tst-key3.c: New file.
12203         * Versions: Export pthread_detach for version GLIBC_2.0.
12204         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12206 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12208         * pthread_key_create.c: Terminate search after an unused key was found.
12209         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12211         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12212         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12214 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12216         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12217         dynamic lookup for errno in PIC.
12219         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12220         release the stack lock as soon as possible.
12221         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12222         the static TLS block.
12223         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12225         * cancellation.c: Renamed from cancelation.c.
12226         * Makefile: Adjust accordingly.
12227         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12228         * cleanup_defer.c: Use CANCELLATION_P.
12229         * pthread_testcancel.c: Likewise.
12230         * descr.h: Fix spelling in comments.
12231         * init.c: Likewise.
12232         * pthread_getattr_np.c: Likewise.
12233         * pthread_getschedparam.c: Likewise.
12234         * pthread_setschedparam.c: Likewise.
12235         * Versions: Likewise.
12237         * pt-pselect.c: New file.
12238         * Makefile (libpthread-routines): Add pt-pselect.
12239         * Versions: Add pselect.
12241         * tst-cancel4.c: New file.
12242         * Makefile (tests): Add tst-cancel4.
12244 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12246         * pthread_mutex_lock.c: Always record lock ownership.
12247         * pthread_mutex_timedlock.c: Likewise.
12248         * pthread_mutex_trylock.c: Likewise.
12250         * pt-readv.c: New file.
12251         * pt-writev.c: New file.
12252         * pt-creat.c: New file.
12253         * pt-msgrcv.c: New file.
12254         * pt-msgsnd.c: New file.
12255         * pt-poll.c: New file.
12256         * pt-select.c: New file.
12257         * pt-sigpause.c: New file.
12258         * pt-sigsuspend.c: New file.
12259         * pt-sigwait.c: New file.
12260         * pt-sigwaitinfo.c: New file.
12261         * pt-waitid.c: New file.
12262         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12263         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12264         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12265         * Versions: Add all the new functions.
12267         * tst-exit1.c: New file.
12268         * Makefile (tests): Add tst-exit1.
12270         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12272 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12274         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12276         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12277         call.  pthread_join is an official cancellation point.
12278         * pthread_timedjoin.c: Likewise.
12280         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12281         and the condvar's mutex are retrieved.
12282         * pthread_cond_timedwait.c: Likewise.
12283         Reported by dice@saros.East.Sun.COM.
12285 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12287         * pthreadP.h: Cut out all type definitions and move them...
12288         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12289         * pthreadP.h: Include <internaltypes.h>.
12291         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12292         performance tweaks.
12294         * sem_trywait.c: Shuffle #includes around to get right order.
12295         * sem_timedwait.c: Likewise.
12296         * sem_post.c: Likewise.
12297         * sem_wait.c: Likewise.
12299         * nptl 0.3 released.
12301         * Makefile (tests): Add tst-signal3.
12302         * tst-signal3.c: New file.
12304 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12306         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12307         the asms modify the sem object.
12308         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12310         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12311         the actual members.
12312         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12313         * semaphoreP.h: Include pthreadP.h.
12314         * sem_getvalue.c: Adjust to sem_t change.
12315         * sem_init.c: Likewise.
12316         * sem_open.c: Likewise.
12317         * sem_post.c: Likewise.
12318         * sem_timedwait.c: Likewise.
12319         * sem_trywait.c: Likewise.
12320         * sem_wait.c: Likewise.
12322 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12324         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12325         * tst-basic2.c: New file.
12326         * tst-exec1.c: New file.
12327         * tst-exec2.c: New file.
12328         * tst-exec3.c: New file.
12330         * tst-fork1.c: Remove extra */.
12332         * nptl 0.2 released.  The API for IA-32 is complete.