Fix bugs in powerpc pthread_once.
[glibc.git] / nptl / ChangeLog
blob2176932501a70f874cb331d163c0f7cc3a5900e1
1 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
3         * tst-tls6.sh: Add "set -e".
4         * Makefile: Do not specify -e option when running testsuite
5         shell scripts.
7         * tst-tls6.sh: Add copyright header.
9 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
11         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
12         to uint64_t for 64-bit store.
13         (THREAD_SETMEM_NC): Likewise.
15 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
17         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
18         64-bit store.
19         (THREAD_SETMEM_NC): Likewise.
21 2012-09-14  Jeff Law  <law@redhat.com>
23         [BZ #14583]
24         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
26 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
28         [BZ #14576]
29         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
30         Removed.
32 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
34         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
35         (LDLIBS-tst-cancel24): This.
37 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
39         [BZ #14545]
40         * Makefile (tests-static): Add tst-cancel21-static.
41         (tests): Likewise.
42         * tst-cancel21-static.c: New file.
44 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
46         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
47         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
48         [__NR_clock_getres]: Make code unconditional.
49         (pthread_getcpuclockid): Remove code left unreachable by removal
50         of conditionals.
52 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
54         [BZ #14532]
55         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
56         atomic_compare_and_exchange_bool_rel.
57         * tst-sem14.c: New file.
58         * Makefile (tests): Add tst-sem14.
60 2012-08-15  Roland McGrath  <roland@hack.frob.com>
62         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
63         of -D_IO_MTSAFE_IO.
64         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
65         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
67 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
69         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
70         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
71         * pthread_condattr_setclock.c (pthread_condattr_setclock)
72         [!__ASSUME_POSIX_TIMERS]: Likewise.
73         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
74         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
75         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
76         [!__ASSUME_POSIX_TIMERS]: Likewise.
77         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
78         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
79         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
80         code unconditional.
81         [!__NR-timer_create]: Remove conditional code.
82         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
83         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
84         code unconditional.
85         [!__NR_timer_delete]: Remove conditional code.
86         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
87         * sysdeps/unix/sysv/linux/timer_getoverr.c
88         [__NR_timer_getoverrun]: Make code unconditional.
89         [!__NR_timer_getoverrun]: Remove conditional code.
90         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
91         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
92         Make code unconditional.
93         [!__NR_timer_gettime]: Remove conditional code.
94         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
95         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
96         Make code unconditional.
97         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
98         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
99         Make code unconditional.
100         [!__NR_timer_settime]: Remove conditional code.
101         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
102         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
103         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
104         conditional code.
106 2012-08-15  Tom de Vries  <vries@codesourcery.com>
107             Maxim Kuvyrkov  <maxim@codesourcery.com>
109         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
110         (__libc_lock_trylock): Allow pre-existing definitions.
112 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
114         * pthread_spin_lock.c: New file.
115         * pthread_spin_trylock.c: New file.
117 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
119         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
120         code unconditional.
121         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
122         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
123         unconditional.
124         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
125         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
126         Make code unconditional.
127         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
128         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
129         __NR_tgkill]: Make code unconditional.
130         (raise) [__ASSUME_TGKILL]: Likewise.
131         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
132         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
133         [__ASSUME_TGKILL]: Make code unconditional.
134         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
135         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
136         __NR_tgkill]: Make code unconditional.
137         (raise) [__ASSUME_TGKILL]: Likewise.
138         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
140 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
142         * sysdeps/pthread/createthread.c (create_thread)
143         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
145 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
147         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
148         code unconditional.
149         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
151 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
153         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
154         (pagesize): New static variable.
155         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
156         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
157         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
158         halfway up the stack top page.  Verify that the top page was
159         written into.
160         (do_test): Get pagesize using sysconf.
162 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
164         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
165         label.
166         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
167         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
168         Likewise.
170 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
172         * tst-pthread-getattr.c: Revert last change.
174 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
176         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
177         size.
178         (_MIN): New macro.
179         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
180         of MEM to test.
181         (check_stack_top): Read valued written into STACKADDR in
182         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
184 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
186         * nptl-init.c (sighandler_setxid): Fix the comment that
187         describes it.
189 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
191         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
192         (__lll_robust_timedlock_wait): Simplify CFI directives.
194 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
196         [BZ #12416]
197         * Makefile (tests): Add test case.
198         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
199         the __libc_stack_end page from stacksize.  Truncate stacksize to
200         make it page aligned when it is computed from RLIMIT_STACK.
201         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
202         accessible.
204 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
206         [BZ #14205]
207         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
208         branches.
210 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
211             Jakub Jelinek  <jakub@redhat.com>
213         [BZ #14188]
214         * sysdeps/pthread/pthread.h
215         [!(defined __GNUC__ && defined __EXCEPTIONS)]
216         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
217         __libc_unlikely instead of __builtin_expect.
219 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
221         [BZ #14117]
222         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
223         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
224         * sysdeps/unix/sysv/linux/i386/Implies: New file.
225         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
226         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
227         to ...
228         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
229         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
230         to ...
231         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
233 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
235         [BZ #14132]
236         * nptl-init.c (pthread_functions): Remove use of INTUSE and
237         _internal aliases.
238         (__pthread_initialize_minimal_internal): Likewise.
239         * sem_open.c: Likewise.
240         * sem_unlink.c: Likewise.
241         * pthreadP.h: Replace _internal aliases by hidden_proto
242         declarations.
243         * pthread_getspecific.c: Replace _internal alias by hidden_def.
244         * pthread_key_create.c: Likewise.
245         * pthread_mutex_destroy.c: Likewise.
246         * pthread_mutex_init.c: Likewise.
247         * pthread_mutex_lock.c: Likewise.
248         * pthread_mutex_unlock.c: Likewise.
249         * pthread_once.c: Likewise.
250         * pthread_rwlock_rdlock.c: Likewise.
251         * pthread_rwlock_unlock.c: Likewise.
252         * pthread_rwlock_wrlock.c: Likewise.
253         * pthread_setspecific.c: Likewise.
254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
255         Likewise.
256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
257         Likewise.
258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
259         Likewise.
260         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
261         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
262         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
263         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
264         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
265         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
266         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
267         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
268         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
269         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
270         Likewise.
271         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
272         Likewise.
273         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
274         Likewise.
276 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
278         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
279         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
282         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
283         directives.
284         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
285         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
286         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
287         (pthread_barrier_wait): Likewise.
288         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
289         (__pthread_cond_broadcast): Likewise.
290         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
291         (__pthread_cond_signal): Likewise.
292         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
293         (__pthread_cond_timedwait): Likewise.
294         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
295         Likewise.
296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
297         (__pthread_rwlock_rdlock): Likewise.
298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
299         (pthread_rwlock_timedrdlock): Likewise.
300         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
301         (pthread_rwlock_timedwrlock): Likewise.
302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
303         (__pthread_rwlock_unlock): Likewise.
304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
305         (__pthread_rwlock_wrlock): Likewise.
306         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
307         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
308         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
309         Likewise.
310         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
312 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
314         [BZ #12416]
315         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
316         __libc_stack_end rounded to the end of containing page as the
317         real stack end.
319 2012-05-25  Rayson Ho  <rho@redhat.com>
321         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
322         probes for i386.
323         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
324         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
326         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
327         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
329         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
330         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
332 2012-05-25  Rayson Ho  <rho@redhat.com>
333             Roland McGrath  <roland@hack.frob.com>
335         * DESIGN-systemtap-probes.txt: New file.
336         * pthread_cond_broadcast.c: SystemTap probes.
337         * pthread_cond_init.c: Likewise.
338         * pthread_cond_signal.c: Likewise.
339         * pthread_cond_wait.c: Likewise.
340         * pthread_cond_destroy.c: Likewise.
341         * pthread_create.c: Likewise.
342         * pthread_join.c: Likewise.
343         * pthread_mutex_destroy.c: Likewise.
344         * pthread_mutex_init.c: Likewise.
345         * pthread_mutex_lock.c: Likewise.
346         * pthread_mutex_timedlock.c: Likewise.
347         * pthread_mutex_unlock.c: Likewise.
348         * pthread_rwlock_destroy.c: Likewise.
349         * pthread_rwlock_rdlock.c: Likewise.
350         * pthread_rwlock_unlock.c: Likewise.
351         * pthread_rwlock_wrlock.c: Likewise.
352         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
353         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
356         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
357         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
359         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
361 2012-05-24  Roland McGrath  <roland@hack.frob.com>
363         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
365 2012-05-17  Andreas Jaeger  <aj@suse.de>
367         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
368         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
369         only for older kernels.
371 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
373         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
374         not define.
376 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
378         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
379         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
380         (lll_robust_lock): Likewise.
381         (lll_cond_lock): Likewise.
382         (lll_robust_cond_lock): Likewise.
383         (lll_timedlock): Likewise.
384         (lll_robust_timedlock): Likewise.
385         (lll_unlock): Likewise.
386         (lll_robust_unlock): Likewise.
388 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
391         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
393 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
395         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
396         on NWAITERS.
397         (__gcc_personality_v0): Replace 8-byte data alignment with
398         LP_SIZE alignment and .quad with ASM_ADDR.
400 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
402         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
403         on NWAITERS.
404         (__gcc_personality_v0): Replace 8-byte data alignment with
405         LP_SIZE alignment and .quad with ASM_ADDR.
407 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
409         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
410         NWAITERS, which is unsigned long int.
412 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
414         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
415         (__gcc_personality_v0): Replace 8-byte data alignment with
416         LP_SIZE alignment and .quad with ASM_ADDR.
418 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
421         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
422         __vdso_clock_gettime pointer into RAX_LP.
423         (__gcc_personality_v0): Replace 8-byte data alignment with
424         LP_SIZE alignment and .quad with ASM_ADDR.
426 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
429         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
430         __vdso_clock_gettime pointer into RAX_LP.
431         (__gcc_personality_v0): Replace 8-byte data alignment with
432         LP_SIZE alignment and .quad with ASM_ADDR.
434 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
436         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
437         LP_OP(cmp) and R8_LP on dep_mutex pointer.
439 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
441         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
442         to update pointer in memory.  Load pointer into RDI_LP.
444 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
446         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
447         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
448         of 8.
449         (LLL_STUB_UNWIND_INFO_END): Likewise.
450         (lll_timedlock): Load timeout pointer into RDX_LP.
451         (lll_robust_timedlock): Likewise.
453 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
454             Jakub Jelinek  <jakub@redhat.com>
456         [BZ #13613]
457         * Makefile (tests): Add test cases.
458         * descr.h (struct pthread): Add a comment describing multiple_threads.
459         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
460         single-process case.
461         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
462         before setting cancelstate of the thread.
463         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
464         (__libc_multiple_threads): Add explanatory comment.
465         * tst-cancel-self-cancelstate.c: New test case.
466         * tst-cancel-self-canceltype.c: Likewise.
467         * tst-cancel-self-cleanup.c: Supporting file for test cases.
468         * tst-cancel-self-testcancel.c: New test case.
469         * tst-cancel-self.c: Likewise.
470         * vars.c: Expand comment to include single-process case.
472 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
474         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
475         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
476         to 32 bytes.
478 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
480         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
481         New.
482         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
483         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
485 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
487         * shlib-versions: Move x86_64-.*-linux.* entry to ...
488         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
489         * sysdeps/x86_64/x32/shlib-versions: New file.
491 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
493         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
494         __SIZEOF_PTHREAD_XXX_T.
495         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
496         (pthread_mutex_t): Likewise.
497         (pthread_rwlock_t): Likewise.
498         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
499         is defined.
501 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
503         * sysdeps/x86_64/x32/tls.h: New file.
505 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
507         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
508         integer.
509         (THREAD_SETMEM_NC): Likewise.
511 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
513         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
514         mov/%0.
516 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
518         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
519         (__cleanup_fct_attribute): Check __x86_64__ instead of
520         __WORDSIZE.
522 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
524         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
525         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
526         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
527         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
528         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
530 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
532         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
533         instead of __WORDSIZE.
535 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
537         [BZ #3748]
538         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
540 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
542         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
543         (__pthread_cond_timedwait): Use CFI directives.
544         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
545         (__pthread_cond_wait): Likewise.
546         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
547         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
549 2012-05-03  David S. Miller  <davem@davemloft.net>
551         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
552         always have to return 0, especially for the pthread_spin_init
553         alias.
554         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
555         newline.
556         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
557         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
559 2012-05-02  David S. Miller  <davem@davemloft.net>
561         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
562         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
563         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
564         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
565         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
566         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
567         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
568         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
569         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
570         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
571         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
572         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
573         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
574         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
575         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
576         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
577         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
578         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
580 2012-05-02  Allan McRae  <allan@archlinux.org>
582         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
583         (LDFLAGS-tst-cancel24): Likewise.
585 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
587         * sysdeps/i386/pthread_spin_lock.S: New.
588         * sysdeps/i386/pthread_spin_lock.c: Delete.
589         * sysdeps/x86_64/pthread_spin_lock.S: New.
590         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
592 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
594         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
595         run when cross-compiling.
597 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
599         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
600         instead of libgcc_s.h.
602 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
604         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
606 2012-03-27  David S. Miller  <davem@davemloft.net>
608         * tst-cond16.c (do_test): Use a thread stack size which is either
609         PTHREAD_STACK_MIN or the page size, whichever is larger.
610         * tst-cond18.c (do_test): Likewise.
612 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
614         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
615         register char * __asm__("rsp") to get stack frame.
617 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
619         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
620         __NR_futex directly.
622 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
624         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
625         _Unwind_Ptr first.
627 2012-03-16  David S. Miller  <davem@davemloft.net>
629         [BZ #13844]
630         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
631         instead of "...".
632         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
633         Delete, not needed.
635 2012-03-15  David S. Miller  <davem@davemloft.net>
637         [BZ #13844]
638         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
640 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
642         [BZ #13673]
643         * pt-crti.S: Replace FSF snail mail address with URL.
645 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
647         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
648         Do not define before including <time.h>.
650 2012-03-08  David S. Miller  <davem@davemloft.net>
652         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
654 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
656         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
657         Check for timestamp before the Epoch.
659         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
660         updating nwaiters.
662         * tst-sem13.c (do_test): Add another test case.
663         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
664         Fix updating nwaiters.
666 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
668         [BZ #10545]
669         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
670         link test to a compile test.
671         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
672         <stdio.h>.
673         * sysdeps/pthread/configure: Regenerated.
675 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
677         * Makefile (distribute): Remove variable.
679 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
681         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
682         superfluous assignment.
683         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
684         Likewise.
685         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
686         (sem_timedwait): Likewise.
688 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
690         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
691         installed headers to...
692         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
694 2012-03-06  David S. Miller  <davem@davemloft.net>
696         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
697         atomic_increment and remove unused local variable.
698         (__old_sem_post): Likewise.
700 2012-02-27  David S. Miller  <davem@davemloft.net>
702         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
703         non-existing __pthread_attr.
704         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
705         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
706         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
707         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
710 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
712         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
714         * sysdeps/pthread/pthread.h: Define __need_timespec before including
715         <time.h>.
716         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
717         union.
718         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
719         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
720         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
721         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
722         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
724 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
726         [BZ #13695]
727         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
728         pt-initfini.s.
729         [crti.S not in sysdirs] (omit-deps): Do not append.
730         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
731         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
732         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
733         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
734         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
735         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
736         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
737         [crti.S in sysdirs] (extra-objs): Append unconditionally.
738         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
739         unconditionally.
740         * sysdeps/pthread/pt-initfini.c: Remove file.
742 2012-02-16  Richard Henderson  <rth@twiddle.net>
744         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
745         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
747 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
749         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
751 2012-02-16  David S. Miller  <davem@davemloft.net>
753         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
755 2012-02-15  Marek Polacek  <polacek@redhat.com>
757         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
759 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
761         Replace FSF snail mail address with URLs, as per GNU coding standards.
763 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
765         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
767 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
769         Support crti.S and crtn.S provided directly by architectures.
770         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
771         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
772         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
773         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
774         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
775         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
776         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
777         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
778         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
779         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
780         * pt-crti.S: New file.
781         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
783 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
785         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
786         macros for PIC register setup.
787         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
788         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
789         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
790         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
791         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
793 2012-01-11  Marek Polacek  <polacek@redhat.com>
795         * forward.c (FORWARD_NORETURN): Define macro.
796         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
797         (__pthread_exit): Likewise.
799 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
801         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
803         * pthreadP.h: Add noreturn to __pthread_exit.
804         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
806 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
808         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
809         Call pthread_attr_setstacksize() with result of
810         __pthread_get_minstack() to account for application TLS usage.
812 2012-01-08  Marek Polacek  <polacek@redhat.com>
814         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
816 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
818         [BZ #13553]
819         * pthreadP.h: Use const instead of __const.
820         * semaphore.h: Likewise.
821         * sysdeps/pthread/bits/libc-lock.h: Likewise.
822         * sysdeps/pthread/bits/sigthread.h: Likewise.
823         * sysdeps/pthread/pthread.h: Likewise.
825         * Makefile: Remove elf=yes test, only ELF is supported.
827         * shlib-versions: Remove entries for ports architectures.
829         In case anyone cares, the IA-64 architecture could move to ports.
830         * sysdeps/ia64/*: Removed.
831         * sysdeps/unix/sysv/linux/ia64/*: Removed.
833 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
835         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
836         __pthread_get_minstack.
837         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
839         [BZ #13088]
840         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
841         through __pthread_get_minstack.
842         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
843         directly from _rtld_global_ro.
844         (__pthread_get_minstack): New function.
845         * pthreadP.h: Declare __pthread_get_minstack.
846         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
848 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
850         [BZ #13515]
851         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
852         Correct reading name from file.
854 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
856         * allocatestack.c (allocate_stack): Return errno on failure.
858 2011-12-14  Jeff Law  <law@redhat.com>
860         [BZ #5245]
861         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
863 2011-11-28  Andreas Schwab  <schwab@redhat.com>
865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
866         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
869 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
871         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
872         /proc/self/maps.
874 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
876         [BZ #13358]
877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
878         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
879         path for kernels with FUTEX_CLOCK_REALTIME.
880         Debugged by H.J. Lu <hjl.tools@gmail.com>.
882 2011-10-27  Andreas Schwab  <schwab@redhat.com>
884         [BZ #13344]
885         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
886         for memory synchronization functions.
887         * semaphore.h: Likewise.
889 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
891         * tst-cancel7.c: Avoid warning.
892         * tst-mutex6.c: Likewise.
893         * tst-mutex9.c: Likewise.
894         * tst-mutexpi6.c: Likewise.
896 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
898         * sysdeps/i386/tls.h: Remove #include <list.h>.
900 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
902         * pthread_create.c (start_thread): Call __ctype_init.
904 2011-09-15  Andreas Schwab  <schwab@redhat.com>
906         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
907         defined.
908         (list_add): Add atomic_write_barrier.
909         * descr.h: Define __need_list_t before including <list.h>.
910         * nptl-init.c: Include <list.h>
911         * allocatestack.c: Likewise.
913 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
915         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
916         * sysdeps/ia64/tls.h: Likewise.
917         * sysdeps/powerpc/tls.h: Likewise.
918         * sysdeps/s390/tls.h: Likewise.
919         * sysdeps/sh/tls.h: Likewise.
920         * sysdeps/sparc/tls.h: Likewise.
921         * sysdeps/x86_64/tls.h: Likewise.
923 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
925         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
927         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
928         !USE___THREAD.
929         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
930         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
931         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
932         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
933         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
934         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
935         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
936         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
937         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
938         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
939         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
940         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
942         * tst-tls1.c: Support for __thread is now mandatory.
943         * tst-tls2.c: Likewise.
944         * tst-tls3.c: Likewise.
945         * tst-tls3mod.c: Likewise.
946         * tst-tls4.c: Likewise.
947         * tst-tls4moda.c: Likewise.
948         * tst-tls4modb.c: Likewise.
949         * tst-tls5.h: Likewise.
951 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
953         [BZ #12403]
954         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
955         (pthread_rwlock_timedwrlock): Use correct macro in test.
956         Patch by H.J. Lu <hongjiu.lu@intel.com>.
958 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
960         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
961         use gettimeofday vsyscall, just call gettimeofday.
962         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
963         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
964         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
965         Likewise.
966         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
967         Likewise.
968         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
969         Simplify __vdso_clock_gettime use.
971 2011-09-05  David S. Miller  <davem@davemloft.net>
973         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
974         New function.
975         (sem_timedwait): Call it to force an exception region around
976         the async cancel enable and the futex operation.
977         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
978         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
979         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
980         (__new_sem_wait): Call it to force an exception region around
981         the async cancel enable and the futex operation.
982         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
983         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
985 2011-08-31  Andreas Schwab  <schwab@redhat.com>
987         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
988         thread is woken up.
990 2011-08-20  David S. Miller  <davem@davemloft.net>
992         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
994 2011-08-14  Roland McGrath  <roland@hack.frob.com>
996         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
997         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
999 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1001         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1002         stack.
1003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1006 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1008         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1009         barrier.
1010         (__gcc_personality_v0): Likewise.
1011         (_Unwind_ForcedUnwind): Likewise.
1012         (_Unwind_GetCFA): Likewise.
1014 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1016         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1017         UINTMAX_C.
1019 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1021         * nptl-init.c (__nptl_set_robust): New function.
1022         (pthread_functions): Add reference.
1023         * npthreadP.h: Declare __nptl_set_robust.
1024         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1025         ptr_set_robust member.
1026         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1027         child if threads are used.
1029 2011-06-14  Andreas Jaeger  <aj@suse.de>
1031         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1033 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1035         [BZ #386]
1036         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1038 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1040         [BZ #12650]
1041         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1042         clearing memory.
1043         Patch partly by Robert Rex <robert.rex@exasol.com>.
1045 2011-01-19  Roland McGrath  <roland@redhat.com>
1047         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1048         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1049         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1050         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1051         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1052         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1054 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1056         * Makefile (test-extras): Add tst-cleanup4aux.
1058 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1060         [BZ #10563]
1061         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1062         (__SETXID_2): Likewise.
1063         (__SETXID_3): Likewise.
1065 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1067         [BZ #10484]
1068         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1069         * alloca_cutoff.c: Add libc_hidden_def.
1071 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1073         [BZ #12113]
1074         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1075         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1076         of "struct pthread".
1078 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1080         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1081         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1082         (pthread_cleanup_push_defer_np): Likewise.
1084 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1086         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1087         small.
1089 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1090             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1092         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1093         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1095 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1097         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1099 2010-05-01  Alan Modra  <amodra@gmail.com>
1101         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1102         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1103         to save temps.  Correct cfi for possible later frame manipulation.
1104         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1105         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1106         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1107         (DOCARGS_6, UNDOCARGS_6): Likewise.
1108         (CENABLE, CDISABLE): Add nops for non-shared calls.
1110 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1112         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1113         Fix type mismatch.
1115 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1117         * tst-abstime.c (do_test): Some more cleanups
1119 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1121         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1123 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1124             Ulrich Drepper  <drepper@redhat.com>
1126         * Makefile (tests): Add tst-abstime.
1127         * tst-abstime.c: New file.
1128         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1129         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1130         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1131         (__lll_timedlock_wait): Likewise.
1132         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1133         (__lll_robust_timedlock_wait): Likewise.
1134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1135         (__pthread_cond_timedwait): Likewise.
1136         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1137         (pthread_rwlock_timedrdlock): Likewise.
1138         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1139         (pthread_rwlock_timedwrlock): Likewise.
1140         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1141         Likewise.
1143 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1145         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1147 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1149         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1150         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1152 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1154         [BZ #11390]
1155         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1156         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1157         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1158         pthread_setname.
1159         * Makefile (libpthread-routines): Add pthread_getname and
1160         pthread_setname.
1161         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1163 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1165         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1166         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1167         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1168         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1170 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1172         * pthread_cond_timedwait.c: Add check for
1173         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1174         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1175         INTERNAL_SYSCALL.
1177 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1179         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1180         and the call fails wake eventually waiting setxid threads.  Don't free
1181         stack here if we try starting a thread.
1182         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1183         if the clone call failed.
1185 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1187         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1188         * allocatestack.c (get_cached_stack): Set setxid_futex.
1189         (allocate_stack): Likewise.
1191 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1192             Ulrich Drepper  <drepper@redhat.com>
1194         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1195         it is creating a thread or it is just being created.
1196         * pthread_create.c (start_thread): Wake setxid thread if it is
1197         waiting.
1198         (__pthread_create_2_1): Initialize setxid_futex.
1199         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1200         is waiting.
1202 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1205         Fix unwind info.
1206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1208 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1211         Fix pthread_cond_timedwait with requeue-PI.
1212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1213         Fix pthread_cond_wait with requeue-PI.
1215 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1217         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1218         and pthread_mutexattr_setrobust for GLIBC_2.12.
1219         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1220         * pthread_mutexattr_getrobust.c: Define alias
1221         pthread_mutexattr_getrobust.
1222         * pthread_mutexattr_setrobust.c: Define alias
1223         pthread_mutexattr_setrobust.
1225 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1227         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1229 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1231         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1233 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1235         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1236         call __gmon_start__.
1237         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1239 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1241         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1242         using memset.
1244 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1246         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1247         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1249         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1252         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1255 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1257         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1258         Don't update nwaiters after invalid timeout is recognized.
1260 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1262         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1263         __gmon_start__.
1265 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1267         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1268         THREAD_SELF->cancelhandling after returning from futex call.
1270 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1272         * tst-sem13.c: New file.
1273         * Makefile (tests): Add tst-sem13.
1275 2009-11-22  Roland McGrath  <roland@redhat.com>
1277         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1278         instead of recapitulating its contents.
1280 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1283         optimizations and cleanups.
1285 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1287         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1288         Remove redundant code. Fix cfi offsets.
1289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1290         Fix cfi offsets.
1292 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1294         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1295         reduce size of unwind info.
1297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1298         cfi directives.
1299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1300         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1302 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1304         [BZ #4457]
1305         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1306         LIBGCC_S_SO.
1307         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1309 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1311         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1313         [BZ #3270]
1314         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1315         steps to avoid races with creation and terminations.
1316         * nptl-init.c (sighandler_setxid): Adjust.
1317         Patch by Daniel Jacobowitz.
1319 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1321         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1323 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1324             Joseph Myers  <joseph@codesourcery.com>
1326         [BZ #7094]
1327         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1328         Initialize the sigev_notify field for newly created timer to make sure
1329         the timer gets deleted from the active timer's list upon timer_delete.
1331 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1333         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1334         Correct a logic error.
1336 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1338         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1339         of the field in local variables.
1340         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1341         variable and don't unconditionally clear it.
1343 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1345         * pthread_create.c (start_thread): Hint to the kernel that memory for
1346         the stack can be reused.  We do not mark all the memory.  The part
1347         still in use and some reserve are kept.
1349 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1351         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1353 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1355         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1356         directives.
1358 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1360         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1361         directives.
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1364 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1366         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1367         (__pthread_cond_signal): Don't clobber register used for syscall
1368         number.
1370 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1372         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1373         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1376         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1377         register.
1379 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1381         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1382         enabled by the special *_asynccancel functions.
1383         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1386         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1388 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1390         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1391         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1392         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1393         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1394         since we can assume the special __*_{en,dis}able_asynccancel
1395         functions.
1396         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1397         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1398         and PTHREAD_CANCELED.
1400 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1402         * descr.h: Better definition of *_BITMASK macros for cancellation.
1404 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1406         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1408         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1409         dynamic linker might have to save.
1410         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1411         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1412         printing.
1414         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1416 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1418         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1419         New function.
1420         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1421         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1422         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1423         requeue_pi for robust mutexes.
1424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1426         Don't only skip __pthread_mutex_cond_lock.  Call instead
1427         __pthread_mutex_cond_lock_adjust.
1428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1430         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1431         optimization of PI mutex handling.
1433 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1435         [BZ #10418]
1436         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1437         instead of of _acq variants of cmpxchg.
1439 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1441         * sysdeps/x86_64/configure.in: New file.
1443         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1444         path when not using absolute timeout futex.
1446 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1448         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1449         optimizations of last changes.
1450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1452 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1454         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1455         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1457         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1458         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1460         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1461         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1463         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1464         (__pthread_cond_timedwait): Make more robust.
1466 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1468         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1469         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1470         directly use absolute timeout.
1472         * tst-sem5.c (do_test): Add test for premature timeout.
1473         * Makefile: Linu tst-sem5 with librt.
1475         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1476         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1477         directly use absolute timeout.
1478         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1479         (pthread_rwlock_timedrdlock): Likewise.
1481         * tst-cond11.c (run_test): Add test to check that the timeout is
1482         long enough.
1484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1485         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1486         directly use absolute timeout.
1488         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1489         (__pthread_cond_wait): Convert to using exception handler instead of
1490         registered unwind buffer.
1491         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1492         (__pthread_cond_timedwait): Likewise.
1494 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1496         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1497         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1498         use absolute timeout.
1500         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1501         handling of uncontested semaphore.
1503         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1504         (__condvar_cleanup): Rewrite to use cfi directives instead of
1505         hand-coded unwind tables.
1506         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1507         Likewise.
1508         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1509         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1510         Likewise.
1512 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1514         * Makefile (libpthread-routines): Add pthread_sigqueue.
1515         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1516         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1517         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1519 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1521         [BZ #10262]
1522         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1523         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1524         cannot be assumed.
1525         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1527 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1529         * libc-cancellation.c: Move __libc_cleanup_routine to...
1530         * libc-cleanup.c: ...here.  New file.
1531         * Makefile (routines): Add libc-cleanup.
1533         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1534         test.
1535         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1536         * sysdeps/pthread/librt-cancellation.c: Likewise.
1538         [BZ #9924]
1539         * nptl-init.c: Renamed from init.c.
1540         * Makefile: Change all occurences of init.c to nptl-init.c.
1542 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1544         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1545         to test when deciding on the delay.
1546         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1547         * pthread_cancel.c: Close race between deciding on sending a signal
1548         and setting the CANCELING_BIT bit.
1550         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1551         thread is canceled.
1552         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1554 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1556         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1557         is available.
1558         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1559         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1560         * sysdeps/i386/tls.h: Likewise.
1561         (tcbhead_t): Add __private_tm member.
1563 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1565         * sem_open.c (sem_open): Rewrite initialization of initsem to
1566         avoid warnings.
1568         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1569         Avoid warning by using may_alias attribute on ptrhack.
1571 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1573         [BZ #10090]
1574         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1575         Check policy and priority for validity.
1576         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1578 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1581         (__pthread_cond_timedwait): Change to use cfi directives instead of
1582         hand-coded unwind sections.
1584 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1586         * init.c (nptl_freeres): Compile only for SHARED.
1588 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1590         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1591         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1592         FUTEX_BITSET_MATCH_ANY.
1594 2009-02-27  Roland McGrath  <roland@redhat.com>
1596         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1597         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1599 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1601         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1602         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1603         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1604         200112L to 200809L.
1606 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1608         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1609         POSIX 2008.
1611 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1613         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1614         Unify name of include protector macro.
1616 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1618         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1619         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1621 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1623         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1624         pointer variables.
1626         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1627         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1628         * init.c (nptl_freeres): New function.
1629         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1630         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1631         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1632         variable.
1633         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1634         load DSO.  Assign last.
1635         (__unwind_freeres): New function.
1637         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1638         for better debugging.  No need to use stack_list_add here.
1640 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1642         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1643         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1644         instead of computing relative timeout.
1645         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1646         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1648 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1650         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1652 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1654         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1655         (list_add_tail): Removed.
1657 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1659         * (in_flight_stack): New variable.
1660         (stack_list_del): New function.  Use instead of list_del.
1661         (stack_list_add): New function.  Use instead of list_add when adding to
1662         stack_cache and stack_used lists.
1663         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1664         when the fork call interrupted another thread.
1666 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1668         * init.c (__pthread_initialize_minimal_internal): Optimize test
1669         FUTEX_CLOCK_REALTIME a bit.
1671 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1673         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1674         only passing five parameters to FUTEX_WAIT_BITSET call.
1676         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1677         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1678         instead of computing relative timeout.
1680 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1682         * init.c (__pthread_initialize_minimal_internal): Check for
1683         FUTEX_CLOCK_REALTIME flag.
1684         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1685         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1686         relative timeout.
1688         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1689         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1690         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1691         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1692         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1693         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1695 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1697         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1698         loop body instead of ; to avoid gcc warnings.
1699         (pthread_cleanup_pop_restore_np): Likewise.
1700         Patch by Caolán McNamara <caolanm@redhat.com>.
1702 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1704         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1705         fast path here, for robust/PI/PP mutexes call
1706         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1707         of ifs according to their probability.
1708         (__pthread_mutex_lock_full): New function.
1709         * pthread_mutex_unlock.c: Include assert.h.
1710         (__pthread_mutex_unlock_usercnt): Handle only the
1711         fast path here, for robust/PI/PP mutexes call
1712         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1713         of ifs according to their probability.
1714         (__pthread_mutex_unlock_full): New function.
1715         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1716         (__pthread_mutex_lock_full): Define.
1718 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1720         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1721         implementation.  Add necessary padding and.
1722         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1723         words.
1725 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1727         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1728         and FUTEX_WAKE_BITSET.
1730 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1732         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1733         and FUTEX_WAKE_BITSET.
1734         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1735         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1736         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1739 2008-11-25  Roland McGrath  <roland@redhat.com>
1741         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1742         Subdirectories moved to ports repository as
1743         sysdeps/.../nptl subdirectories.
1745 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1747         [BZ #7008]
1748         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1749         of old value.
1750         * pthread_cond_init.c (__pthread_cond_init): Fix
1751         cond->__data.__nwaiters initialization.
1752         * Makefile (tests): Add tst-cond23.
1753         * tst-cond23.c: New test.
1755 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1757         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1758         arguments.
1759         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1760         arguments.
1762 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1764         [BZ #6955]
1765         * pthread_mutex_lock.c: Add support for private PI mutexes.
1766         * pthread_mutex_timedlock.c: Likewise.
1767         * pthread_mutex_trylock.c: Likewise.
1768         * pthread_mutex_unlock.c: Likewise.
1769         Patch mostly by Ben Jackson <ben@ben.com>.
1771 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1773         [BZ #6843]
1774         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1775         Increase stack size for helper thread.
1777 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1779         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1780         assembly with a clobber list for access registers a0 and a1.
1782 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1784         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1785         to force runp->refcntr to be read from memory.
1787 2008-09-08  Richard Guenther  <rguenther@suse.de>
1789         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1790         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1791         lll_timedlock, lll_robust_timedlock, lll_unlock,
1792         lll_robust_unlock): Promote private to int.
1794 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1796         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1797         ARCH_RETRY_MMAP definitions.
1798         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1799         Define MAP_STACK when not defined.
1800         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1801         handling of ARCH_RETRY_MMAP.
1803 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1805         * tst-align2.c (f): Print message that f is reached.
1807 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1809         [BZ #6740]
1810         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1811         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1813 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1815         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1816         SOCK_CLOEXEC if possible.
1818 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1820         * Makefile (tests): Add tst-rwlock2a.
1821         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1822         * tst-rwlock2a.c: New file.
1824 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1826         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1828 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1830         * sysdeps/pthread/pthread.h: Fix typo in comment.
1832 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1834         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1835         of CPU set to the kernel.
1837 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1839         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1840         cfi directives.
1841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1843         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1844         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1845         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1848 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1850         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1851         cfi directives.
1852         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1853         Likewise.
1854         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1855         Likewise.
1856         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1857         Likewise.
1859 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1861         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1863 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1865         David S. Miller  <davem@davemloft.net>
1867         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1869 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1871         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1872         __pshared correctly.
1873         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1874         Likewise.
1875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1876         Likewise.
1877         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1878         Likewise.
1879         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1880         Likewise.
1881         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1883 2008-04-14  David S. Miller  <davem@davemloft.net>
1885         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1886         (__old_sem_wait): Fix argument to lll_futex_wait().
1888 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1890         * pthread_create.c: Require pthread_mutex_trylock and
1891         pthread_key_delete for libgcc.
1893 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1895         [BZ #6020]
1896         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1897         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1898         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1900 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1902         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1903         <linux/limits.h> has defined it.
1904         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1905         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1906         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1907         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1909 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1911         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1912         of ASSEMBLER.
1913         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1914         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1916 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1918         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1919         HAVE_DL_DISCOVER_OSVERSION.
1920         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1921         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1923 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1925         [BZ #5778]
1926         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1927         _POSIX_CHOWN_RESTRICTED value to zero.
1929 2008-01-31  Roland McGrath  <roland@redhat.com>
1931         * Makefile (omit-deps): Variable removed.
1933 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1935         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1936         unnecessary addr32 prefix.
1938 2008-01-29  Roland McGrath  <roland@redhat.com>
1940         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1942 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1944         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1946 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1948         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1949         a scratch register.
1950         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1951         (__lll_lock_wait_private): Fix typo.
1952         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1953         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1954         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1955         Adjust XADD use.
1956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1957         (pthread_rwlock_timedrdlock): Return correct return value.
1958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1959         (pthread_rwlock_timedwrlock): Likewise.
1961 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1963         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1964         thread returns the program exits with an error code.
1966 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1968         * pthread-errnos.sym: Add EOVERFLOW.
1969         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1970         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1971         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1972         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1974 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1976         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1977         parameter.  Passed it as permission to mmap.
1978         * allocatestack.c (allocate_stack): Pass prot as second parameter
1979         to ARCH_RETRY_MMAP.
1981 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1983         * tst-basic7.c: Allocate memory for the stack.
1985         [BZ #5465]
1986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1987         (__pthread_cond_timedwait): Don't use VDSO.
1988         Patch by Michal Januszewski.
1990 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1992         [BZ #5455]
1993         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1994         Allow label before pthread_cleanup_pop.
1995         (pthread_cleanup_pop_restore_np): Likewise.
1997 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1999         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2000         Store 2 before returning ETIMEDOUT.
2002 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2004         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2005         Store 2 before returning ETIMEDOUT.
2006         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2007         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2008         (__lll_lock_wait_private): Optimize.
2009         (__lll_lock_wait): Likewise.
2011 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2013         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2014         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2015         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2017 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2019         [BZ #5240]
2020         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2021         If we time out, try one last time to lock the futex to avoid
2022         losing a wakeup signal.
2023         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2024         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2026         [BZ #5245]
2027         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2028         if necessary.
2030 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2032         [BZ #5245]
2033         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2034         mmap failed to EAGAIN.
2035         * Makefile (tests): Add tst-basic7.
2036         * tst-basic7.c: New file.
2038 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2040         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2041         Use __linkin_atfork.
2043 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2045         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2046         missing line continuations.
2047         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2048         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2050 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2052         [BZ #5220]
2053         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2054         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2055         (struct timer): Add next element.
2056         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2057         enqueue timer structure into __active_timer_sigev_thread list.
2058         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2059         remove timer struct from __active_timer_sigev_thread.
2060         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2061         Before using timer structure make sure it is still on the
2062         __active_timer_sigev_thread list.  Keep lock until done.
2063         Define __active_timer_sigev_thread and
2064         __active_timer_sigev_thread_lock.
2066 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2068         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2069         Redefine thread_atfork for use of ATFORK_MEM.
2070         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2071         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2072         function.
2073         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2074         Use atomic operation when removing first element of list.
2076 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2078         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2079         routine instead of an alias to __new_sem_post.
2081 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2083         * init.c (__pthread_initialize_minimal): Initialize word to appease
2084         valgrind.
2086 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2088         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2089         libc.so just clear NAME.
2090         (__libc_rwlock_fini): Nop inside of libc.so.
2091         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2092         all zeros.
2094 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2097         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2098         unlocking failed.
2099         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2101 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2103         [BZ #4938]
2104         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2105         reclaimed stack if necessary.
2106         * Makefile (tests): Add tst-tsd6.
2107         * tst-tsd6.c: New file.
2109 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2111         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2112         Add private argument.
2114 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2117         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2119 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2121         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2122         (__lll_robust_timedlock): Pass private as last argument to
2123         __lll_robust_timedlock_wait.
2124         (__lll_unlock): Fix a pasto.
2126 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2128         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2129         sparc_old_sem): New structs.
2130         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2131         (__sem_wait_cleanup): New function.
2132         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2133         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2134         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2135         lll_futex_wait.
2136         (__old_sem_wait): New function.
2137         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2138         nptl/sysdeps/unix/sysv/linux/sparc version.
2139         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2140         Likewise.
2141         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2142         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2143         (__new_sem_trywait): Use sparc_old_sem structure.
2144         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2145         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2146         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2147         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2148         lll_futex_timed_wait.
2149         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2150         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2151         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2152         lll_futex_wake.
2153         (__old_sem_post): New function.
2154         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2155         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2156         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2157         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2158         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2159         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2161 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2163         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2164         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2165         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2166         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2167         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2168         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2169         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2170         Use FUTEX_WAKE_OP.
2171         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2172         kernel-features.h and tcb-offsets.h.
2173         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2174         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2175         process private.
2176         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2177         tcb-offsets.h.
2178         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2179         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2180         process private.
2181         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2182         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2187         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2189 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2191         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2192         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2193         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2194         lll_futex_timed_wait.
2196         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2197         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2198         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2199         __lll_robust_unlock, __lll_wait_tid): Likewise.
2201 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2203         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2204         Fix a pasto.
2205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2206         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2207         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2208         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2210         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2211         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2213         kernel-features.h.
2214         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2215         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2216         process private.  Switch DW_CFA_advance_loc1 and some
2217         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2219         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2220         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2221         process private.  Switch DW_CFA_advance_loc{1,2} and some
2222         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2223         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2224         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2226         Likewise.
2227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2229         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2230         Likewise.
2231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2232         (__pthread_cond_broadcast): Compare %r8 instead of
2233         dep_mutex-cond_*(%rdi) with $-1.
2234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2235         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2236         of oring.
2238 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2240         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2242 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2244         * allocatestack.c: Include kernel-features.h.
2245         * pthread_create.c: Likewise.
2246         * pthread_mutex_init.c: Likewise.
2247         * init.c: Likewise.
2248         * pthread_cond_timedwait.c: Likewise.
2249         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2250         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2251         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2252         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2255         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2256         Likewise.
2257         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2258         Likewise.
2259         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2260         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2261         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2262         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2264 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2266         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2267         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2268         byte elements.  One of them is the new __shared element.
2269         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2270         adjust names of other padding elements.
2271         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2272         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2273         byte elements.  One of them is the new __shared element.
2274         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2275         adjust names of other padding elements.
2276         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2277         Renamed __pad1 element to __shared, adjust names of other padding
2278         elements.
2279         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2280         (pthread_rwlock_t): Likewise.
2281         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2282         typo.
2284 2007-08-09  Anton Blanchard  <anton@samba.org>
2286         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2288 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2290         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2291         <kernel-features.h>.
2292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2294 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2296         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2297         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2298         dealing with robust mutexes.
2299         * pthread_mutex_timedlock.c: Likewise.
2300         * pthread_mutex_trylock.c: Likewise.
2301         * pthread_mutex_unlock.c: Likewise.
2302         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2304 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2306         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2307         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2308         (PTHREAD_MUTEX_PSHARED): Define.
2309         * pthread_mutex_init.c (__pthread_mutex_init): Set
2310         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2311         mutexes.
2312         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2313         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2314         as second argument to lll_lock.
2315         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2316         instead of its __data.__lock field.
2317         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2318         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2319         to lll_robust_lock.
2320         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2321         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2322         instead of mutex->__data.__kind directly, pass
2323         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2324         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2325         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2326         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2327         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2328         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2329         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2330         of mutex->__data.__kind directly.
2331         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2332         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2333         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2334         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2335         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2336         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2337         and lll_futex_wake.
2338         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2339         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2340         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2341         directly.
2342         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2343         Take mutex as argument instead of its __data.__lock field, pass
2344         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2345         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2346         __data.__lock field.
2347         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2348         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2349         to lll_robust_cond_lock.
2350         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2351         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2352         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2353         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2354         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2355         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2356         lll_futex_wait.
2357         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2358         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2359         lll_futex_wake.
2360         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2361         pshared variable, pass it to lll_lock, lll_unlock,
2362         lll_futex_timedwait and lll_futex_wake.
2363         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2364         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2365         and lll_futex_wake.
2366         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2367         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2368         macro.
2369         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2370         lll_futex_wake_unlock): Likewise.
2371         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2372         Likewise.
2373         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2374         lll_futex_wake_unlock): Likewise.
2375         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2376         Likewise.
2377         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2378         lll_futex_wake_unlock): Likewise.
2379         (lll_futex_wake): Fix a typo.
2380         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2382         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2383         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2384         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2386         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2387         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2389         (__pthread_cond_timedwait): Likewise.
2390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2391         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2393 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2395         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2396         Don't use CGOTSETUP and CGOTRESTORE macros.
2397         (CGOTSETUP, CGOTRESTORE): Remove.
2398         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2399         @local symbol.
2401 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2403         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2404         definitions for private futexes.
2405         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2406         kernel-features.h and lowlevellock.h.  Use private futexes if
2407         they are available.
2408         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2409         (__lll_mutex_lock_wait): Rename to
2410         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2411         (__lll_mutex_timedlock_wait): Rename to ...
2412         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2413         Don't compile in for libc.so.
2414         (__lll_mutex_unlock_wake): Rename to ...
2415         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2416         (__lll_timedwait_tid): Use __NR_gettimeofday.
2417         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2418         the header from assembler.  Renamed all lll_mutex_* resp.
2419         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2420         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2421         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2422         Define.
2423         (__lll_lock_wait_private): Add prototype.
2424         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2425         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2426         __lll_unlock_wake): Likewise.
2427         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2428         if private is constant LLL_PRIVATE.
2429         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2430         lll_timedlock, lll_robust_timedlock): Add private argument.
2431         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2432         if private is constant LLL_PRIVATE.
2433         (lll_robust_unlock, lll_robust_dead): Add private argument.
2434         (lll_lock_t): Remove.
2435         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2436         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2437         lll_cond_wake, lll_cond_broadcast): Remove.
2438         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2439         kernel-features.h and lowlevellock.h.
2440         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2441         (LOAD_FUTEX_WAIT): Define.
2442         (__lll_robust_mutex_lock_wait): Rename to ...
2443         (__lll_robust_lock_wait): ... this.  Add private argument.
2444         Use LOAD_FUTEX_WAIT macro.
2445         (__lll_robust_mutex_timedlock_wait): Rename to ...
2446         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2447         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2448         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2449         lowlevellock.h.
2450         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2451         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2452         __lll_mutex_{lock,unlock}_*.
2453         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2454         lowlevellock.h and pthread-errnos.h.
2455         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2456         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2457         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2458         __lll_mutex_{lock,unlock}_*.
2459         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2460         lowlevellock.h and pthread-errnos.h.
2461         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2462         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2463         __lll_mutex_{lock,unlock}_*.
2464         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2465         lowlevellock.h.
2466         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2467         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2468         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2469         (__condvar_tw_cleanup): Likewise.
2470         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2471         lowlevellock.h.
2472         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2473         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2474         __lll_mutex_{lock,unlock}_*.
2475         ( __condvar_w_cleanup): Likewise.
2476         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2477         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2478         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2479         lowlevellock.h.
2480         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2481         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2482         __lll_mutex_{lock,unlock}_*.
2483         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2484         lowlevellock.h.
2485         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2486         FUTEX_PRIVATE_FLAG): Remove.
2487         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2488         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2489         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2490         lowlevellock.h.
2491         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2492         FUTEX_PRIVATE_FLAG): Remove.
2493         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2494         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2495         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2496         lowlevellock.h.
2497         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2498         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2499         __lll_mutex_{lock,unlock}_*.
2500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2501         lowlevellock.h.
2502         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2503         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2504         __lll_mutex_{lock,unlock}_*.
2505         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2506         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2507         (__new_sem_post): Use standard initial exec code sequences.
2508         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2509         lowlevellock.h.
2510         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2511         FUTEX_PRIVATE_FLAG): Remove.
2512         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2513         exec code sequences.
2514         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2515         (__new_sem_trywait): Use standard initial exec code sequences.
2516         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2517         (__new_sem_wait): Use standard initial exec code sequences.
2519 2007-07-31  Anton Blanchard  <anton@samba.org>
2521         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2522         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2523         atomic_full_barrier.
2525 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2527         * allocatestack.c (stack_cache_lock): Change type to int.
2528         (get_cached_stack, allocate_stack, __deallocate_stack,
2529         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2530         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2531         as second argument to lll_lock and lll_unlock macros on
2532         stack_cache_lock.
2533         * pthread_create.c (__find_in_stack_list): Likewise.
2534         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2535         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2536         as second argument.
2537         * descr.h (struct pthread): Change lock and setxid_futex field
2538         type to int.
2539         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2540         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2541         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2542         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2543         Likewise.
2544         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2545         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2546         * pthreadP.h (__attr_list_lock): Change type to int.
2547         * pthread_attr_init.c (__attr_list_lock): Likewise.
2548         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2549         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2550         lll_{,un}lock.
2551         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2552         also for lll_futex_{wake,wait}.
2553         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2554         a pointer to const.
2555         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2556         LLL_SHARED as second argument to lll_{,un}lock.
2557         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2558         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2559         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2560         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2561         Likewise.
2562         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2563         as second argument to lll_{,un}lock macros on pd->lock.
2564         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2565         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2566         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2567         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2568         Likewise.
2569         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2570         Likewise.
2571         * pthread_once.c (once_lock): Change type to int.
2572         (__pthread_once): Pass LLL_PRIVATE as second argument to
2573         lll_{,un}lock macros on once_lock.
2574         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2575         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2576         rwlock->__data.__shared as second argument to them and similarly
2577         for lll_futex_w*.
2578         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2579         Likewise.
2580         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2581         Likewise.
2582         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2583         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2584         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2585         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2586         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2587         to lll_{,un}lock macros on __sem_mappings_lock.
2588         * sem_open.c (check_add_mapping): Likewise.
2589         (__sem_mappings_lock): Change type to int.
2590         * semaphoreP.h (__sem_mappings_lock): Likewise.
2591         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2592         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2593         instead of lll_*mutex_*, pass LLL_SHARED as last
2594         argument.
2595         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2596         pass LLL_SHARED as last argument.
2597         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2598         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2599         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2600         pass LLL_SHARED as last argument.
2601         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2602         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2603         LLL_SHARED as last argument.
2604         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2605         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2606         Similarly.
2607         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2608         __libc_lock_lock_recursive, __libc_lock_unlock,
2609         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2610         argument to lll_{,un}lock.
2611         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2612         _IO_lock_unlock): Likewise.
2613         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2614         compound literal.
2615         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2616         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2617         __fork_lock.
2618         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2619         free_mem): Likewise.
2620         (__fork_lock): Change type to int.
2621         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2622         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2623         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2624         lll_futex_wake.
2625         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2626         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2627         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2628         New function.
2629         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2630         pass it through to lll_futex_*wait, only compile in when
2631         IS_IN_libpthread.
2632         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2633         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2634         argument and pass it through to lll_futex_*wait.
2635         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2636         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2637         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2638         inline functions to __lll_* resp. __lll_robust_*.
2639         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2640         (lll_mutex_dead): Add private argument.
2641         (__lll_lock_wait_private): New prototype.
2642         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2643         __lll_robust_lock_timedwait): Add private argument to prototypes.
2644         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2645         call __lll_lock_wait_private, otherwise pass private to
2646         __lll_lock_wait.
2647         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2648         __lll_robust_timedlock): Add private argument, pass it to
2649         __lll_*wait functions.
2650         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2651         call __lll_unlock_wake_private, otherwise pass private to
2652         __lll_unlock_wake.
2653         (__lll_robust_unlock): Add private argument, pass it to
2654         __lll_robust_unlock_wake.
2655         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2656         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2657         argument, pass it through to __lll_* inline function.
2658         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2659         (lll_lock_t): Remove.
2660         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2661         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2662         lll_cond_wake, lll_cond_broadcast): Remove.
2663         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2664         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2665         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2666         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2667         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2668         the header from assembler.  Renamed all lll_mutex_* resp.
2669         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2670         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2671         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2672         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2673         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2674         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2675         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2676         Remove prototype.
2677         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2678         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2679         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2680         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2681         MULTIPLE_THREADS_OFFSET as another asm operand.
2682         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2683         MULTIPLE_THREADS_OFFSET as last asm operand, call
2684         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2685         otherwise pass private as another argument to __lll_lock_wait.
2686         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2687         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2688         private as another argument to __lll_*lock_wait call.
2689         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2690         MULTIPLE_THREADS_OFFSET as another asm operand, call
2691         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2692         otherwise pass private as another argument to __lll_unlock_wake.
2693         (lll_robust_unlock): Add private argument, pass private as another
2694         argument to __lll_unlock_wake.
2695         (lll_robust_dead): Add private argument, use __lll_private_flag
2696         macro.
2697         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2698         LLL_MUTEX_LOCK_INITIALIZER.
2699         (lll_lock_t): Remove.
2700         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2701         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2702         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2703         lll_cond_wake, lll_cond_broadcast): Remove.
2704         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2705         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2706         2007-05-2{3,9} changes.
2707         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2708         kernel-features.h and lowlevellock.h.
2709         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2710         (LOAD_FUTEX_WAIT): Rewritten.
2711         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2712         define.
2713         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2714         (__lll_mutex_lock_wait): Rename to ...
2715         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2716         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2717         (__lll_mutex_timedlock_wait): Rename to ...
2718         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2719         contains private argument.  Don't compile in for libc.so.
2720         (__lll_mutex_unlock_wake): Rename to ...
2721         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2722         Don't compile in for libc.so.
2723         (__lll_timedwait_tid): Use __NR_gettimeofday.
2724         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2725         kernel-features.h and lowlevellock.h.
2726         (LOAD_FUTEX_WAIT): Define.
2727         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2728         define.
2729         (__lll_robust_mutex_lock_wait): Rename to ...
2730         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2731         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2732         macro.
2733         (__lll_robust_mutex_timedlock_wait): Rename to ...
2734         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2735         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2736         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2737         lowlevellock.h.
2738         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2739         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2740         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2741         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2742         to __lll_lock_wait in %edx.
2743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2744         Include lowlevellock.h and pthread-errnos.h.
2745         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2746         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2747         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2748         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2749         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2750         __lll_unlock_wake.
2751         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2752         Include lowlevellock.h and pthread-errnos.h.
2753         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2754         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2755         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2756         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2757         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2758         __lll_unlock_wake.
2759         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2760         Include lowlevellock.h.
2761         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2762         Don't define.
2763         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2764         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2765         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2766         __lll_unlock_wake.  Use __NR_gettimeofday.
2767         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2768         Include lowlevellock.h.
2769         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2770         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2771         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2772         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2773         and __lll_unlock_wake.
2774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2775         Include lowlevellock.h.
2776         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2777         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2778         MUTEX(%ebx) address in %edx rather than %ecx to
2779         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2780         and __lll_unlock_wake.  Move return value from %ecx to %edx
2781         register.
2782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2783         Include lowlevellock.h.
2784         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2785         Don't define.
2786         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2787         MUTEX(%ebp) address in %edx rather than %ecx to
2788         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2789         and __lll_unlock_wake.  Move return value from %ecx to %edx
2790         register.  Use __NR_gettimeofday.
2791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2792         Include lowlevellock.h.
2793         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2794         Don't define.
2795         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2796         MUTEX(%ebp) address in %edx rather than %ecx to
2797         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2798         and __lll_unlock_wake.  Move return value from %ecx to %edx
2799         register.  Use __NR_gettimeofday.
2800         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2801         Include lowlevellock.h.
2802         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2803         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2804         MUTEX(%edi) address in %edx rather than %ecx to
2805         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2806         and __lll_unlock_wake.
2807         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2808         Include lowlevellock.h.
2809         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2810         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2811         MUTEX(%ebx) address in %edx rather than %ecx to
2812         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2813         and __lll_unlock_wake.  Move return value from %ecx to %edx
2814         register.
2815         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2816         lowlevellock.h.
2817         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2818         define.
2819         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2820         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2821         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2822         lowlevellock.h.
2823         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2824         (sem_timedwait): Use __NR_gettimeofday.
2825         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2826         lowlevellock.h.
2827         (LOCK): Don't define.
2828         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2829         lowlevellock.h.
2830         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2831         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2832         are waiters.
2833         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2834         2007-05-2{3,9} changes.
2835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2836         kernel-features.h and lowlevellock.h.
2837         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2838         (LOAD_FUTEX_WAIT): Rewritten.
2839         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2840         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2841         (__lll_mutex_lock_wait): Rename to ...
2842         (__lll_lock_wait): ... this.  %esi is now private argument.
2843         Don't compile in for libc.so.
2844         (__lll_mutex_timedlock_wait): Rename to ...
2845         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2846         Don't compile in for libc.so.
2847         (__lll_mutex_unlock_wake): Rename to ...
2848         (__lll_unlock_wake): ... this.  %esi contains private argument.
2849         Don't compile in for libc.so.
2850         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2851         kernel-features.h and lowlevellock.h.
2852         (LOAD_FUTEX_WAIT): Define.
2853         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2854         (__lll_robust_mutex_lock_wait): Rename to ...
2855         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2856         Use LOAD_FUTEX_WAIT macro.
2857         (__lll_robust_mutex_timedlock_wait): Rename to ...
2858         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2859         private, use LOAD_FUTEX_WAIT macro.
2860         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2861         lowlevellock.h.
2862         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2863         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2864         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2865         __lll_lock_wait and __lll_unlock_wake.
2866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2867         Include lowlevellock.h and pthread-errnos.h.
2868         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2869         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2870         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2871         pass LLL_SHARED in %esi to both __lll_lock_wait and
2872         __lll_unlock_wake.
2873         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2874         Include lowlevellock.h and pthread-errnos.h.
2875         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2876         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2877         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2878         pass LLL_SHARED in %esi to both __lll_lock_wait and
2879         __lll_unlock_wake.
2880         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2881         Include lowlevellock.h.
2882         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2883         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2884         pass LLL_SHARED in %esi to both __lll_lock_wait and
2885         __lll_unlock_wake.
2886         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2887         Include lowlevellock.h.
2888         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2889         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2890         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2891         and __lll_unlock_wake.
2892         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2893         Include lowlevellock.h.
2894         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2895         Don't define.
2896         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2897         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2898         and __lll_unlock_wake.
2899         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2900         Include lowlevellock.h.
2901         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2902         Don't define.
2903         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2904         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2905         and __lll_unlock_wake.
2906         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2907         Include lowlevellock.h.
2908         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2909         Don't define.
2910         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2911         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2912         and __lll_unlock_wake.
2913         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2914         Include lowlevellock.h.
2915         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2916         Don't define.
2917         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2918         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2919         and __lll_unlock_wake.
2920         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2921         Include lowlevellock.h.
2922         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2923         Don't define.
2924         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2925         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2926         and __lll_unlock_wake.
2927         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2928         lowlevellock.h.
2929         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2930         define.
2931         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2932         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2933         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2934         lowlevellock.h.
2935         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2936         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2937         lowlevellock.h.
2938         (LOCK): Don't define.
2939         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2940         lowlevellock.h.
2941         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2942         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2943         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2944         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2945         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2946         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2947         (__lll_lock_wait_private): New function.
2948         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2949         it to lll_futex_*wait.  Don't compile in for libc.so.
2950         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2951         Remove.
2952         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2953         (struct sparc_pthread_barrier): Remove.
2954         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2955         struct sparc_pthread_barrier.  Pass
2956         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2957         and lll_futex_wait macros.
2958         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2959         Remove.
2960         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2961         Include sparc pthread_barrier_wait.c instead of generic one.
2963 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2965         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2967         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2968         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2969         %ecx.
2970         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2971         (pthread_rwlock_timedwrlock): Likewise.
2972         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2973         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2975 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2977         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2979 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2981         * tst-locale2.c (useless): Add return statement.
2983 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2985         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2986         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2987         * pthread_create.c (start_thread): Likewise.
2988         * init.c (sighandler_setxid): Likewise.
2989         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2990         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2991         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2992         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2993         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2994         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2995         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2996         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2997         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2998         Likewise.
2999         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3000         Likewise.
3001         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3002         Likewise.
3003         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3004         __rtld_notify): Likewise.
3005         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3006         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3007         __pthread_once): Likewise.
3008         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3009         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3010         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3011         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3012         (lll_futex_wait): Add private argument, define as wrapper around
3013         lll_futex_timed_wait.
3014         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3015         use __lll_private_flag macro.
3016         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3017         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3018         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3019         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3020         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3021         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3022         (lll_futex_wait): Add private argument, define as wrapper around
3023         lll_futex_timed_wait.
3024         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3025         use __lll_private_flag macro.
3026         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3027         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3028         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3029         Define.
3030         (lll_futex_timed_wait, lll_futex_wake): Use it.
3031         (lll_private_futex_wait, lll_private_futex_timed_wait,
3032         lll_private_futex_wake): Removed.
3033         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3034         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3035         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3036         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3037         (lll_futex_wait): Add private argument, define as wrapper around
3038         lll_futex_timed_wait.
3039         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3040         use __lll_private_flag macro.
3041         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3042         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3043         to lll_futex_*.
3044         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3045         (lll_private_futex_wait, lll_private_futex_timed_wait,
3046         lll_private_futex_wake): Removed.
3047         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3048         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3049         (lll_private_futex_wait, lll_private_futex_timed_wait,
3050         lll_private_futex_wake): Removed.
3051         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3052         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3053         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3054         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3055         (lll_futex_wait): Add private argument, define as wrapper around
3056         lll_futex_timed_wait.
3057         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3058         use __lll_private_flag macro.
3059         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3060         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3061         to lll_futex_*.
3062         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3063         Define.
3064         (lll_futex_timed_wait, lll_futex_wake): Use it.
3065         (lll_private_futex_wait, lll_private_futex_timed_wait,
3066         lll_private_futex_wake): Removed.
3068 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3070         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3071         of the structure for sparc32.
3073 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3075         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3077 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3079         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3080         code used when private futexes are assumed.
3081         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3082         Likewise.
3084 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3086         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3087         (__lll_private_flag): Define.
3088         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3089         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3090         __lll_private_flag.
3091         (lll_private_futex_wait, lll_private_futex_timedwait,
3092         lll_private_futex_wake): Define as wrapper around non-_private
3093         macros.
3094         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3095         (__lll_private_flag): Define.
3096         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3097         (lll_private_futex_wait, lll_private_futex_timedwait,
3098         lll_private_futex_wake): Define as wrapper around non-_private
3099         macros.
3101 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3103         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3104         parameter to lll_futex_wait call.
3105         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3107         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3108         Replace lll_futex_wait with lll_private_futex_wait.
3109         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3110         Add LLL_SHARED parameter to lll_futex_wake().
3112         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3113         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3114         lll_private_futex_wake.
3115         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3116         bit from private parm before syscall.
3117         (lll_futex_timed_wait): Likewise.
3118         (lll_futex_wake): Likewise.
3119         (lll_futex_wake_unlock): Likewise.
3120         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3121         (lll_robust_mutex_unlock): Likewise.
3122         (lll_mutex_unlock_force): Likewise.
3123         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3125 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3127         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3128         compilation when unconditionally using private futexes.
3129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3131         Likewise.
3132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3133         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3135 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3137         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3138         Define.
3140 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3142         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3143         kernel-features.h.
3145 2007-05-16  Roland McGrath  <roland@redhat.com>
3147         * init.c (__nptl_initial_report_events): New variable.
3148         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3149         to that.
3151 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3153         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3154         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3156 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3158         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3159         implementation.
3161 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3163         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3164         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3165         * pthread_mutex_timedlock.c: Likewise.
3166         * pthread_mutex_trylock.c: Likewise.
3167         * pthread_mutex_unlock.c: Likewise.
3169 2007-06-17  Andreas Schwab  <schwab@suse.de>
3171         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3172         sections.
3174 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3176         * allocatestack.c (allocate_stack): Make code compile if
3177         __ASSUME_PRIVATE_FUTEX is set.
3179 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3182         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3184         (__pthread_rwlock_wrlock): Likewise.
3185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3186         (pthread_rwlock_timedrdlock): Likewise.
3187         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3188         (pthread_rwlock_timedwrlock): Likewise.
3189         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3190         (__pthread_rwlock_unlock): Likewise.
3192 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3194         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3195         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3196         Split __flags into __flags, __shared, __pad1 and __pad2.
3197         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3198         futexes if they are available.
3199         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3200         in libc-lowlevellock.S allow using private futexes.
3201         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3202         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3203         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3204         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3205         lll_private_futex_timed_wait and lll_private_futex_wake.
3206         (lll_robust_mutex_unlock): Fix typo.
3207         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3208         field in futex command setup.
3209         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3210         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3211         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3212         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3213         if they are available.  Remove clear_once_control.
3214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3215         futexes if they are available.
3216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3217         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3219         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3220         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3221         Wake only when there are waiters.
3222         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3223         support.  Indicate that there are waiters.  Remove unnecessary
3224         extra cancellation test.
3225         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3226         left-over duplication of __sem_wait_cleanup.
3228 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3230         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3231         parameter to lll_futex_wait, lll_futex_timed_wait, and
3232         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3233         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3234         lll_private_futex_wake.
3235         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3236         * allocatestack.c: Adjust use of lll_futex_* macros.
3237         * init.c: Likewise.
3238         * lowlevellock.h: Likewise.
3239         * pthread_barrier_wait.c: Likewise.
3240         * pthread_cond_broadcast.c: Likewise.
3241         * pthread_cond_destroy.c: Likewise.
3242         * pthread_cond_signal.c: Likewise.
3243         * pthread_cond_timedwait.c: Likewise.
3244         * pthread_cond_wait.c: Likewise.
3245         * pthread_create.c: Likewise.
3246         * pthread_mutex_lock.c: Likewise.
3247         * pthread_mutex_setprioceiling.c: Likewise.
3248         * pthread_mutex_timedlock.c: Likewise.
3249         * pthread_mutex_unlock.c: Likewise.
3250         * pthread_rwlock_timedrdlock.c: Likewise.
3251         * pthread_rwlock_timedwrlock.c: Likewise.
3252         * pthread_rwlock_unlock.c: Likewise.
3253         * sysdeps/alpha/tls.h: Likewise.
3254         * sysdeps/i386/tls.h: Likewise.
3255         * sysdeps/ia64/tls.h: Likewise.
3256         * sysdeps/powerpc/tls.h: Likewise.
3257         * sysdeps/pthread/aio_misc.h: Likewise.
3258         * sysdeps/pthread/gai_misc.h: Likewise.
3259         * sysdeps/s390/tls.h: Likewise.
3260         * sysdeps/sh/tls.h: Likewise.
3261         * sysdeps/sparc/tls.h: Likewise.
3262         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3263         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3264         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3265         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3266         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3267         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3268         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3269         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3270         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3271         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3272         Likewise.
3273         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3274         * sysdeps/x86_64/tls.h: Likewise.
3276 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3278         * pthread_getattr_np.c: No need to install a cancellation handler,
3279         this is no cancellation point.
3280         * pthread_getschedparam.c: Likewise.
3281         * pthread_setschedparam.c: Likewise.
3282         * pthread_setschedprio.c: Likewise.
3283         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3284         lll_unlock_wake_cb.
3285         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3286         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3287         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3288         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3289         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3290         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3291         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3292         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3293         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3294         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3296         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3298         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3299         whether there are more than one thread makes no sense here since
3300         we only call the slow path if the locks are taken.
3301         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3303         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3304         COND_NWAITERS_SHIFT.
3305         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3306         COND_CLOCK_BITS.
3307         * pthread_cond_init.c: Likewise.
3308         * pthread_cond_timedwait.c: Likewise.
3309         * pthread_cond_wait.c: Likewise.
3310         * pthread_condattr_getclock.c: Likewise.
3311         * pthread_condattr_setclock.c: Likewise.
3312         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3314         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3315         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3316         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3318 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3320         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3321         unistd.h.
3323         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3324         insn suffix.
3325         (THREAD_GSCOPE_GET_FLAG): Remove.
3326         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3327         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3328         changes.
3329         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3330         (THREAD_GSCOPE_GET_FLAG): Remove.
3331         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3332         instead of THREAD_GSCOPE_GET_FLAG.
3333         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3334         it.
3335         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3336         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3337         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3338         THREAD_GSCOPE_WAIT): Define.
3339         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3340         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3341         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3342         THREAD_GSCOPE_WAIT): Define.
3343         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3344         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3345         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3346         THREAD_GSCOPE_WAIT): Define.
3347         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3348         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3349         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3350         THREAD_GSCOPE_WAIT): Define.
3352 2007-05-24  Richard Henderson  <rth@redhat.com>
3354         * descr.h (struct pthread): Add header.gscope_flag.
3355         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3356         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3357         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3358         THREAD_GSCOPE_WAIT): Define.
3360 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3362         * init.c: Make it compile with older kernel headers.
3364         * tst-initializers1.c: Show through exit code which test failed.
3366         * pthread_rwlock_init.c: Also initialize __shared field.
3367         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3368         element in rwlock structure into four byte elements.  One of them is
3369         the new __shared element.
3370         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3371         Likewise.
3372         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3373         __shared, adjust names of other padding elements.
3374         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3375         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3376         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3377         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3378         FUTEX_PRIVATE_FLAG.
3379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3380         futex to use private operations if possible.
3381         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3382         Likewise.
3383         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3384         Likewise.
3385         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3386         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3387         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3389         Likewise.
3390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3391         Likewise.
3392         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3395 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3397         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3398         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3399         * pthread_rwlock_timedrdlock.c: Likewise.
3400         * pthread_rwlock_tryrdlock.c: Likewise.
3402         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3403         optimization.
3405         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3406         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3407         duplication of __sem_wait_cleanup.
3409         * allocatestack.c: Revert last change.
3410         * init.c: Likewise.
3411         * sysdeps/i386/tls.h: Likewise.
3412         * sysdeps/x86_64/tls.h: Likewise.
3413         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3414         header structure.
3415         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3417         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3418         Add private field.
3419         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3420         * pthread_barrier_init.c: Set private flag if pshared and private
3421         futexes are supported.
3422         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3423         private field in futex command setup.
3424         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3426 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3428         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3429         support.
3430         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3431         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3432         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3433         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3434         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3436         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3437         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3438         fields in the structure.
3439         (__old_sem_init): New function.
3440         * sem_open.c: Initialize all fields of the structure.
3441         * sem_getvalue.c: Adjust for renamed element.
3442         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3443         (gen-as-const-headers): Add structsem.sym.
3444         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3445         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3446         struct new_sem.  Add struct old_sem.
3447         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3448         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3449         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3450         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3451         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3452         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3453         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3454         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3455         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3456         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3457         * tst-sem10.c: New file.
3458         * tst-sem11.c: New file.
3459         * tst-sem12.c: New file.
3460         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3461         of struct sem.
3463 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3464             Jakub Jelinek  <jakub@redhat.com>
3466         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3467         Move __pthread_enable_asynccancel right before futex syscall.
3468         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3469         Likewise.
3471 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3473         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3474         THREAD_COPY_PRIVATE_FUTEX): Define.
3475         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3476         THREAD_COPY_PRIVATE_FUTEX): Define.
3477         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3478         * init.c (__pthread_initialize_minimal_internal): Use
3479         THREAD_SET_PRIVATE_FUTEX.
3481         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3482         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3483         THREAD_GSCOPE_FLAG_WAIT): Define.
3484         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3485         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3486         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3487         PTR_DEMANGLE.
3488         (THREAD_GSCOPE_GET_FLAG): Define.
3489         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3490         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3491         instead of ->header.gscope_flag directly.
3493 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3495         * init.c (__pthread_initialize_minimal_internal): Check whether
3496         private futexes are available.
3497         * allocatestack.c (allocate_stack): Copy private_futex field from
3498         current thread into the new stack.
3499         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3500         futexes if they are available.
3501         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3502         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3503         in libc-lowlevellock.S allow using private futexes.
3504         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3505         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3506         FUTEX_PRIVATE_FLAG.
3507         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3508         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3509         if they are available.
3510         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3511         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3512         * sysdeps/i386/tcb-offsets.sym: Likewise.
3513         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3514         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3516 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3518         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3519         Remove ptr_wait_lookup_done again.
3520         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3521         (__pthread_initialize_minimal_internal): Initialize
3522         _dl_wait_lookup_done pointer in _rtld_global directly.
3523         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3524         Remove code to code _dl_wait_lookup_done.
3525         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3526         encrypted for now.
3528 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3530         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3531         pthread_mutex_init failed with ENOTSUP.
3533 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3535         * allocatestack.c (__wait_lookup_done): New function.
3536         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3537         Add ptr_wait_lookup_done.
3538         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3539         * pthreadP.h: Declare __wait_lookup_done.
3540         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3541         Define macros to implement reference handling of global scope.
3542         * sysdeps/x86_64/tls.h: Likewise.
3543         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3544         Initialize GL(dl_wait_lookup_done).
3546 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3548         [BZ #4512]
3549         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3550         is detected.
3551         * pthread_mutex_timedlock.c: Likewise.
3552         * pthread_mutex_trylock.c: Likewise.
3553         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3555         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3556         * tst-robust9.c: New file.
3557         * tst-robustpi9.c: New file.
3559         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3560         unnecessary extra cancellation test.
3562 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3564         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3565         extra cancellation test.
3566         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3568 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3570         * descr.h (struct pthread): Rearrange members to fill hole in
3571         64-bit layout.
3573         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3574         (__pthread_setaffinity_new): If syscall was successful and
3575         RESET_VGETCPU_CACHE is defined, use it before returning.
3576         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3578 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3580         [BZ #4455]
3581         * tst-align2.c: Include stackinfo.h.
3582         * tst-getpid1.c: Likewise.
3584 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3586         [BZ #4455]
3587         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3588         * tst-getpid1.c (do_test): Likewise.
3590         [BZ #4456]
3591         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3592         (allocate_stack): Likewise.
3594 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3596         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3597         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3598         (__lll_robust_timedlock_wait): Likewise.
3599         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3601 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3603         [BZ #4465]
3604         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3605         * tst-cancel4.c (tf_fdatasync): New test.
3607 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3609         [BZ #4392]
3610         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3611         check mutexes like normal mutexes.
3613         [BZ #4306]
3614         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3615         Initialize the whole sigevent structure to appease valgrind.
3617 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3619         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3620         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3622 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3624         * tst-locale1.c: Avoid warnings.
3625         * tst-locale2.c: Likewise.
3627 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3629         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3630         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3632 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3634         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3635         __extern_always_inline where appropriate.
3636         * sysdeps/pthread/pthread.h: Likewise.
3638 2007-03-13  Richard Henderson  <rth@redhat.com>
3640         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3641         separate cfi regions for the two subsections.
3643 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3645         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3646         new thread, don't just decrement it.
3647         Patch by Suzuki K P <suzuki@in.ibm.com>.
3649 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3651         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3652         PTHFCT_CALL definition.
3654 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3656         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3657         available, don't use it.
3659 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3661         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3662         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3663         call into the kernel to delay.
3665 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3667         * tst-initializers1.c: We want to test the initializers as seen
3668         outside of libc, so undefined _LIBC.
3670         * pthread_join.c (cleanup): Avoid warning.
3672 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3674         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3675         (__lll_timedwait_tid): Add unwind info.
3677         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3678         function table, mangle the pointers.
3679         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3680         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3681         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3682         demangle pointers before use.
3683         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3684         demangle pointer.
3685         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3686         * sysdeps/pthread/setxid.h: Likewise.
3688 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3690         * tst-rwlock7.c: Show some more information in case of correct
3691         behavior.
3693 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3695         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3696         (lll_futex_timed_wait): Undo part of last change, don't negate
3697         return value.
3699 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3701         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3702         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3704 2006-12-28  David S. Miller  <davem@davemloft.net>
3706         * shlib-versions: Fix sparc64 linux target specification.
3708 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3710         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3711         Adjust include path for pthread_barrier_wait.c move.
3713 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3715         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3716         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3718 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3720         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3721         6 argument cancellable syscalls.
3722         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3723         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3724         6 argument cancellable syscalls.
3725         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3727 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3729         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3730         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3732 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3734         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3735         __sync_lock_release instead of __sync_lock_release_si.
3737 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3739         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3740         Define.
3741         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3742         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3743         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3744         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3745         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3746         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3747         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3748         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3749         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3750         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3751         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3753 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3755         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3756         * pthread_barrier_wait.c: ...here.
3757         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3758         * pthread_cond_broadcast.c: ...here.
3759         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3760         * pthread_cond_signal.c: ...here.
3761         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3762         * pthread_cond_timedwait.c: ...here.
3763         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3764         * pthread_cond_wait.c: ...here.
3765         * sysdeps/pthread/pthread_once.c: Move to...
3766         * pthread_once.c: ...here.
3767         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3768         * pthread_rwlock_rdlock.c: ...here.
3769         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3770         * pthread_rwlock_timedrdlock.c: ...here.
3771         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3772         * pthread_rwlock_timedwrlock.c: ...here.
3773         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3774         * pthread_rwlock_unlock.c: ...here.
3775         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3776         * pthread_rwlock_wrlock.c: ...here.
3777         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3778         * pthread_spin_destroy.c: ...here.
3779         * sysdeps/pthread/pthread_spin_init.c: Move to...
3780         * pthread_spin_init.c: ...here.
3781         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3782         * pthread_spin_unlock.c: ...here.
3783         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3784         * pthread_getcpuclockid.c: ...here.
3786         * init.c: USE_TLS support is now always enabled.
3787         * tst-tls5.h: Likewise.
3788         * sysdeps/alpha/tls.h: Likewise.
3789         * sysdeps/i386/tls.h: Likewise.
3790         * sysdeps/ia64/tls.h: Likewise.
3791         * sysdeps/powerpc/tls.h: Likewise.
3792         * sysdeps/s390/tls.h: Likewise.
3793         * sysdeps/sh/tls.h: Likewise.
3794         * sysdeps/sparc/tls.h: Likewise.
3795         * sysdeps/x86_64/tls.h: Likewise.
3797 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3799         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3800         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3801         failed.
3803         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3804         Define to THREAD_SELF->header.multiple_threads.
3805         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3806         Likewise.
3807         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3808         Likewise.
3809         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3810         (SINGLE_THREAD_P): Likewise.
3811         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3812         (SINGLE_THREAD_P): Likewise.
3813         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3814         (SINGLE_THREAD_P): Likewise.
3815         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3816         (SINGLE_THREAD_P): Likewise.
3817         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3818         Likewise.
3819         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3820         (SINGLE_THREAD_P): Likewise.
3821         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3822         (SINGLE_THREAD_P): Likewise.
3823         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3824         Likewise.
3826 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3828         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3829         by default rather than 2_3_3.
3831 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3833         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3834         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3835         atomic_* instead of catomic_* macros.
3837 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3839         [BZ #3285]
3840         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3841         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3842         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3843         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3844         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3845         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3846         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3847         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3848         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3849         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3850         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3851         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3852         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3854 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3856         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3857         cancelable syscalls with six parameters.
3859         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3860         operations instead of atomic_*.
3862 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3864         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3866 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3868         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3869         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3870         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3871         New file.
3872         * pthread_attr_setstack.c: Allow overwriting the version number of the
3873         new symbol.
3874         * pthread_attr_setstacksize.c: Likewise.
3875         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3876         it.
3877         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3878         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3880 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3882         [BZ #3251]
3883         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3884         Patch by Petr Baudis.
3886 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3888         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3890         * tst-cancel2.c (tf): Loop as long as something was written.
3892 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3894         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3895         mutexes wake all mutexes.
3896         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3897         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3898         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3900 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3902         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3903         to guarantee the thread is always canceled.
3905 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3907         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3908         Include stdlib.h.
3909         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3910         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3912         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3913         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3915 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3917         [BZ #3123]
3918         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3919         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3923         * Makefile (tests): Add tst-cond22.
3924         * tst-cond22.c: New file.
3926 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3928         [BZ #3124]
3929         * descr.h (struct pthread): Add parent_cancelhandling.
3930         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3931         cancelhandling value to child.
3932         * pthread_create.c (start_thread): If parent thread was canceled
3933         reset the SIGCANCEL mask.
3934         * Makefile (tests): Add tst-cancel25.
3935         * tst-cancel25.c: New file.
3937 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3938             Ulrich Drepper  <drepper@redhat.com>
3940         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3941         counterp if it is already zero.
3942         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3944 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3945             Roland McGrath  <roland@redhat.com>
3947         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3948         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3949         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3950         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3951         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3952         lll_robust_mutex_timedlock, lll_mutex_unlock,
3953         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3954         Add _L_*_ symbols around the subsection.
3955         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3956         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3958 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3959             Roland McGrath  <roland@redhat.com>
3961         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3962         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3963         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3964         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3965         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3966         lll_robust_mutex_timedlock, lll_mutex_unlock,
3967         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3968         Add _L_*_ symbols around the subsection.
3969         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3970         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3972 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3974         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3975         change because it can disturb too much existing code.  If real hard
3976         reader preference is needed we'll introduce another type.
3977         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3978         (pthread_rwlock_timedwrlock): Likewise.
3979         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3980         Likewise.
3982 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3984         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3985         reader preference.
3986         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3987         (pthread_rwlock_timedwrlock): Likewise.
3988         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3989         Likewise.
3991 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3993         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3994         Only define ifdef SHARED.
3996 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3998         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3999         (free_stacks): ...here.
4000         (__free_stack_cache): New function.
4001         * pthreadP.h: Declare __free_stack_cache.
4002         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4003         ptr_freeres.
4004         * init.c (pthread_functions): Initialize ptr_freeres.
4005         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4006         New freeres function.
4008 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4010         [BZ #3018]
4011         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4013 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4015         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4016         _XOPEN_REALTIME_THREADS.
4018 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4020         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4021         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4022         HAVE_CLOCK_GETTIME_VSYSCALL.
4023         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4025 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4027         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4028         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4029         * descr.h (struct priority_protection_data): New type.
4030         (struct pthread): Add tpp field.
4031         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4032         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4033         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4034         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4035         TPP mutexes.
4036         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4037         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4038         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4039         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4040         * tpp.c: New file.
4041         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4042         boosted by TPP.
4043         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4044         * pthread_mutexattr_getprioceiling.c
4045         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4046         in the SCHED_FIFO priority range.
4047         * pthread_mutexattr_setprioceiling.c
4048         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4049         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4050         if mutex is not TPP.  Ceiling is now in __data.__lock.
4051         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4052         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4053         is now in __data.__lock.  Add locking.
4054         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4055         * Makefile (libpthread-routines): Add tpp.
4056         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4057         * tst-tpp.h: New file.
4058         * tst-mutexpp1.c: New file.
4059         * tst-mutexpp6.c: New file.
4060         * tst-mutexpp10.c: New file.
4061         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4062         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4064 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4066         [BZ #2843]
4067         * pthread_join.c (pthread_join): Account for self being canceled
4068         when checking for deadlocks.
4069         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4070         (tf1): Don't print anything after pthread_join returns, this would be
4071         another cancellation point.
4072         (tf2): Likewise.
4073         * tst-join6.c: New file.
4074         * Makefile (tests): Add tst-join6.
4076 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4078         [BZ #2892]
4079         * pthread_setspecific.c (__pthread_setspecific): Check
4080         out-of-range index before checking for unused key.
4082         * sysdeps/pthread/gai_misc.h: New file.
4084 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4087         file.  Don't use sysctl.
4088         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4089         overwrite the file if this is likely not true.
4091 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4093         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4094         * Makefile (tests): Add tst-getpid3.
4095         * tst-getpid3.c: New file.
4097 2006-07-30  Roland McGrath  <roland@redhat.com>
4099         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4101         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4102         (pause_not_cancel): New macro.
4103         (nanosleep_not_cancel): New macro.
4104         (sigsuspend_not_cancel): New macro.
4105         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4106         nanosleep_not_cancel macro from <not-cancel.h>.
4107         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4108         macro from <not-cancel.h>.
4110 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4111             Jakub Jelinek  <jakub@redhat.com>
4113         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4114         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4115         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4116         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4117         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4118         * pthread_mutex_lock.c: Likewise.
4119         * pthread_mutex_timedlock.c: Likewise.
4120         * pthread_mutex_trylock.c: Likewise.
4121         * pthread_mutex_unlock.c: Likewise.
4122         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4123         all mutexes.
4124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4126         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4127         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4128         pthread-pi-defines.sym.
4129         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4130         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4131         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4132         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4133         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4134         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4135         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4136         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4137         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4138         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4139         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4140         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4141         * tst-mutex2.c: Likewise.
4142         * tst-mutex3.c: Likewise.
4143         * tst-mutex4.c: Likewise.
4144         * tst-mutex5.c: Likewise.
4145         * tst-mutex6.c: Likewise.
4146         * tst-mutex7.c: Likewise.
4147         * tst-mutex7a.c: Likewise.
4148         * tst-mutex8.c: Likewise.
4149         * tst-mutex9.c: Likewise.
4150         * tst-robust1.c: Likewise.
4151         * tst-robust7.c: Likewise.
4152         * tst-robust8.c: Likewise.
4153         * tst-mutexpi1.c: New file.
4154         * tst-mutexpi2.c: New file.
4155         * tst-mutexpi3.c: New file.
4156         * tst-mutexpi4.c: New file.
4157         * tst-mutexpi5.c: New file.
4158         * tst-mutexpi6.c: New file.
4159         * tst-mutexpi7.c: New file.
4160         * tst-mutexpi7a.c: New file.
4161         * tst-mutexpi8.c: New file.
4162         * tst-mutexpi9.c: New file.
4163         * tst-robust1.c: New file.
4164         * tst-robust2.c: New file.
4165         * tst-robust3.c: New file.
4166         * tst-robust4.c: New file.
4167         * tst-robust5.c: New file.
4168         * tst-robust6.c: New file.
4169         * tst-robust7.c: New file.
4170         * tst-robust8.c: New file.
4171         * Makefile (tests): Add the new tests.
4173         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4174         * pthread_mutex_destroy.c: Remove unneeded label.
4176 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4178         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4179         computations to compile time.
4181 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4183         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4185 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4187         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4189 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4191         * pthread_key_create.c (__pthread_key_create): Do away with
4192         __pthread_keys_lock.
4194         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4195         (__kernel_cpumask_size): Mark as hidden.
4196         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4198         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4199         * semaphoreP.h (__sem_mappings_lock): Likewise.
4201 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4203         * pthread_atfork.c: Mark __dso_handle as hidden.
4205 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4207         [BZ #2644]
4208         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4209         the reload problem.  Change the one path in pthread_cancel_init
4210         which causes the problem.  Force gcc to reload.  Simplify callers.
4211         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4212         (_Unwind_GetBSP): Undo last patch.
4214 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4216         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4217         function pointer is reloaded after pthread_cancel_init calls.
4219         [BZ #2644]
4220         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4221         pointers are reloaded after pthread_cancel_init calls.
4223 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4225         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4226         __always_inline.
4228 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4230         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4231         Allocate new object which is passed to timer_sigev_thread so that
4232         the timer can be deleted before the new thread is scheduled.
4234 2006-04-26  Roland McGrath  <roland@redhat.com>
4236         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4238 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4240         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4241         suffix for conditional jumps.
4242         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4243         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4244         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4245         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4246         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4247         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4249         * init.c (sigcancel_handler): Compare with correct PID even if the
4250         thread is in the middle of a fork call.
4251         (sighandler_setxid): Likewise.
4252         Reported by Suzuki K P <suzuki@in.ibm.com> .
4254 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4256         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4258 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4260         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4261         fails [Coverity CID 105].
4263 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4265         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4267 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4269         [BZ #2505]
4270         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4271         Define __lll_rel_instr using lwsync.
4273 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4275         * allocatestack.c (allocate_stack): Always initialize robust_head.
4276         * descr.h: Define struct robust_list_head.
4277         (struct pthread): Use robust_list_head in robust mutex list definition.
4278         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4279         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4280         (__pthread_initialize_minimal_internal): Register robust_list with
4281         the kernel.
4282         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4283         Declare __set_robust_list_avail.
4284         * pthread_create.c (start_thread): Register robust_list of new thread.
4285         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4286         waiters.
4287         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4288         number of users, it's unreliable.
4289         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4290         set_robust_list syscall is available.
4291         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4292         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4293         Set robust_head.list_op_pending before trying to lock a robust mutex.
4294         * pthread_mutex_timedlock.c: Likewise.
4295         * pthread_mutex_trylock.c: Likewise.
4296         * pthread_mutex_unlock.c: Likewise for unlocking.
4297         * Makefile (tests): Add tst-robust8.
4298         * tst-robust8.c: New file.
4300 2006-03-08  Andreas Schwab  <schwab@suse.de>
4302         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4303         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4305 2006-03-05  Roland McGrath  <roland@redhat.com>
4307         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4308         and $config_os doesn't match *linux*.
4310 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4312         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4313         Use __syscall_error.
4314         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4315         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4316         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4317         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4318         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4319         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4321 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4323         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4325 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4327         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4328         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4329         mutex.
4330         (__lll_robust_timedlock_wait): Likewise.
4331         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4332         (__lll_robust_lock_wait): Likewise.
4333         (__lll_robust_timedlock_wait): Likewise.
4334         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4335         (__lll_robust_lock_wait): Likewise.
4336         (__lll_robust_timedlock_wait): Likewise.
4338 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4340         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4341         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4342         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4343         lll_robust_mutex_unlock): Define.
4344         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4346 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4348         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4349         instead of <clone.S>.
4351 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4353         * Makefile (libpthread-routines): Add
4354         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4355         and pthread_mutex_[sg]etprioceiling.
4356         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4357         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4358         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4359         pthread_mutex_setprioceiling.
4360         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4361         PTHREAD_PRIO_PROTECT): New enum values.
4362         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4363         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4364         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4365         prototypes.
4366         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4367         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4368         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4369         Define.
4370         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4371         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4372         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4373         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4374         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4375         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4376         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4377         protocol mutexes.
4378         * pthread_mutex_getprioceiling.c: New file.
4379         * pthread_mutex_setprioceiling.c: New file.
4380         * pthread_mutexattr_getprioceiling.c: New file.
4381         * pthread_mutexattr_setprioceiling.c: New file.
4382         * pthread_mutexattr_getprotocol.c: New file.
4383         * pthread_mutexattr_setprotocol.c: New file.
4385 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4387         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4389 2006-02-27  Roland McGrath  <roland@redhat.com>
4391         * sysdeps/pthread/Subdirs: List nptl here too.
4392         * configure (libc_add_on_canonical): New variable.
4394         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4396         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4397         self to get main source tree's file.
4398         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4399         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4400         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4401         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4402         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4403         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4404         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4405         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4406         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4407         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4408         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4409         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4410         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4412         * Makefile: Use $(sysdirs) in vpath directive.
4414         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4415         (CPPFLAGS-timer_routines.c): Likewise.
4417         * Makeconfig (includes): Variable removed.
4419 2006-02-26  Roland McGrath  <roland@redhat.com>
4421         * sysdeps/generic/pt-raise.c: Moved to ...
4422         * pt-raise.c: ... here.
4423         * sysdeps/generic/lowlevellock.h: Moved to ...
4424         * lowlevellock.h: ... here.
4426 2006-02-23  Roland McGrath  <roland@redhat.com>
4428         * descr.h (struct pthread): Add final member `end_padding'.
4429         (PTHREAD_STRUCT_END_PADDING): Use it.
4431 2006-02-20  Roland McGrath  <roland@redhat.com>
4433         * sysdeps/mips: Directory removed, saved in ports repository.
4434         * sysdeps/unix/sysv/linux/mips: Likewise.
4436 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4438         * tst-robust1.c: Add second mutex to check that the mutex list is
4439         handled correctly.
4441 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4443         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4444         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4445         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4446         lll_robust_mutex_unlock): New macros.
4447         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4448         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4449         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4450         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4451         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4453 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4455         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4456         definitions.
4457         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4459 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4461         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4462         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4463         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4464         (lll_robust_mutex_unlock): Likewise.
4466 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4468         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4469         Set robust_list.__next rather than robust_list.
4470         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4471         (__pthread_list_t): New typedef.
4472         (pthread_mutex_t): Replace __next and __prev fields with __list.
4473         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4474         (__pthread_list_t): New typedef.
4475         (pthread_mutex_t): Replace __next and __prev fields with __list.
4476         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4477         (__pthread_list_t, __pthread_slist_t): New typedefs.
4478         (pthread_mutex_t): Replace __next and __prev fields with __list.
4479         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4480         (__pthread_list_t, __pthread_slist_t): New typedefs.
4481         (pthread_mutex_t): Replace __next and __prev fields with __list.
4482         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4483         (__pthread_list_t, __pthread_slist_t): New typedefs.
4484         (pthread_mutex_t): Replace __next and __prev fields with __list.
4485         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4486         (__pthread_slist_t): New typedef.
4487         (pthread_mutex_t): Replace __next field with __list.
4489 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4491         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4492         PTHREAD_MUTEX_OWNERDEAD.
4493         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4494         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4495         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4496         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4497         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4498         to PTHREAD_MUTEX_INCONSISTENT.
4499         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4500         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4501         * pthread_mutex_trylock.c: Likewise.
4502         * pthread_mutex_timedlock.c: Likewise.
4503         * pthread_mutex_unlock.c: Likewise.
4504         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4505         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4506         lowlevelrobustlock.sym.
4507         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4508         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4509         definitions.
4510         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4511         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4512         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4513         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4514         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4516 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4518         * allocatestack.c (allocate_stack): Initialize robust_list.
4519         * init.c (__pthread_initialize_minimal_internal): Likewise.
4520         * descr.h (struct xid_command): Pretty printing.
4521         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4522         robust_list.  Adjust macros.
4523         * pthread_create.c (start_thread): Adjust robust_list handling.
4524         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4525         but the owner for all robust mutex types.
4526         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4527         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4528         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4529         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4531         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4532         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4534 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4536         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4537         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4539 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4541         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4542         Return status.
4543         (lll_futex_timed_wait): Define.
4545 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4547         * tst-cancel4.c: Test ppoll.
4549 2006-01-18  Andreas Jaeger  <aj@suse.de>
4551         [BZ #2167]
4552         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4553         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4554         by Jim Gifford <patches@jg555.com>.
4556 2006-01-13  Richard Henderson  <rth@redhat.com>
4558         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4560 2006-01-10  Roland McGrath  <roland@redhat.com>
4562         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4563         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4564         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4565         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4566         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4567         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4568         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4569         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4570         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4571         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4573 2006-01-09  Roland McGrath  <roland@redhat.com>
4575         * tst-initializers1-c89.c: New file.
4576         * tst-initializers1-c99.c: New file.
4577         * tst-initializers1-gnu89.c: New file.
4578         * tst-initializers1-gnu99.c: New file.
4579         * Makefile (tests): Add them.
4580         (CFLAGS-tst-initializers1-c89.c): New variable.
4581         (CFLAGS-tst-initializers1-c99.c): New variable.
4582         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4583         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4585         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4586         Use __extension__ on anonymous union definition.
4587         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4588         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4589         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4590         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4591         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4593 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4595         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4596         Don't give the union a name because it changes the mangled name.
4597         Instead name the struct for __data.
4598         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4599         Likewise.
4600         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4601         Likewise.
4603 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4605         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4606         stack bias to mc_ftp field.
4608 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4610         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4611         being too clever and reloading the futex value where it shouldn't.
4613 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4615         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4616         correct type.
4618 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4620         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4621         Add cfi directives.
4623 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4625         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4626         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4627         rename in tcbhead_t.
4629         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4630         Don't give the union a name because it changes the mangled name.
4631         Instead name the struct for __data.
4632         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4633         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4634         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4635         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4636         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4637         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4639 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4641         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4642         Return status.
4643         (lll_futex_timed_wait): Define.
4644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4645         * sysdeps/pthread/aio_misc.h: New file.
4647 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4649         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4651 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4653         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4654         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4655         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4657 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4659         * tst-cancel24.cc: Use C headers instead of C++ headers.
4661 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4663         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4664         sparc-linux configured glibc.
4665         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4666         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4667         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4668         atomic_compare_and_exchange_val_24_acq instead of
4669         atomic_compare_and_exchange_val_acq.
4670         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4671         instead of atomic_exchange_rel.
4672         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4673         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4674         file.
4675         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4676         file.
4677         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4678         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4679         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4680         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4681         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4682         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4683         New file.
4684         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4685         New file.
4686         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4687         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4688         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4689         file.
4690         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4691         file.
4692         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4694 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4696         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4697         mutex initializers.
4699 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4701         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4702         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4703         THREAD_COPY_POINTER_GUARD): Define.
4704         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4705         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4707 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4709         * version.c: Update copyright year.
4711 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4713         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4714         .eh_frame section, use cfi_* directives.
4715         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4717 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4719         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4720         now.
4722 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4724         * sysdeps/pthread/sigaction.c: Removed.
4725         * sigaction.c: New file.
4726         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4728 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4730         * Makefile (tests): Add tst-signal7.
4731         * tst-signal7.c: New file.
4733 2005-12-27  Roland McGrath  <roland@redhat.com>
4735         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4736         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4737         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4738         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4739         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4740         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4741         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4742         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4743         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4744         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4745         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4747 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4749         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4750         and __prev field to pthread_mutex_t.
4751         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4752         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4753         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4754         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4755         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4756         to pthread_mutex_t.
4758 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4760         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4761         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4762         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4763         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4764         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4765         and PTHREAD_MUTEXATTR_FLAG_BITS.
4766         * descr.h (struct pthread): Add robust_list field and define
4767         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4768         * pthread_mutexattr_getrobust.c: New file.
4769         * pthread_mutexattr_setrobust.c: New file.
4770         * pthread_mutex_consistent.c: New file.
4771         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4772         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4773         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4774         Adjust pthread_mutex_t initializers.
4775         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4776         field to pthread_mutex_t.
4777         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4778         and __prev field to pthread_mutex_t.
4779         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4780         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4781         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4782         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4783         * pthread_mutexattr_gettype.c: Likewise.
4784         * pthread_mutexattr_setpshared.c: Likewise.
4785         * pthread_mutexattr_settype.c: Likewise.
4786         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4787         Initialize mutex kind according to robust flag.
4788         * pthread_mutex_lock.c: Implement local robust mutex.
4789         * pthread_mutex_timedlock.c: Likewise.
4790         * pthread_mutex_trylock.c: Likewise.
4791         * pthread_mutex_unlock.c: Likewise.
4792         * pthread_create.c (start_thread): Mark robust mutexes which remained
4793         locked as dead.
4794         * tst-robust1.c: New file.
4795         * tst-robust2.c: New file.
4796         * tst-robust3.c: New file.
4797         * tst-robust4.c: New file.
4798         * tst-robust5.c: New file.
4799         * tst-robust6.c: New file.
4800         * tst-robust7.c: New file.
4801         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4802         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4803         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4804         tst-robust5, tst-robust6, and tst-robust7.
4806         * tst-typesizes.c: New file.
4807         * Makefile (tests): Add tst-typesizes.
4809         * tst-once3.c: More debug output.
4811 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4813         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4814         missing after last change.
4816         * version.c: Update copyright year.
4818 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4820         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4821         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4822         * pthread_mutex_trylock.c: Likewise.
4823         * pthread_mutex_timedlock.c: Likewise.
4824         * pthread_mutex_unlock.c: Likewise.
4826 2005-12-22  Roland McGrath  <roland@redhat.com>
4828         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4829         so that #include_next's search location is not reset to the -I..
4830         directory where <nptl/...> can be found.
4832 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4834         [BZ #1913]
4835         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4836         Fix unwind info.  Remove useless branch prediction prefix.
4837         * tst-cancel24.cc: New file.
4838         * Makefile: Add rules to build and run tst-cancel24.
4840 2005-12-21  Roland McGrath  <roland@redhat.com>
4842         * libc-cancellation.c: Use <> rather than "" #includes.
4843         * pt-cleanup.c: Likewise.
4844         * pthread_create.c: Likewise.
4845         * pthread_join.c: Likewise.
4846         * pthread_timedjoin.c: Likewise.
4847         * pthread_tryjoin.c: Likewise.
4848         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4849         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4850         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4851         * unwind.c: Likewise.
4853 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4855         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4856         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4857         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4858         THREAD_COPY_POINTER_GUARD): Define.
4860 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4862         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4863         rather than one.
4864         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4865         THREAD_COPY_POINTER_GUARD): Define.
4866         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4867         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4868         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4869         THREAD_COPY_POINTER_GUARD): Define.
4870         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4871         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4872         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4873         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4874         Use PTR_DEMANGLE for B0 if defined.
4876 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4878         * pthread_create.c (__pthread_create_2_1): Use
4879         THREAD_COPY_POINTER_GUARD if available.
4880         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4881         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4882         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4883         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4884         * sysdeps/x86_64/tls.h: Likewise.
4886 2005-12-15  Roland McGrath  <roland@redhat.com>
4888         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4890 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4892         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4893         sysdeps/generic.
4894         * errno-loc.c: New file.
4896 2005-12-12  Roland McGrath  <roland@redhat.com>
4898         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4899         adjustments before choosing stack size.  Update minimum stack size
4900         calculation to match allocate_stack change.
4902 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4904         * allocatestack.c (allocate_stack): Don't demand that there is an
4905         additional full page available on the stack beside guard, TLS, the
4906         minimum stack.
4908 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4910         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4911         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4914         compiling 32-bit code we must define __cleanup_fct_attribute.
4916 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4918         [BZ #1920]
4919         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4920         __attribute__ instead of __attribute.
4921         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4922         (__cleanup_fct_attribute): Likewise.
4924 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4926         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4927         a write barrier before writing libgcc_s_getcfa.
4929 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4931         * sysdeps/unix/sysv/linux/configure: Removed.
4933 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4935         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4936         optional init_array/fini_array support.
4938 2005-10-24  Roland McGrath  <roland@redhat.com>
4940         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4941         versioned_symbol use.
4943 2005-10-16  Roland McGrath  <roland@redhat.com>
4945         * init.c (__pthread_initialize_minimal_internal): Even when using a
4946         compile-time default stack size, apply the minimum that allocate_stack
4947         will require, and round up to page size.
4949 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4951         * Makefile ($(test-modules)): Remove static pattern rule.
4953 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4954             Ulrich Drepper  <drepper@redhat.com>
4956         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4957         alignment in callback function.
4958         * Makefile: Add rules to build and run tst-align3.
4959         * tst-align3.c: New file.
4961 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4963         * allocatestack.c (setxid_signal_thread): Add
4964         INTERNAL_SYSCALL_DECL (err).
4966 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4968         * allocatestack.c (setxid_signal_thread): Need to use
4969         atomic_compare_and_exchange_bool_acq.
4971 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4972             Jakub Jelinek  <jakub@redhat.com>
4974         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4975         CANCEL_RESTMASK.
4976         (struct pthread): Move specific_used field to avoid padding.
4977         Add setxid_futex field.
4978         * init.c (sighandler_setxid): Reset setxid flag and release the
4979         setxid futex.
4980         * allocatestack.c (setxid_signal_thread): New function.  Broken
4981         out of the bodies of the two loops in __nptl_setxid.  For undetached
4982         threads check whether they are exiting and if yes, don't send a signal.
4983         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4984         * pthread_create.c (start_thread): For undetached threads, check
4985         whether setxid bit is set.  If yes, wait until signal has been
4986         processed.
4988         * allocatestack.c (STACK_VARIABLES): Initialize them.
4989         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4991 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4993         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4994         waiters, awake all waiters on the associated mutex.
4996 2005-09-22  Roland McGrath  <roland@redhat.com>
4998         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4999         ../sysdeps/x86_64/hp-timing.h).
5001 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5003         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5004         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5005         (lll_futex_wake_unlock): Define.
5006         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5007         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5008         (lll_futex_wake_unlock): Define.
5009         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5010         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5011         (lll_futex_wake_unlock): Define.
5012         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5013         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5014         (lll_futex_wake_unlock): Define.
5015         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5016         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5017         (lll_futex_wake_unlock): Define.
5018         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5019         lll_futex_wake_unlock.
5020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5021         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5022         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5023         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5024         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5025         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5027 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5029         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5030         Fix typo in register name.
5032 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5034         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5035         Use __sigfillset.  Document that sigfillset does the right thing wrt
5036         to SIGSETXID.
5038 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5040         [BZ #1102]
5041         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5042         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5043         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5044         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5045         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5046         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5047         in the structure.
5048         * Makefile (tests): Add tst-initializers1.
5049         (CFLAGS-tst-initializers1.c): Set.
5050         * tst-initializers1.c: New test.
5052 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5054         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5055         Make sure __flags are located at offset 48 from the start of the
5056         structure.
5058 2005-07-02  Roland McGrath  <roland@redhat.com>
5060         * Makeconfig: Comment fix.
5062 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5064         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5065         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5066         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5067         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5068         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5069         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5070         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5071         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5072         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5073         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5075 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5077         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5078         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5079         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5080         fields.
5081         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5082         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5083         field.  Put in sysinfo field unconditionally.
5084         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5085         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5086         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5087         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5088         fields.
5089         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5090         * pthread_create.c (__pthread_create_2_1): Use
5091         THREAD_COPY_STACK_GUARD macro.
5092         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5093         tests.
5094         * tst-stackguard1.c: New file.
5095         * tst-stackguard1-static.c: New file.
5097 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5099         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5100         Invoke CGOTSETUP and CGOTRESTORE.
5101         (CGOTSETUP, CGOTRESTORE): Define.
5103 2005-05-29  Richard Henderson  <rth@redhat.com>
5105         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5106         (tf_write, tf_writev): Use it.
5107         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5108         the system minimum.
5110 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5112         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5113         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5114         __librt_*_asynccancel@local.
5116 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5118         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5119         all occurrences of JUMPTARGET.  Instead append @local to labels.
5121 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5123         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5124         size/alignment of struct pthread rather than tcbhead_t.
5125         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5126         Likewise.
5127         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5128         Likewise.
5129         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5130         Likewise.
5132 2005-05-19  Richard Henderson  <rth@redhat.com>
5134         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5135         __sync_val_compare_and_swap, not explicit _si variant.
5136         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5138 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5140         [BZ #915]
5141         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5143 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5145         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5146         .eh_frame section, use cfi_* directives.
5148 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5150         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5151         of "" includes.
5153 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5155         [BZ #1075]
5156         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5157         aio_write blocks.
5159 2005-04-27  Roland McGrath  <roland@redhat.com>
5161         * Makefile (tests): Remove tst-clock2.
5163         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5164         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5165         translating to the kernel clockid_t for our own process/thread clock.
5167         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5169 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5171         * old_pthread_cond_init.c: Include <errno.h>.
5172         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5173         process shared or uses clock other than CLOCK_REALTIME.
5174         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5176 2005-04-13  David S. Miller  <davem@davemloft.net>
5178         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5179         * sysdeps/sparc/sparc64/clone.S: New file.
5181 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5183         [BZ #1102]
5184         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5185         __inline instead of inline.
5186         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5188 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5190         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5191         functionally equivalent, but shorter instructions.
5192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5193         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5194         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5195         Likewise.
5196         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5197         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5198         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5201         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5203         Likewise.
5204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5205         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5207         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5208         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5210 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5212         * sysdeps/mips/Makefile: New file.
5213         * sysdeps/mips/nptl-sysdep.S: New file.
5214         * sysdeps/mips/tcb-offsets.sym: New file.
5215         * sysdeps/mips/pthread_spin_lock.S: New file.
5216         * sysdeps/mips/pthread_spin_trylock.S: New file.
5217         * sysdeps/mips/pthreaddef.h: New file.
5218         * sysdeps/mips/tls.h: New file.
5219         * sysdeps/mips/jmpbuf-unwind.h: New file.
5220         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5221         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5222         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5223         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5224         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5225         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5226         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5227         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5228         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5229         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5231 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5233         [BZ #1112]
5234         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5235         variable to scerr.
5237 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5239         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5241 2005-02-25  Roland McGrath  <roland@redhat.com>
5243         * alloca_cutoff.c: Correct license text.
5244         * tst-unload.c: Likewise.
5245         * sysdeps/pthread/allocalim.h: Likewise.
5246         * sysdeps/pthread/pt-initfini.c: Likewise.
5247         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5248         * sysdeps/pthread/bits/sigthread.h: Likewise.
5249         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5250         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5252 2005-02-16  Roland McGrath  <roland@redhat.com>
5254         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5255         Use unsigned int * for ptr_nthreads.
5257 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5259         [BZ #721]
5260         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5261         gcc4.
5263 2005-02-07  Richard Henderson  <rth@redhat.com>
5265         [BZ #787]
5266         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5267         argument.
5269 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5271         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5272         order of arguments in invocation of atomic_add_zero.
5274 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5276         [BZ #737]
5277         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5278         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5279         at least gotntpoff relocation and addition.
5280         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5281         Likewise.
5282         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5283         Likewise.
5284         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5285         Likewise.
5287 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5289         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5290         entry for static tls deallocation fix.
5291         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5292         also contains information whether the memory pointed to is static
5293         TLS or not.
5294         * sysdeps/i386/tls.h: Likewise.
5295         * sysdeps/ia64/tls.h: Likewise.
5296         * sysdeps/powerpc/tls.h: Likewise.
5297         * sysdeps/s390/tls.h: Likewise.
5298         * sysdeps/sh/tls.h: Likewise.
5299         * sysdeps/sparc/tls.h: Likewise.
5300         * sysdeps/x86_64/tls.h: Likewise.
5302 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5304         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5306 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5308         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5309         %esp.
5310         * Makefile (tests): Add tst-align2.
5311         * tst-align2.c: New test.
5312         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5313         -mpreferred-stack-boundary=4.
5315 2004-12-18  Roland McGrath  <roland@redhat.com>
5317         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5318         New file removed withdrawn for the moment.
5320 2004-12-17  Richard Henderson  <rth@redhat.com>
5322         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5323         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5325 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5327         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5328         Increased PTHREAD_STACK_MIN.
5330         * tst-context1.c (stacks): Use bigger stack size.
5332 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5334         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5335         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5337 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5339         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5340         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5341         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5343 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5345         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5347 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5349         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5350         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5352         * tst-getpid1.c: If child crashes, report this first.  Print which
5353         signal.
5355 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5357         * init.c (__pthread_initialize_minimal_internal): Also unblock
5358         SIGSETXID.
5360 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5362         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5363         _POSIX_THREAD_CPUTIME): Define to 0.
5364         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5365         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5366         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5367         __timer_signal_thread_tclk): Remove.
5368         (init_module): Remove their initialization.
5369         (thread_cleanup): Remove their cleanup assertions.
5370         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5371         __timer_signal_thread_tclk): Remove.
5372         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5373         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5374         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5376 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5378         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5379         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5381         * Makefile (tests): Add tst-getpid2.
5382         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5383         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5384         * tst-getpid2.c: New test.
5386 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5388         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5390 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5392         * Makefile (tests): Add tst-getpid1.
5393         * tst-getpid1.c: New file.
5394         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5395         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5397 2004-12-02  Roland McGrath  <roland@redhat.com>
5399         * Makefile (libpthread-nonshared): Variable removed.
5400         ($(objpfx)libpthread_nonshared.a): Target removed.
5401         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5402         These are now handled by generic magic from
5403         libpthread-static-only-routines being set.
5405 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5407         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5408         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5409         _POSIX_THREAD_PRIO_PROTECT): Define.
5410         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5411         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5412         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5414 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5416         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5417         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5418         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5419         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5420         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5421         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5422         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5424 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5426         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5428         * Makefile (libpthread-routines): Add pthread_setschedprio.
5429         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5430         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5431         * pthread_setschedprio.c: New file.
5433 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5435         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5436         * pthread_cancel.c (pthread_create): Likewise.
5438         * Makefile (libpthread-routines): Add vars.
5439         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5440         * init.c (__default_stacksize, __is_smp): Remove.
5441         * vars.c: New file.
5442         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5443         and define a wrapper macro.
5444         (PTHREAD_STATIC_FN_REQUIRE): Define.
5445         * allocatestack.c (__find_thread_by_id): Undefine.
5446         * pthread_create (__pthread_keys): Remove.
5447         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5448         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5449         PTHREAD_STATIC_FN_REQUIRE.
5451 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5453         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5454         parameter to REGISTER macro.
5456 2004-11-17  Roland McGrath  <roland@redhat.com>
5458         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5459         Make sure SIGCANCEL is blocked as well.
5461 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5463         * sysdeps/pthread/setxid.h: New file.
5464         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5465         (struct xid_command): Add forward decl.
5466         (struct pthread_functions): Change return type of __nptl_setxid hook
5467         to int.
5468         * pthreadP.h (__nptl_setxid): Change return type to int.
5469         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5470         calling thread, return its return value and set errno on failure.
5471         * descr.h (struct xid_command): Change id type to long array.
5473         * Makefile: Add rules to build and test tst-setuid1 and
5474         tst-setuid1-static.
5475         * tst-setuid1.c: New test.
5476         * tst-setuid1-static.c: New test.
5478 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5480         * Makefile (tests): Add tst-exit3.
5481         * tst-exit3.c: New test.
5483 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5485         * Makefile (tests): Add tst-exit2.
5486         * tst-exit2.c: New file.
5488 2004-11-09  Roland McGrath  <roland@redhat.com>
5490         [BZ #530]
5491         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5492         here, before calling clone.
5493         * pthread_create.c (start_thread): Don't do it here.
5495 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5497         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5499 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5501         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5502         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5503         assembler warning.
5505 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5507         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5508         if sched_priority is not between minprio and maxprio.
5510 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5512         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5513         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5515         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5516         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5518 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5520         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5521         not-cancelable I/O functions.
5523 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5525         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5526         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5527         make sure 2 is stored in the futex and we looked at the old value.
5528         Fix a few other problems to return the correct value.
5530 2004-10-14  Richard Henderson  <rth@redhat.com>
5532         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5533         make gcc4 happy.
5535 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5537         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5538         of pthread-functions.h and pthreaddef.h.
5539         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5541         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5542         Change __data.__nwaiters from int to unsigned int.
5544         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5545         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5547         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5548         before return type.
5550         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5551         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5553 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5555         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5556         test fails, remove message queue.
5557         (tf_msgsnd): Likewise.
5559 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5561         * tst-clock1.c: Change #ifdef to #if defined.
5562         * tst-clock2.c: Likewise.
5563         * tst-cond11.c: Likewise.
5565         * sysdeps/pthread/timer_create.c (timer_create): Use
5566         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5567         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5568         THREAD_CPUTIME.
5570 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5572         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5573         _POSIX_THREAD_CPUTIME): Define to 0.
5575 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5577         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5578         and _POSIX_THREAD_CPUTIME to zero.
5579         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5580         * tst-barrier2.c: Fix testing for POSIX feature.
5581         * tst-clock1.c: Likewise.
5582         * tst-clock2.c: Likewise.
5583         * tst-cond11.c: Likewise.
5584         * tst-cond4.c: Likewise.
5585         * tst-cond6.c: Likewise.
5586         * tst-flock2.c: Likewise.
5587         * tst-mutex4.c: Likewise.
5588         * tst-mutex9.c: Likewise.
5589         * tst-rwlock12.c: Likewise.
5590         * tst-rwlock4.c: Likewise.
5591         * tst-signal1.c: Likewise.
5592         * tst-spin2.c: Likewise.
5593         * sysdeps/pthread/posix-timer.h: Likewise.
5594         * sysdeps/pthread/timer_create.c: Likewise.
5595         * sysdeps/pthread/timer_routines.c: Likewise.
5597 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5599         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5600         (__lll_mutex_timedlock_wait): Address futex correctly.
5602         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5603         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5604         make sure 2 is stored in the futex and we looked at the old value.
5605         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5606         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5607         which might very well made the code not working at all before.
5608         [BZ #417]
5610 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5612         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5613         allow SIGSETXID to be sent.
5614         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5615         for SIGSETXID to be defined.
5616         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5617         SIGSETXID cannot be blocked.
5619         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5620         Add __extension__ to long long types.
5621         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5622         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5623         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5624         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5625         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5626         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5627         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5629 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5631         * descr.h (struct pthread): Add stopped_start field.
5632         * sysdeps/pthread/createthread.c (create_thread): Set
5633         start_stopped flag in descriptor for new thread appropriately.
5634         * pthread_create.c (start_thread): Only take lock to be stopped on
5635         startup if stopped_start flag says so.
5637 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5639         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5640         is created detached and if yes, do not try to free the stack in case
5641         the thread creation failed.
5642         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5643         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5644         case there has been no error.  [BZ #405]
5646         * pthread_create.c (start_thread): Don't wait for scheduler data
5647         etc to be set at the beginning of the function.  The cancellation
5648         infrastructure must have been set up.  And enable async
5649         cancellation before potentially going to sleep.  [BZ #401]
5651 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5653         * Versions: Remove exports for pthread_set*id_np functions.
5654         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5655         for now.
5656         * Makefile: Don't build pthread_set*id code for now.
5658 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5660         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5661         internal use.
5662         * allocatestack.c (__nptl_setxid): New function.
5663         * descr.h (struct xid_command): Define type.
5664         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5665         (sighandler_setxid): New function.
5666         (__pthread_initialize_minimal): Register sighandler_setxid for
5667         SIGCANCEL.
5668         * pt-allocrtsig.c: Update comment.
5669         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5670         Declare __nptl_setxid.
5671         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5672         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5673         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5674         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5675         and pthread_setresuid_np.
5676         * pthread_setgid_np.c: New file.
5677         * pthread_setuid_np.c: New file.
5678         * pthread_setegid_np.c: New file.
5679         * pthread_seteuid_np.c: New file.
5680         * pthread_setregid_np.c: New file.
5681         * pthread_setreuid_np.c: New file.
5682         * pthread_setresgid_np.c: New file.
5683         * pthread_setresuid_np.c: New file.
5684         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5685         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5686         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5687         and pthread_setresuid_np.
5688         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5689         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5690         pthread_setregid, and pthread_setresgid.
5692 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5694         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5695         ENOMEM when out of memory.
5697 2004-09-10  Roland McGrath  <roland@redhat.com>
5699         [BZ #379]
5700         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5701         code, since we don't try to use the broken CLONE_STOPPED any more.
5702         * pthread_create.c (start_thread): Likewise.
5704 2004-09-15  Richard Henderson  <rth@redhat.com>
5706         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5708 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5710         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5711         (__libc_unwind_longjmp): Delete macro and declare as function.
5712         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5713         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5714         nptl directory.
5715         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5716         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5717         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5719 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5721         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5722         for __USE_XOPEN2K.
5723         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5724         types also for __USE_XOPEN2K.
5725         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5726         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5727         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5728         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5729         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5730         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5731         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5732         [BZ #320]
5734 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5736         * sysdeps/pthread/pthread.h
5737         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5738         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5739         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5740         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5741         [BZ #375]
5743 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5745         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5746         PSEUDO to be used with . prefix.
5748         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5749         Use atomic_increment instead of atomic_exchange_and_add.
5750         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5751         Likewise.
5752         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5753         Likewise.
5754         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5755         Likewise.
5757         * allocatestack.c (allocate_stack): Use atomic_increment_val
5758         instead of atomic_exchange_and_add.
5759         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5760         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5761         Likewise.
5762         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5763         Likewise.
5765         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5766         the initialization function might throw.
5768 2005-09-05  Richard Henderson  <rth@redhat.com>
5770         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5771         Move definition inside libpthread, libc, librt check.  Provide
5772         definition for rtld.
5774 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5776         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5777         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5778         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5779         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5780         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5781         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5782         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5783         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5784         * unwind.c: Use it.
5786         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5787         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5788         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5789         Likewise.
5790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5791         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5792         this is the last waiter, signal pthread_cond_destroy caller and
5793         avoid using the pthread_cond_t structure after unlock.
5794         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5795         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5796         Read clock type from the least significant bits of __nwaiters instead
5797         of __clock.
5798         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5799         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5801 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5803         [BZ #342]
5804         * Makefile (tests): Add tst-cond20 and tst-cond21.
5805         * tst-cond20.c: New test.
5806         * tst-cond21.c: New test.
5807         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5808         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5809         it unsigned int.
5810         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5811         Likewise.
5812         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5813         (pthread_cond_t): Likewise.
5814         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5815         Likewise.
5816         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5817         Likewise.
5818         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5819         Likewise.
5820         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5821         (cond_nwaiters): New.
5822         (clock_bits): New.
5823         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5824         if there are waiters not signalled yet.
5825         Wait until all already signalled waiters wake up.
5826         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5827         __nwaiters.  If pthread_cond_destroy has been called and this is the
5828         last waiter, signal pthread_cond_destroy caller and avoid using
5829         the pthread_cond_t structure after unlock.
5830         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5831         decrement it when leaving.  If pthread_cond_destroy has been called
5832         and this is the last waiter, signal pthread_cond_destroy caller.
5833         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5834         Likewise.  Read clock type from the least significant bits of
5835         __nwaiters instead of __clock.
5836         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5837         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5838         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5839         clock type just from the last COND_CLOCK_BITS bits of value.
5840         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5841         instead of __clock, just from second bit of condattr's value.
5843 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5845         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5846         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5847         != 64.
5848         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5850 2004-08-15  Roland McGrath  <roland@frob.com>
5852         * pthread_atfork.c: Update copyright terms including special exception
5853         for these trivial files, which are statically linked into executables
5854         that use dynamic linking for the significant library code.
5856 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5858         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5859         pthread_rwlock_rdlock.
5860         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5861         Decrease __nr_readers_queued after reacquiring lock.
5862         * sysdeps/pthread/pthread_rwlock_timedrdlock
5863         (pthread_rwlock_timedrdlock): Likewise.
5864         Reported by Bob Cook <bobcook47@hotmail.com>.
5866 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5868         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5869         before pthread_barrier_wait.
5871 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5873         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5874         Remove unnecessary exception handling data.
5876 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5878         [BZ #284]
5879         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5880         instead of clockid_t.
5882 2004-07-21  Roland McGrath  <roland@redhat.com>
5884         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5886 2004-07-19  Roland McGrath  <roland@redhat.com>
5888         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5890 2004-07-02  Roland McGrath  <roland@redhat.com>
5892         * configure: Don't exit.
5894 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5896         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5897         (__pthread_cond_timedwait): Check for invalid nanosecond in
5898         timeout value.
5900 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5902         * Makefile: Add rules to build and run tst-fini1.
5903         * tst-fini1.c: New file.
5904         * tst-fini1mod.c: New file.
5906 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5908         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5909         if no cancellation support is needed.
5910         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5911         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5912         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5913         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5914         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5915         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5916         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5917         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5918         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5920         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5921         only if not already defined.
5923 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5925         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5926         constraint "m" instead of "0" for futex.
5928         * shlib-versions: Add powerpc64-.*-linux.*.
5930 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5932         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5933         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5934         for valid tv_nsec.
5935         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5936         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5937         bits.
5939 2004-06-29  Roland McGrath  <roland@redhat.com>
5941         * Banner: NPTL no longer has its own version number.
5942         * Makefile (nptl-version): Variable removed.
5943         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5944         using $(version), the glibc version number.
5946 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5948         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5949         Fix branch offset for a PLT entry.
5950         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5951         Likewise.
5952         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5953         Likewise.
5954         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5955         Likewise.
5956         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5957         Likewise.
5959 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5961         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5962         unconditionally.
5964 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5966         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5967         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5968         instead of tv_sec.
5969         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5970         (pthread_rwlock_timedrdlock): Likewise.
5972 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5974         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5975         Set __r7 to val, not mutex.
5977 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5979         * Makefile: Add rules to build tst-rwlock14.
5980         * tst-rwlock14.c: New file.
5982 2004-06-24  Boris Hu  <boris.hu@intel.com>
5984         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5985         check.
5986         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5988 2004-06-19  Andreas Jaeger  <aj@suse.de>
5990         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5991         assembler in last patch.
5993 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5995         * sysdeps/pthread/pthread_cond_timedwait.c
5996         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5997         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5998         (__pthread_cond_timedwait): Check for invalid nanosecond in
5999         timeout value.
6000         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6001         * tst-cond19.c: New file.
6002         * Makefile: Add rules to build and run tst-cond19.
6004 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6006         * tst-context1.c (GUARD_PATTERN): Defined.
6007         (tst_context_t): Define struct containing ucontext_t & guard words.
6008         (ctx): Declare as an array of tst_context_t.
6009         (fct): Verify uc_link & guard words are still valid.
6010         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6012 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6014         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6015         Add __data.__futex field, reshuffle __data.__clock.
6016         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6017         (__pthread_cond_signal): Increment __futex at the same time as
6018         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6019         address of low 32-bits of __wakeup_seq to futex syscall.
6020         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6021         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6022         releasing internal lock to FUTEX_WAIT.
6023         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6024         (__pthread_cond_timedwait): Likewise.
6025         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6026         (FUTEX_CMP_REQUEUE): Define.
6027         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6028         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6029         Pass __futex value from before the unlock and __futex address instead
6030         of address of low 32-bits of __wakeup_seq to futex syscall.
6031         Fallback to FUTEX_WAKE all on any errors.
6033 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6035         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6036         comment typo.
6037         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6038         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6039         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6040         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6041         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6043 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6045         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6046         Add memory clobber to inline assembly.
6047         (__lll_mutex_trylock): Likewise.
6048         (__lll_mutex_cond_trylock): Likewise.
6050 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6052         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6053         Pass val argument as 6th system call argument in %r7.
6055 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6057         * Makefile (tests): Add tst-cond16.
6058         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6059         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6060         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6061         Add __data.__futex field, reshuffle __data.__clock.
6062         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6063         (__pthread_cond_signal): Increment __futex at the same time as
6064         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6065         address of low 32-bits of __wakeup_seq to futex syscall.
6066         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6067         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6068         releasing internal lock to FUTEX_WAIT.
6069         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6070         (__pthread_cond_timedwait): Likewise.
6071         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6072         (FUTEX_CMP_REQUEUE): Define.
6073         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6074         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6075         Pass __futex value from before the unlock and __futex address instead
6076         of address of low 32-bits of __wakeup_seq to futex syscall.
6077         Fallback to FUTEX_WAKE all on any errors.
6078         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6079         Define.
6080         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6081         internally.  Return non-zero if error, zero if success.
6082         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6083         Add __data.__futex field, reshuffle __data.__clock.
6084         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6085         Define.
6086         (lll_futex_requeue): Add val argument, return 1 unconditionally
6087         for the time being.
6088         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6089         Add __data.__futex field, reshuffle __data.__clock.
6090         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6091         Define.
6092         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6093         internally.  Return non-zero if error, zero if success.
6094         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6095         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6096         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6097         Define.
6098         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6099         internally.  Return non-zero if error, zero if success.
6100         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6101         Add __data.__futex field, reshuffle __data.__clock.
6102         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6103         Define.
6104         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6105         internally.  Return non-zero if error, zero if success.
6106         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6107         Add __data.__futex field, reshuffle __data.__clock.
6108         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6109         Add __data.__futex field, reshuffle __data.__clock.
6110         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6111         Increment __futex at the same time as __wakeup_seq or __total_seq.
6112         Pass address of __futex instead of address of low 32-bits of
6113         __wakeup_seq to futex syscall.
6114         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6115         Pass __futex value from before releasing internal lock
6116         to FUTEX_WAIT.
6117         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6118         Likewise.  Avoid unnecessary shadowing of variables.
6119         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6120         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6121         unlock and __futex address instead of address of low 32-bits of
6122         __wakeup_seq to futex_requeue macro, adjust for new return value
6123         meaning.
6124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6125         (__pthread_cond_signal): Increment __futex at the same time as
6126         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6127         address of low 32-bits of __wakeup_seq to futex syscall.
6128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6129         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6130         releasing internal lock to FUTEX_WAIT.
6131         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6132         (__pthread_cond_timedwait): Likewise.
6133         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6134         (FUTEX_CMP_REQUEUE): Define.
6135         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6136         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6137         Pass __futex value from before the unlock and __futex address instead
6138         of address of low 32-bits of __wakeup_seq to futex syscall.
6139         Fallback to FUTEX_WAKE all on any errors.
6141 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6143         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6144         Add nop to align the end of critical section.
6145         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6147 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6149         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6150         Add __broadcast_seq field.
6151         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6152         all waiters as woken with woken_seq and bump broadcast counter.
6153         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6154         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6155         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6156         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6158 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6161         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6162         Reported by Kaz Kojima.
6164 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6166         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6168 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6170         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6171         __broadcast_seq with bc_seq after acquiring internal lock instead of
6172         before it.
6174 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6176         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6177         compilation.
6178         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6179         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6180         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6181         (pthread_cond_t): Add __data.__broadcast_seq field.
6182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6183         (FRAME_SIZE): Define.
6184         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6185         Comment typo fixes.
6186         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6187         Define.
6188         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6189         typo fixes.
6190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6191         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6192         fixes.
6194 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6196         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6197         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6198         Add __broadcast_seq field.
6199         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6200         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6201         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6202         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6203         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6205         all waiters as woken with woken_seq and bump broadcast counter.
6206         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6208         __broadcast_seq field.
6209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6210         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6211         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6212         * pthread_cond_init.c: Initialize __broadcast_seq field.
6213         * Makefile (tests): Add tst-cond17 and tst-cond18.
6214         Add .NOTPARALLEL goal.
6215         * tst-cond16.c: New file.  From Jakub.
6216         * tst-cond17.c: New file.  From Jakub.
6217         * tst-cond18.c: New file.  From Jakub.
6219 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6221         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6222         unwind info.
6224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6225         Parametrize frame size.  Correct some unwind info.
6226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6228 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6230         * tst-stack3.c: Note testing functionality beyond POSIX.
6232 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6234         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6235         Change conditional from ifdef to if.
6237 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6239         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6240         SYSDEP_CANCEL_ERROR): Define.
6241         (PSEUDO): Use it.
6243 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6245         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6247 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6249         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6251 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6253         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6254         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6255         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6256         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6258 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6261         thread has all signals blocked.
6263 2004-04-18  Andreas Jaeger  <aj@suse.de>
6265         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6266         (SEM_VALUE_MAX): Add missing brace.
6268 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6270         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6271         in rt subdir.
6272         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6273         * sysdeps/pthread/tst-mqueue8x.c: New test.
6274         * tst-cancel4.c: Update comment about message queues.
6276         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6277         return it_value { 0, 0 }.
6278         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6279         like SIGEV_SIGNAL.
6280         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6281         assertion for SIGEV_NONE.
6282         (thread_attr_compare): Compare all attributes, not just a partial
6283         subset.
6285 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6287         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6289 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6291         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6292         Just use a plain number.
6293         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6294         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6295         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6296         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6297         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6298         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6299         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6301 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6303         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6304         frame info.
6305         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6307 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6309         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6310         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6311         of calling sigwaitinfo.
6313 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6315         * allocatestack.c (allocate_stack): Set reported_guardsize
6316         unconditionally.
6317         * pthread_getattr_np.c (pthread_getattr_np): Use
6318         reported_guardsize instead of guardsize.
6319         * descr.h (struct pthread): Add reported_guardsize field.
6321 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6323         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6325 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6327         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6329 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6331         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6332         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6333         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6334         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6335         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6336         Define.
6337         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6338         (_POSIX_MESSAGE_PASSING): Define.
6339         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6340         (_POSIX_MESSAGE_PASSING): Define.
6341         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6342         (_POSIX_MESSAGE_PASSING): Define.
6344 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6346         * tst-context1.c (fct): Check whether correct stack is used.
6348 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6350         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6351         matching constraints for asm mem parameters.
6353         * tst-clock2.c (tf): Don't define unless needed.
6355 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6357         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6358         $(gnulib).
6360 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6362         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6363         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6364         * pthreadP.h: Declare __nptl_deallocate_tsd.
6365         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6366         Adjust caller.
6368         * Makefile (tests): Add tst-tsd5.
6369         * tst-tsd5.c: New file.
6371 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6373         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6374         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6375         is SHLIB_COMPAT check.
6376         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6377         (__pthread_attr_getaffinity_old): Likewise.
6378         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6379         (__pthread_getaffinity_old): Likewise.
6380         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6381         (__pthread_setaffinity_old): Likewise.
6383 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6385         * allocatestack.c (_make_stacks_executable): Call
6386         _dl_make_stack_executable first.
6388 2004-03-24  Roland McGrath  <roland@redhat.com>
6390         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6391         constraint instead of "0".
6393 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6395         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6396         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6398         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6399         code to avoid warning.
6401 2004-03-24  Andreas Jaeger  <aj@suse.de>
6403         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6404         (__pthread_attr_setaffinity_old): Remove const.
6406 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6408         * sysdeps/unix/sysv/linux/smp.h: New file.
6409         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6410         * init.c: Define __is_smp.
6411         (__pthread_initialize_minimal_internal): Call is_smp_system to
6412         initialize __is_smp.
6413         * pthreadP.h: Declare __is_smp.
6414         Define MAX_ADAPTIVE_COUNT is necessary.
6415         * pthread_mutex_init.c: Add comment regarding __spins field.
6416         * pthread_mutex_lock.c: Implement adaptive mutex type.
6417         * pthread_mutex_timedlock.c: Likewise.
6418         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6419         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6420         Add __spins field.
6421         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6422         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6423         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6424         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6425         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6426         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6427         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6428         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6429         lll_mutex_cond_trylock.
6430         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6431         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6432         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6433         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6434         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6435         Define BUSY_WAIT_NOP.
6436         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6437         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6439         * tst-mutex5.c: Add support for testing adaptive mutexes.
6440         * tst-mutex7.c: Likewise.
6441         * tst-mutex5a.c: New file.
6442         * tst-mutex7a.c: New file.
6443         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6446         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6447         vgettimeofday call might destroy the content.
6449         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6450         @pause in the loop.
6452         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6453         No need to restrict type of ret.  Make it int.  Add comment.
6455         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6456         Remove unnecessary setne instruction.
6458 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6460         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6461         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6462         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6463         If realloc fails, break out of the loop.
6465 2004-03-20  Andreas Jaeger  <aj@suse.de>
6467         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6468         (__pthread_setaffinity_old): Fix interface.
6469         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6470         (__pthread_getaffinity_old): Likewise.
6472         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6473         (__pthread_setaffinity_new): Remove duplicate declaration.
6475 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6477         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6478         the return value to a safe register.
6479         (CDISABLE): Set the function argument correctly.
6481 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6483         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6484         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6485         Rewrite so that only one locked memory operation per round is needed.
6486         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6487         (pthread_barrier_wait): After wakeup, release lock only when the
6488         last thread stopped using the barrier object.
6489         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6490         (__pthread_cond_wait): Don't store mutex address if the current
6491         value is ~0l.  Add correct cleanup support and unwind info.
6492         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6493         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6494         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6495         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6496         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6497         Add correct cleanup support and unwind info.
6498         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6499         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6500         information for syscall wrappers.
6502 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6504         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6505         cpusetsize field, remove next.
6506         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6507         parameter for size of the CPU set.
6508         (pthread_setaffinity_np): Likewise.
6509         (pthread_attr_getaffinity_np): Likewise.
6510         (pthread_attr_setaffinity_np): Likewise.
6511         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6512         interface change, keep compatibility code.
6513         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6514         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6515         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6516         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6517         __pthread_getaffinity_np.
6518         * Versions: Add version for changed interfaces.
6519         * tst-attr3.c: Adjust test for interface change.
6520         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6521         increasing buffer sizes.
6522         * pthread_attr_destroy.c: Remove unused list handling.
6523         * pthread_attr_init.c: Likewise.
6525 2004-03-17  Roland McGrath  <roland@redhat.com>
6527         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6528         first argument to clock_getres so we ever enable kernel timers.
6530 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6532         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6534 2004-03-12  Richard Henderson  <rth@redhat.com>
6536         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6537         oldvalue from CENABLE to CDISABLE.
6539 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6541         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6542         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6543         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6544         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6546 2004-03-11  Richard Henderson  <rth@redhat.com>
6548         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6549         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6550         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6552 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6554         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6555         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6556         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6558 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6560         * forward.c (__pthread_cond_broadcast_2_0,
6561         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6562         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6563         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6565 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6567         * sysdeps/sh/tcb-offsets.sym: Add PID.
6568         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6569         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6571 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6573         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6574         include <sysdep-cancel.h>, vfork is no cancellation point.
6575         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6576         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6577         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6579 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6581         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6582         libc_hidden_def.
6583         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6584         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6585         Likewise.
6586         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6587         Likewise.
6588         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6589         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6590         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6591         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6592         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6594         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6595         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6596         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6599         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6601         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6602         a local register for saving old PID.  Negate PID in parent upon exit.
6604         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6605         tcb-offsets.h.
6606         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6607         before syscall, set to the old value in the parent afterwards.
6608         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6609         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6610         tcb-offsets.h.
6611         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6612         before syscall, set to the old value in the parent afterwards.
6613         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6614         * sysdeps/s390/tcb-offsets.sym: Add PID.
6616         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6617         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6618         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6619         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6620         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6621         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6623 2004-03-10  Andreas Schwab  <schwab@suse.de>
6625         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6626         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6627         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6629 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6631         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6632         * tst-cancel21.c (do_one_test): Likewise.
6633         Reported by Gordon Jin <gordon.jin@intel.com>.
6635 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6637         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6638         if non-zero and set to INT_MIN if zero.
6639         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6640         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6641         (SAVE_PID, RESTORE_PID): Define.
6642         (__vfork): Use it.
6643         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6644         Use relative path to avoid including NPTL i386/vfork.S.
6645         (SAVE_PID, RESTORE_PID): Define.
6646         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6647         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6648         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6649         tst-vfork2x.
6650         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6651         * tst-vfork1.c: New test.
6652         * tst-vfork2.c: New test.
6653         * tst-vfork1x.c: New test.
6654         * tst-vfork2x.c: New test.
6656 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6658         * sysdeps/i386/tcb-offsets.sym: Add PID.
6659         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6660         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6661         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6663 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6665         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6667 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6669         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6670         _rtld_global_ro.
6672 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6674         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6675         _rtld_global_ro.
6677         * tst-once4.c: Remove unnecessary macro definition.
6679         * tst-mutex7.c (do_test): Limit thread stack size.
6680         * tst-once2.c (do_test): Likewise.
6681         * tst-tls3.c (do_test): Likewise.
6682         * tst-tls1.c (do_test): Likewise.
6683         * tst-signal3.c (do_test): Likewise.
6684         * tst-kill6.c (do_test): Likewise.
6685         * tst-key4.c (do_test): Likewise.
6686         * tst-join4.c (do_test): Likewise.
6687         * tst-fork1.c (do_test): Likewise.
6688         * tst-context1.c (do_test): Likewise.
6689         * tst-cond2.c (do_test): Likewise.
6690         * tst-cond10.c (do_test): Likewise.
6691         * tst-clock2.c (do_test): Likewise.
6692         * tst-cancel10.c (do_test): Likewise.
6693         * tst-basic2.c (do_test): Likewise.
6694         * tst-barrier4.c (do_test): Likewise.
6696 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6698         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6700 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6703         (__pthread_cond_timedwait): Optimize wakeup test.
6704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6705         (__pthread_cond_wait): Likewise.
6706         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6707         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6708         Likewise.
6710 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6712         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6713         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6714         the atomic instruction needed.
6715         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6716         (__lll_mutex_lock_wait): Likewise.
6718 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6720         * Makefile (tests): Add tst-cond14 and tst-cond15.
6721         * tst-cond14.c: New file.
6722         * tst-cond15.c: New file.
6724 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6726         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6727         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6728         needs to be implemented differently to be useful.
6730 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6732         * pthread_attr_setschedparam.c: Don't test priority against limits
6733         here.  Set ATTR_FLAG_SCHED_SET flag.
6734         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6735         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6736         from parent thread to child.  If attribute is used and scheduling
6737         parameters are not inherited, copy parameters from attribute or
6738         compute them.  Check priority value.
6739         * pthread_getschedparam.c: If the parameters aren't known yet get
6740         them from the kernel.
6741         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6742         ATTR_FLAG_POLICY_SET flag for thread.
6743         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6744         and ATTR_FLAG_POLICY_SET.
6746         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6748         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6749         fail if stack address hasn't been set.  Just return 0.
6751 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6753         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6754         libpthread for the files in this list.
6755         (CFLAGS-tst-unload): Removed.
6756         * tst-unload.c (do_test): Don't use complete path for
6757         LIBPHREAD_SO.
6759         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6760         tst-_res1mod2.
6762 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6764         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6765         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6766         operation per round is needed.
6767         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6768         (__lll_mutex_lock_wait): Likewise.
6770 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6772         * tst-cancel9.c (cleanup): Don't print to stderr.
6774 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6776         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6778 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6780         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6781         (__syscall_error_handler2): Call CDISABLE.
6782         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6783         (__syscall_error_handler2): Call CDISABLE.
6785         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6786         Release lock before the loop, don't reacquire it.
6788         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6790 2004-02-19  Andreas Schwab  <schwab@suse.de>
6792         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6793         Fix last change.
6795 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6797         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6798         (pthread_barrier_wait): After wakeup, release lock only when the
6799         last thread stopped using the barrier object.
6800         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6801         (pthread_barrier_wait): Likewise.
6802         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6803         Likewise.
6804         * Makefile (tests): Add tst-barrier4.
6805         * tst-barrier4.c: New file.
6807         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6808         (__pthread_cond_timedwait): Perform timeout test while holding
6809         internal lock to prevent wakeup race.
6810         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6811         * sysdeps/pthread/pthread_cond_timedwait.c
6812         (__pthread_cond_timedwait): Likewise.
6813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6814         (__pthread_cond_timedwait): Likewise.
6816 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6818         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6819         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6820         * Makefile (tests): Add tst-rwlock13.
6821         * tst-rwlock13.c: New test.
6823 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6826         (__condvar_tw_cleanup): Little optimization.
6827         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6829 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6831         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6832         libpthread as "lib" parameter to SHLIB_COMPAT.
6833         (__novmx_siglongjmp): Fix typo in function name.
6834         (__novmx_longjmp): Fix typo in function name.
6836 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6838         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6839         __builtin_expect.
6841         * sysdeps/generic/pt-longjmp.c: Moved to...
6842         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6844 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6846         * Makefile (libpthread-routines): Add pt-cleanup.
6847         * pt-longjmp.c: Removed.
6848         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6849         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6850         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6851         Version longjmp, siglongjmp for GLIBC_2.3.4.
6852         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6854 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6856         * sysdeps/pthread/pthread_cond_timedwait.c
6857         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6858         Reuse code.  Add __builtin_expects.
6860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6861         (__pthread_cond_timedwait): Get internal lock in case timeout has
6862         passed before the futex syscall.
6863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6865 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6867         * allocatestack.c: Pretty printing.
6869         * sysdeps/pthread/createthread.c (create_thread): Don't add
6870         CLONE_DETACHED bit if it is not necessary.
6872 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6874         * pthread_getattr_np.c: Include ldsodefs.h.
6876 2004-01-16  Richard Henderson  <rth@redhat.com>
6878         * allocatestack.c: Don't declare __libc_stack_end.
6879         * init.c (__pthread_initialize_minimal_internal): Likewise.
6880         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6882 2004-01-15  Richard Henderson  <rth@redhat.com>
6884         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6885         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6886         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6887         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6888         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6889         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6890         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6891         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6893 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6895         * init.c (pthread_functions): Make array const.
6897 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6899         * allocatestack.c (__make_stacks_executable): Change interface.
6900         Check parameters.  Pass parameter on to libc counterpart.
6901         * pthreadP.h: Change declaration.
6903 2004-01-13  Richard Henderson  <rth@redhat.com>
6905         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6906         prototype form.
6907         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6908         Likewise.
6910         * sysdeps/alpha/Makefile: New file.
6911         * sysdeps/alpha/tcb-offsets.sym: New file.
6912         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6913         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6915         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6916         on powerpc version.
6918 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6920         * Makefile (tests): Add tst-backtrace1.
6921         * tst-backtrace1.c: New test.
6923 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6925         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6926         register as second parameter to the REGISTER macro.
6927         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6928         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6929         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6930         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6931         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6932         of thread register as second parameter to REGISTER macro in 64 case.
6934 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6936         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6937         (CFLAGS-getpid.o): Defined.
6938         (CFLAGS-getpid.os): Defined.
6940 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6942         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6943         returned for main thread does not overlap with any other VMA.
6944         Patch by Jakub Jelinek.
6946 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6948         * tst-raise1.c: Include stdio.h.
6950 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6952         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6953         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6954         If pid is 0, set it to selftid.
6955         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6956         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6957         != 0, return self->tid without doing a syscall.
6958         * descr.h (struct pthread): Move pid field after tid.
6960         * Makefile (tests): Add tst-raise1.
6961         * tst-raise1.c: New file.
6963 2003-12-23  Roland McGrath  <roland@redhat.com>
6965         * tst-oddstacklimit.c: New file.
6966         * Makefile (tests): Add it.
6967         (tst-oddstacklimit-ENV): New variable.
6969         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6970         value up to page size for __default_stacksize.
6972 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6974         * Makefile (tests): Add tst-eintr5.
6975         * tst-eintr5.c: New file.
6977         * eintr.c (eintr_source): Prevent sending signal to self.
6979         * tst-eintr2.c (tf1): Improve error message.
6981 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6984         * sysdeps/unix/sysv/linux/getpid.c: New file.
6985         * pthread_cancel.c: Add comment explaining use of PID field.
6986         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6987         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6988         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6989         temporarily to signal the field must not be relied on and updated
6990         by getpid().
6991         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6992         temporarily negative.
6993         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6995 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6997         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6998         (eintr_source): If ARG != NULL, use pthread_kill.
6999         * tst-eintr1.c: Adjust for this change.
7000         * tst-eintr2.c: Likewise.
7001         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7002         * tst-eintr3.c: New file.
7003         * tst-eintr4.c: New file.
7005 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7007         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7008         if CANCELSTATE_BITMASK is set.
7009         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7010         Likewise.
7012         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7013         (tests-reverse): Add tst-cancel23.
7014         * tst-cancel22.c: New test.
7015         * tst-cancel23.c: New test.
7017 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7019         * tst-eintr1.c: Better error messages.
7021         * Makefile (tests): Add tst-eintr2.
7022         * tst-eintr2.c: New file.
7024 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7026         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7027         (CFLAGS-tst-cancelx21.c): Set.
7028         * tst-cancel21.c: New test.
7029         * tst-cancelx21.c: New test.
7031         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7032         comparison operand.
7033         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7034         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7035         * pt-longjmp.c: Include jmpbuf-unwind.h.
7036         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7037         _JMPBUF_UNWINDS.  Adjust compared pointers.
7038         * init.c (__pthread_initialize_minimal_internal): Initialize
7039         pd->stackblock_size.
7040         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7041         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7042         * sysdeps/i386/jmpbuf-unwind.h: New file.
7043         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7044         * sysdeps/s390/jmpbuf-unwind.h: New file.
7045         * sysdeps/sh/jmpbuf-unwind.h: New file.
7046         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7047         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7048         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7049         (_JMPBUF_CFA_UNWINDS): Remove.
7050         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7052 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7054         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7055         (CFLAGS-tst-cancelx20.c): Set.
7056         * tst-cancel20.c: New test.
7057         * tst-cancelx20.c: New test.
7059 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7061         * init.c (__pthread_initialize_minimal_internal): Don't treat
7062         architectures with separate register stack special here when
7063         computing default stack size.
7065 2003-12-17  Roland McGrath  <roland@redhat.com>
7067         * Makefile (tst-cancelx7-ARGS): New variable.
7068         Reportd by Greg Schafer <gschafer@zip.com.au>.
7070 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7072         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7073         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7074         (tst-stack3-ENV): Set.
7075         ($(objpfx)tst-stack3-mem): New.
7076         * tst-stack3.c: New test.
7078 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7080         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7081         Add unwind directives.  Drop unused .regstk directive.
7082         (_fini_EPILOG_BEGINS): Add unwind directives.
7084 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7086         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7087         Assume parameter is a pointer.
7088         (lll_futex_wake): Likewise.
7089         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7090         Likewise.
7091         (lll_futex_wake): Likewise.
7092         Reported by Boris Hu.
7093         * sysdeps/unix/sysv/linux/unregister-atfork.c
7094         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7096         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7098 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7100         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7101         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7102         __rtld_lock_initialize for ld.so lock.
7103         Patch in part by Adam Li <adam.li@intel.com>.
7105 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7107         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7108         in $(gnulib).  Also, remove stale comment.
7110 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7112         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7113         advantage of new syscall stub and optimize accordingly.
7115         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7116         from SYS_futex, to match expectations of
7117         sysdep.h:DO_INLINE_SYSCALL.
7118         (lll_futex_clobbers): Remove.
7119         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7120         (lll_futex_wake): Likewise.
7121         (lll_futex_requeue): Likewise.
7122         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7123         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7124         Jelinek).
7125         (__lll_mutex_lock): Likewise.
7126         (__lll_mutex_cond_lock): Likewise.
7127         (__lll_mutex_timed_lock): Likewise.
7128         (__lll_mutex_unlock): Likewise.
7129         (__lll_mutex_unlock_force): Likewise.
7131         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7132         comes before the include of <sysdep.h>.
7133         (THREAD_SELF_SYSINFO): New macro.
7134         (THREAD_SYSINFO): Likewise.
7135         (INIT_SYSINFO): New macro.
7136         (TLS_INIT_TP): Call INIT_SYSINFO.
7138         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7140         * sysdeps/pthread/createthread.c (create_thread): Use
7141         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7142         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7143         THREAD_SELF_SYSINFO instead of open code.
7144         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7145         (THREAD_SYSINFO): Likewise.
7147         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7149         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7151 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7153         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7154         instead of .init.  Patch by David Mosberger.
7156 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7158         * sysdeps/pthread/configure.in: Remove broken declaration in C
7159         cleanup handling check.
7161 2003-11-30  Andreas Jaeger  <aj@suse.de>
7163         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7164         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7165         Likewise.
7167 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7169         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7170         * pthread_attr_destroy.c: Include shlib-compat.h.
7171         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7172         is set in iattr->flags.
7173         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7175 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7177         * Makefile (distribute): Add tst-cleanup4aux.c.
7179         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7180         include.
7182 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7184         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7185         pthread_cond_signal.
7187         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7188         store mutex address if the current value is ~0l.
7189         * sysdeps/pthread/pthread_cond_timedwait.c
7190         (__pthread_cond_timedwait): Likewise.
7191         * sysdeps/pthread/pthread_cond_broadcast.c
7192         (__pthread_cond_broadcast): Don't use requeue for pshared
7193         condvars.
7195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7196         (__pthread_cond_wait): Don't store mutex address if the current
7197         value is ~0l.
7198         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7199         (__pthread_cond_timedwait): Likewise.
7200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7201         (__pthread_cond_broadcast): Don't use requeue for pshared
7202         condvars.
7204         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7205         element with ~0l for pshared condvars, with NULL otherwise.
7207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7208         (__pthread_cond_wait): Don't store mutex address if the current
7209         value is ~0l.
7210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7211         (__pthread_cond_timedwait): Likewise.
7212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7213         (__pthread_cond_broadcast): Don't use requeue for pshared
7214         condvars.
7216         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7217         * tst-cond12.c: New file.
7218         * tst-cond13.c: New file.
7220 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7222         * sysdeps/pthread/configure.in: Make missing forced unwind support
7223         fatal.
7225 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7227         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7229 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7231         * Makefile: Add magic to clean up correctly.
7233 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7235         * unwind.c (FRAME_LEFT): Define.
7236         (unwind_stop): Handle old style cleanups here.
7237         (__pthread_unwind): Handle old style cleanups only if
7238         !HAVE_FORCED_UNWIND.
7239         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7240         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7241         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7242         ($(objpfx)tst-cleanupx4): Likewise.
7243         * tst-cleanup4.c: New test.
7244         * tst-cleanup4aux.c: New.
7245         * tst-cleanupx4.c: New test.
7247 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7249         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7250         lll_mutex_*lock macros to skip atomic operations on some archs.
7252 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7254         * sysdeps/pthread/tst-timer.c (main): Initialize
7255         sigev2.sigev_value as well.
7257 2003-10-15  Roland McGrath  <roland@redhat.com>
7259         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7260         is missing.
7261         * sysdeps/pthread/configure: Regenerated.
7263 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7265         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7266         locking macros.  No distinction between normal and mutex locking
7267         anymore.
7268         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7269         Merge bits from lowlevelmutex.S we still need.
7270         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7271         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7272         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7273         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7274         new mutex implementation.
7275         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7276         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7277         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7278         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7279         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7280         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7281         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7282         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7283         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7284         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7285         symbol for entry point to avoid cancellation.
7287 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7289         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7290         changes.
7291         (SAVE_OLDTYPE_0): Fix a typo.
7293 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7295         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7296         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7298 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7300         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7301         correct offset.
7303 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7305         * Makefile (tests): Add tst-cancel19.
7306         * tst-cancel19.c: New test.
7308 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7310         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7311         restoring of the old cancellation type.
7313 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7315         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7317 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7319         * sysdeps/pthread/malloc-machine.h: New file
7321 2003-09-24  Roland McGrath  <roland@redhat.com>
7323         * allocatestack.c (__make_stacks_executable): Don't ignore return
7324         value from _dl_make_stack_executable.
7326 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7328         * allocatestack.c (__make_stacks_executable): Also change
7329         permission of the currently unused stacks.
7331         * allocatestack.c (change_stack_perm): Split out from
7332         __make_stacks_executable.
7333         (allocate_stack): If the required permission changed between the time
7334         we started preparing the stack and queueing it, change the permission.
7335         (__make_stacks_executable): Call change_stack_perm.
7337         * Makefile: Build tst-execstack-mod locally.
7338         * tst-execstack-mod.c: New file.
7340 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7342         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7344 2003-09-23  Roland McGrath  <roland@redhat.com>
7346         * tst-execstack.c: New file.
7347         * Makefile (tests): Add it.
7348         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7349         (LDFLAGS-tst-execstack): New variable.
7351         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7352         whether to use PROT_EXEC for stack mmap.
7353         (__make_stacks_executable): New function.
7354         * pthreadP.h: Declare it.
7355         * init.c (__pthread_initialize_minimal_internal): Set
7356         GL(dl_make_stack_executable_hook) to that.
7358 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7360         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7361         recommendation from AMD re avoidance of lock prefix.
7363 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7365         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7366         lll_futex_timed_wait instead of lll_futex_wait.
7367         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7368         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7369         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7370         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7371         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7372         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7373         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7374         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7375         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7376         Completely revamp the locking macros.  No distinction between
7377         normal and mutex locking anymore.
7378         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7379         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7380         __lll_lock_timedwait): Fix prototypes.
7381         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7382         __lll_lock_timedwait): Likewise.
7383         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7384         macros, add __builtin_expect.
7385         (lll_mutex_timedlock): Likewise.  Fix return value.
7386         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7387         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7388         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7389         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7390         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7391         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7392         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7393         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7395 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7397         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7398         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7399         operation if possible.
7401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7402         like jumping over the lock prefix.
7404 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7406         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7407         locking macros.  No distinction between normal and mutex locking
7408         anymore.
7409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7410         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7411         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7412         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7413         locking.  Merge bits from lowlevelmutex.S we still need.
7414         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7415         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7416         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7417         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7418         * Makefile (routines): Remove libc-lowlevelmutex.
7419         (libpthread-rountines): Remove lowlevelmutex.
7420         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7421         for new mutex implementation.
7422         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7423         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7425         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7426         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7427         Likewise.
7428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7429         Likewise.
7430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7432         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7435         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7436         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7437         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7438         Likewise.
7439         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7440         Likewise.
7441         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7442         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7444         Don't use requeue.
7445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7446         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7448 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7450         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7451         in parameters of asm with output parameters.
7453         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7454         type of DECR parameter to int.
7455         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7457 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7459         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7460         guardsize for each thread.
7462 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7464         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7465         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7466         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7468         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7469         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7470         NULL.
7471         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7472         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7473         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7474         (pthread_getaffinity_np): Add hidden_def.
7476         * Makefile (tests): Add tst-attr3.
7477         * tst-attr3.c: New test.
7479         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7481 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7483         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7484         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7486 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7488         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7489         * tst-align.c: Include tst-stack-align.h.
7490         (tf, do_test): Use TEST_STACK_ALIGN macro.
7492 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7494         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7495         variable.
7497 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7499         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7500         stack-related values for the initial thread.
7502 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7504         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7506 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7508         * pthread_mutex_lock.c: Minor code rearrangements.
7510 2003-09-05  Roland McGrath  <roland@redhat.com>
7512         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7513         Instead, include ../nptl_db/db_info.c to do its magic.
7514         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7515         (__pthread_pthread_key_2ndlevel_size): Likewise.
7516         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7517         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7518         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7519         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7520         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7521         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7522         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7523         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7524         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7525         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7526         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7527         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7528         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7529         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7530         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7531         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7532         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7534 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7536         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7537         of pthread_t to be compatible with LT.
7538         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7539         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7540         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7541         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7542         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7543         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7544         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7546 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7548         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7550 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7552         * unwind-forcedunwind.c: Move to...
7553         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7554         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7555         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7556         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7557         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7558         * unwind.c: Include jmpbuf-unwind.h.
7559         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7561 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7563         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7564         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7565         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7566         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7567         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7568         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7569         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7570         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7571         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7572         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7573         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7574         function.
7575         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7576         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7577         * Makefile (tests): Add tst-stack2.
7578         * tst-stack2.c: New test.
7579         * tst-stack1.c: Include limits.h and sys/param.h.
7580         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7582         * pthread_condattr_setpshared.c: Include errno.h.
7583         (pthread_condattr_setpshared): Return EINVAL if pshared
7584         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7586         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7587         defined symbol for entry point to avoid cancellation.
7588         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7589         Likewise.
7590         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7591         Likewise.
7592         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7593         Likewise.
7594         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7595         Likewise.
7596         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7597         Likewise.
7598         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7599         __close_nocancel, __read_nocancel, __write_nocancel,
7600         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7601         libpthread.so or librt.so, define to corresponding function
7602         without _nocancel suffix.
7603         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7604         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7605         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7607         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7609 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7611         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7612         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7614         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7615         in subsections has a symbol associated with it.
7617         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7618         defined symbol for entry point to avoid cancellation.
7619         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7621 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7623         * Makefile (tests): Add tst-tls5.
7624         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7625         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7626         ($(objpfx)tst-tls5): New.
7627         ($(objpfx)tst-tls6.out): Likewise.
7628         (tests): Depend on $(objpfx)tst-tls6.out.
7629         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7630         (do_test): Check pthread_self () return value alignment.
7631         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7632         (tf): Check pthread_self () return value alignment.
7633         * tst-tls5.c: New test.
7634         * tst-tls5.h: New.
7635         * tst-tls5mod.c: New.
7636         * tst-tls5moda.c: New.
7637         * tst-tls5modb.c: New.
7638         * tst-tls5modc.c: New.
7639         * tst-tls5modd.c: New.
7640         * tst-tls5mode.c: New.
7641         * tst-tls5modf.c: New.
7642         * tst-tls6.sh: New test.
7644         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7645         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7646         * init.c (pthread_functions): Initialize them.
7647         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7648         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7649         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7650         pthread_cond_timedwait@@GLIBC_2.3.2.
7652 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7654         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7655         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7656         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7657         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7658         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7659         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7661         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7663         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7664         _POSIX_THREAD_PRIORITY_SCHEDULING.
7665         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7667 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7669         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7670         nested function, use static inline function from libio.h.
7671         Code by Richard Henderson.
7673         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7674         weak.
7676 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7678         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7679         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7680         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7681         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7682         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7683         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7684         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7685         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7686         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7687         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7688         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7689         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7690         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7691         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7692         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7693         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7694         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7695         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7696         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7697         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7698         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7699         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7700         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7701         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7702         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7703         * sysdeps/sparc/tls.h: New file.
7704         * sysdeps/sparc/tcb-offsets.sym: New file.
7705         * sysdeps/sparc/Makefile: New file.
7706         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7707         * init.c [__sparc__] (__NR_set_tid_address): Define.
7709 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7711         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7712         _IO_release_lock): Define.
7714 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7716         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7717         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7719 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7721         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7722         (__pthread_cleanup_class): Add missing return types of member
7723         functions.
7725 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7727         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7728         (lll_mutex_unlock_force): Add memory barrier between store and futex
7729         syscall.
7731 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7733         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7734         tempmsg in first loop.
7736 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7738         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7739         _POSIX_THREAD_PRIORITY_SCHEDULING.
7740         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7742 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7744         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7745         (__rtld_lock_default_lock_recursive,
7746         __rtld_lock_default_unlock_recursive): Define.
7747         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7748         __rtld_lock_unlock_recursive): Define using
7749         GL(_dl_rtld_*lock_recursive).
7750         * init.c (__pthread_initialize_minimal_internal): Initialize
7751         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7752         Lock GL(_dl_load_lock) the same number of times as
7753         GL(_dl_load_lock) using non-mt implementation was nested.
7755         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7756         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7758 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7760         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7761         PIPE_BUF.
7763 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7765         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7767 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7769         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7770         to first syscall error check.  Move syscall error check for tkill
7771         into __ASSUME_CLONE_STOPPED #ifdef.
7773 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7775         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7776         is not defined, do explicit synchronization.
7777         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7778         is not defined also unlock pd->lock for non-debugging case in case
7779         it is necessary.
7780         * pthread_create.c (start_thread): Always get and release pd->lock
7781         if __ASSUME_CLONE_STOPPED is not defined.
7782         (start_thread_debug): Removed.  Adjust users.
7783         * allocatestack.c (allocate_stack): Always initialize lock if
7784         __ASSUME_CLONE_STOPPED is not defined.
7785         * Makefile (tests): Add tst-sched1.
7786         * tst-sched1.c: New file.
7788         * sysdeps/pthread/createthread.c (do_clone): Only use
7789         sched_setschduler and pass correct parameters.
7791 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7793         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7794         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7795         PTHREAD_STACK_MIN in comments.
7797 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7799         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7800         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7801         argument.
7802         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7803         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7804         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7805         (__pthread_cleanup_upto): Fix prototype.
7806         (_longjmp_unwind): Adjust caller.
7807         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7808         Change second argument to const struct pointer.
7809         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7810         * tst-sem9.c (main): Likewise.
7811         * unwind.c: Include string.h for strlen prototype.
7813 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7816         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7817         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7818         Define HAVE_CMOV.
7819         Patch by Nicholas Miell <nmiell@attbi.com>.
7821 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7823         * init.c (__pthread_initialize_minimal_internal): Initialize
7824         GL(dl_init_static_tls).
7825         * pthreadP.h (__pthread_init_static_tls): New prototype.
7826         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7827         New functions.
7828         * Makefile (tests): Add tst-tls4.
7829         (modules-names): Add tst-tls4moda and tst-tls4modb.
7830         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7831         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7832         tst-tls4modb.so.
7833         * tst-tls4.c: New file.
7834         * tst-tls4moda.c: New file.
7835         * tst-tls4modb.c: New file.
7837 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7839         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7840         before __timer_dealloc.
7841         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7842         Don't call list_unlink.
7844 2003-07-29  Roland McGrath  <roland@redhat.com>
7846         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7848 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7850         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7851         Don't reuse struct aiocb A if it failed.
7852         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7853         not just one byte, as that does not block.
7855 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7857         * sysdeps/pthread/unwind-resume.c: New file.
7858         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7859         unwind-resume in csu subdir.
7860         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7861         exceptions.
7862         (librt-sysdep_routines, librt-shared-only-routines): Add
7863         rt-unwind-resume.
7864         * sysdeps/pthread/rt-unwind-resume.c: New file.
7865         * unwind-forcedunwind.c: New file.
7866         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7867         (libpthread-shared-only-routines): Likewise.
7868         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7869         * pthreadP.h (pthread_cancel_init): New prototype.
7870         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7872         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7873         attr argument const struct pthread_attr *.
7875         * res.c (__res_state): Return __resp.
7876         * descr.h: Include resolv.h.
7877         (struct pthread): Add res field.
7878         * pthread_create.c: Include resolv.h.
7879         (start_thread): Initialize __resp.
7880         * Makefile (tests): Add tst-_res1.
7881         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7882         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7883         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7884         libpthread.
7885         * tst-_res1.c: New file.
7886         * tst-_res1mod1.c: New file.
7887         * tst-_res1mod2.c: New file.
7889 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7891         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7893         * Makefile: Define various *-no-z-defs variables for test DSOs
7894         which has undefined symbols.
7896 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7898         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7899         Retry if the stwcx fails to store once_control.
7901 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7903         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7904         pthread_attr_setaffinity.
7905         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7906         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7907         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7908         * pthread_attr_destroy.c: Free cpuset element if allocated.
7909         * pthread_create.c: Pass iattr as additional parameter to
7910         create_thread.
7911         * sysdeps/pthread/createthread.c: If attribute is provided and
7912         a new thread is created with affinity set or scheduling parameters,
7913         start thread with CLONE_STOPPED.
7914         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7915         pthread_attr_setaffinity.
7916         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7917         cpuset element.
7919 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7921         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7923 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7925         * sysdeps/pthread/configure.in: Require CFI directives also for
7926         ppc and s390.
7928 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7930         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7931         Add cfi directives.
7933 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7935         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7936         CLEANUP_JMP_BUF.
7937         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7938         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7939         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7940         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7941         not self pointer in __writer.  Compare with TID to determine
7942         deadlocks.
7943         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7945         Likewise.
7946         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7947         Likewise.
7948         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7949         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7950         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7951         macros also when compiling librt.
7953 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7955         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7956         -fasynchronous-unwind-tables.
7957         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7958         (PSEUDO): Add cfi directives.
7959         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7960         Likewise.
7961         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7962         Likewise.
7964 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7966         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7967         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7968         * unwind.c (__pthread_unwind_next): Add hidden_def.
7969         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7970         Likewise.
7971         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7972         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7973         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7974         Likewise.
7975         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7976         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7977         Likewise.
7978         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7979         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7980         __pthread_unregister_cancel and __pthread_unwind_next.
7982 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7984         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7985         different symbol for the cancellation syscall wrapper and
7986         non-cancellation syscall wrapper.
7987         (PSEUDO_END): Define.
7989 2003-07-05  Richard Henderson  <rth@redhat.com>
7991         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7992         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7993         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7994         return actual return value from the syscall, not 0.
7996 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7998         * descr.h (struct pthread): Add pid field.
7999         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8000         (__reclaim_stacks): Likewise.
8001         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8002         also check for PID of the signal source.
8003         (__pthread_initialize_minimal_internal): Also initialize pid field
8004         of initial thread's descriptor.
8005         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8006         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8007         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8008         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8009         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8011 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8013         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8014         Fix use of parameter.
8015         (__libc_cleanup_pop): Likewise.
8017 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8019         * init.c (sigcancel_handler): Change parameters to match handler
8020         for SA_SIGACTION.  Check signal number and code to recognize
8021         invalid invocations.
8023 2003-07-03  Roland McGrath  <roland@redhat.com>
8025         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8026         Apply sizeof (struct pthread) bias to r13 value.
8028 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8030         * sysdeps/pthread/configure.in: Require CFI directives.
8032         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8033         definition.
8034         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8035         libpthread compilation.
8036         * unwind.c (__pthread_unwind): Add hidden_def.
8037         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8039 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8041         * libc-cancellation.c (__libc_cleanup_routine): Define.
8042         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8043         (__pthread_cleanup_pop): Define.
8045 2003-07-01  Richard Henderson  <rth@redhat.com>
8047         * sysdeps/alpha/elf/pt-initfini.c: New file.
8048         * sysdeps/alpha/pthread_spin_lock.S: New file.
8049         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8050         * sysdeps/alpha/pthreaddef.h: New file.
8051         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8052         * sysdeps/alpha/tls.h: New file.
8053         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8054         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8055         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8056         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8057         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8058         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8059         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8060         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8061         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8062         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8064 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8066         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8067         cleanup support and unwind info.
8069 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8071         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8072         Use correct cleanup handler registration.  Add unwind info.
8073         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8074         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8075         * tst-once3.c: Add cleanup handler and check it is called.
8076         * tst-once4.c: Likewise.
8077         * tst-oncex3.c: New file.
8078         * tst-oncex4.c: New file.
8079         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8081 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8083         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8085 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8087         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8088         (tf_msgsnd): Likewise.
8090         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8091         premature returns a bit more.
8093 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8095         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8096         definition to the front.
8098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8099         the cleanup functions to make the names unique.  Fix dwarf opcode
8100         un unwind table.
8101         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8102         functions to make the names unique.  Fix CFA offset for two blocks.
8104 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8106         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8107         missing closing braces.
8108         Patch by Christophe Saout <christophe@saout.de>.
8110 2003-06-24  Roland McGrath  <roland@redhat.com>
8112         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8114 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8116         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8117         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8119         * pthreadP.h: Declare __find_thread_by_id.
8120         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8121         * pthread_clock_gettime.c: Allow using other thread's clock.
8122         * pthread_clock_settime.c: Likewise.
8123         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8124         * Makefile: Add rules to build and run tst-clock2.
8125         * tst-clock2.c: New file.
8127 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8130         to use exception-based cleanup handler.
8131         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8133         * tst-cond8.c (ch): Announce that we are done.
8135         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8137         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8138         Also test aio_suspend with timeout value.
8140 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8142         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8143         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8144         attribute_hidden.
8146         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8147         (__pthread_mutex_lock_internal): Likewise.
8148         (__pthread_mutex_unlock_internal): Likewise.
8149         (__pthread_mutex_unlock_usercnt): Declare.
8150         * pthread_mutex_destroy.c: Always fail if used in any way.
8151         * pthread_mutex_init.c: Update comment.
8152         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8153         * pthread_mutex_timedlock.c: Adjust __nusers.
8154         * pthread_mutex_trylock.c: Adjust __nusers.
8155         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8156         and public interfaces are wrapper with pass additional parameter.
8157         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8158         parameter zero.
8159         * tst-mutex8.c: New file.
8160         * Makefile (tests): Add tst-mutex8.
8161         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8162         __pthread_mutex_unlock_usercnt.
8163         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8167         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8168         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8169         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8170         Add __nusers.
8171         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8172         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8173         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8174         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8175         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8177         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8178         * pthread_mutex_timedlock.c: Likewise.
8179         * pthread_mutex_trylock.c: Adjust __nusers.
8180         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8181         * tst-mutex9.c: New file.
8182         * Makefile (tests): Add tst-mutex9.
8183         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8184         * sysdeps/ia64/tls.h: Likewise.
8185         * sysdeps/powerpc/tls.h: Likewise.
8186         * sysdeps/s390/tls.h: Likewise.
8187         * sysdeps/sh/tls.h: Likewise.
8188         * sysdeps/x86_64/tls.h: Likewise.
8189         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8190         Change type of __owner.
8191         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8192         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8193         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8194         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8195         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8197 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8199         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8200         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8202         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8203         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8204         instead of nr to lll_futex_wake.  Only set errno and return -1
8205         if err < 0.
8207         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8208         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8209         return actual return value from the syscall, not 0.
8211 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8213         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8214         find a random value.
8215         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8216         errno==EIDRM.
8218         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8219         compat_timer_settime.
8220         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8221         compat_timer_gettime.
8222         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8223         compat_timer_getoverrun.
8224         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8225         compat_timer_delete.
8227         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8228         error-checking mutex detect busy mutexes.
8230 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8233         Add ax to clobber list.
8234         (lll_mutex_cond_lock): Likewise.
8235         (lll_mutex_unlock): Likewise.
8236         (lll_lock): Likewise.
8237         (lll_unlock): Likewise.
8239         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8240         * tst-cancel18.c: New file.
8241         * tst-cancelx18.c: New file.
8243         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8244         and tcdrain.
8246         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8247         * tst-cancel17.c: New file.
8248         * tst-cancelx17.c: New file.
8250         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8251         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8252         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8254         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8256 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8258         * sysdeps/pthread/createthread.c (create_thread): Set
8259         header.multiple_threads unconditionally.
8260         * allocatestack.c (allocate_stack): Likewise.
8261         * descr.h (struct pthread): Add header.multiple_threads
8262         unconditionally.
8263         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8264         Define for librt.  #error if neither libpthread, libc nor librt.
8265         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8266         Likewise.
8267         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8268         CDISABLE): Likewise.
8269         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8270         CDISABLE): Likewise.
8271         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8272         CDISABLE): Likewise.
8273         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8274         CDISABLE): Likewise.  Access header.multiple_threads outside of
8275         libc and libpthread.
8276         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8277         Likewise.
8278         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8279         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8281 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8283         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8284         Also test early cancellation before the thread reaches the cancellation
8285         point.
8287         * Makefile: Compile forward.c with exceptions.
8289         * sysdeps/unix/sysv/linux/sleep.c: New file.
8291 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8293         * Makefile: Add CFLAGS definition to compile function wrappers
8294         duplicated from libc with exceptions.
8295         * tst-cancel4.c: Also check cancellation handlers.
8297         * Makefile: Add rules to build and run tst-cancel16 and
8298         tst-cancelx16.  Add missing CFLAGS definitions.
8299         * tst-cancel16.c: New file.
8300         * tst-cancelx16.c: New file.
8302 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8304         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8305         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8306         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8307         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8309         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8310         (LIBC_CANCEL_RESET): Likewise.
8311         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8312         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8313         librt-cancellation.
8314         (CFLAGS-libcrt-cancellation.c): Define.
8315         * sysdeps/pthread/librt-cancellation.c: New file.
8316         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8317         macros also when compiling librt.
8318         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8319         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8320         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8321         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8322         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8323         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8324         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8326         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8327         compat_timer_create.
8329 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8331         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8333         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8334         __register_atfork.
8335         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8336         Add libc_hidden_def.
8338 2003-06-13  Roland McGrath  <roland@redhat.com>
8340         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8341         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8343 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8345         * allocatestack.c (queue_stack): Always inline.
8346         * ptreadhP.h (__do_cancel): Likewise.
8348 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8350         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8351         a typo.
8353 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8356         (__pthread_cond_signal): Remove incorrect second addition for
8357         cond_lock!=0.
8359 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8362         (__pthread_cond_signal): Use correct futex pointer in
8363         __lll_mutex_lock_wait call.
8365         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8366         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8368 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8370         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8371         cancelable.
8372         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8373         Likewise.
8375         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8376         hand-written CFI generation code.  Since ENTRY/END also initiated
8377         CFI frames this caused two CFI sets to be generated.
8379 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8381         * cleanup_routine.c: New file.
8382         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8383         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8384         cleanup handling.
8385         * Makefile (libpthread-routines): Add cleanup_routine.
8386         Add more CFLAGS variables to compile with exceptions.  Add comments
8387         why which file needs unwind tables.
8388         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8389         tests.
8390         * tst-cancelx1.c: New file.
8391         * tst-cancelx2.c: New file.
8392         * tst-cancelx3.c: New file.
8393         * tst-cancelx4.c: New file.
8394         * tst-cancelx5.c: New file.
8395         * tst-cancelx6.c: New file.
8396         * tst-cancelx7.c: New file.
8397         * tst-cancelx8.c: New file.
8398         * tst-cancelx9.c: New file.
8399         * tst-cancelx10.c: New file.
8400         * tst-cancelx11.c: New file.
8401         * tst-cancelx12.c: New file.
8402         * tst-cancelx13.c: New file.
8403         * tst-cancelx14.c: New file.
8404         * tst-cancelx15.c: New file.
8405         * tst-cleanupx0.c: New file.
8406         * tst-cleanupx0.expect: New file.
8407         * tst-cleanupx1.c: New file.
8408         * tst-cleanupx2.c: New file.
8409         * tst-cleanupx3.c: New file.
8411         * tst-cleanup0.c: Make standard compliant.
8412         * tst-cleanup1.c: Likewise.
8414         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8415         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8416         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8417         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8418         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8419         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8420         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8421         CLEANUP_JMP_BUF.
8422         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8423         * tst-cancel12.c: New file.
8424         * tst-cancel13.c: New file.
8425         * tst-cancel14.c: New file.
8426         * tst-cancel15.c: New file.
8427         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8428         and tst-cancel15.
8430         * tst-cancel1.c: Add some comments.
8432         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8433         timeout correctly.
8435 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8437         * Makefile (CFLAGS-pthread_cancel.c): Define.
8439 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8441         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8442         Change type of __writer element to int.
8443         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8444         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8445         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8446         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8447         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8448         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8449         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8450         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8451         Compare with TID to determine deadlocks.
8452         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8453         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8454         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8455         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8458         Likewise.
8459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8460         Likewise.
8461         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8462         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8464         Likewise.
8465         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8466         Likewise.
8467         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8468         * Makefile (tests): Add tst-rwlock12.
8469         * tst-rwlock12.c: New file.
8471 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8473         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8474         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8475         Remove bogus hidden_proto.
8476         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8477         Likewise.
8478         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8479         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8480         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8481         ___lll_mutex_timedlock): Likewise.
8483 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8486         (__pthread_cond_signal): Add some code to eventually handle
8487         cond_lock!=0.
8489 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8491         * Makefile (tests): Add tst-exec4.
8492         (tst-exec4-ARGS): Define.
8493         * tst-exec4.c: New file.
8495 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8497         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8498         Also fail if tv_nsec < 0.
8499         (__lll_timedwait_tid): Likewise.
8500         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8501         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8502         Likewise.
8503         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8504         Likewise.
8505         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8506         Likewise.
8507         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8508         Likewise.
8509         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8510         Likewise.
8511         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8512         Likewise.
8514         * Makefile (tests): Add tst-sem8 and tst-sem9.
8515         * tst-sem8.c: New file.
8516         * tst-sem9.c: New file.
8517         * sem_open.c: Fix creation of in_use record if the file exists but
8518         no internal record.
8520         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8521         definitions.
8523         * sysdeps/pthread/timer_create.c (timer_create): In case
8524         evp==NULL, assign timer ID to sival_ptr.
8526         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8527         struct pthread_unwind_buf *.
8528         (struct pthread): Likewise for cleanup_jmp_buf element.
8530         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8531         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8532         * unwind.c (__pthread_unwind_next): Likewise.
8534 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8536         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8537         (lll_futex_timed_wait): Use int for futex value parameter.
8538         (lll_futex_wake): Likewise.
8539         (lll_futex_requeue): Likewise.
8541         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8542         Replace one memory operation with one register operation.
8544         * tst-join4.c (do_test): Fix error message.
8546         * tst-rwlock6.c (do_test): Use correct format specifier.
8548         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8549         (__lll_mutex_lock_wait): Replace one memory operation with one
8550         register operation.
8551         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8552         (__lll_mutex_lock_wait): Likewise.
8554         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8555         (__lll_mutex_cond_lock): Add one to value parameter of
8556         __lll_lock_wait to reflect reality in the futex syscall.
8557         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8558         (lll_mutex_cond_lock): Likewise.
8560 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8562         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8563         New function.
8564         (lll_mutex_cond_lock): Define.
8566 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8568         * Makefile (tests): Add tst-signal6.
8569         * tst-signal6.c: New file.
8571         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8572         (__lll_mutex_unlock_force): New function
8573         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8575         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8576         (__lll_mutex_unlock_force): New function.
8577         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8579         * tst-rwlock7.c (do_test): Use correct format specifier.
8581         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8582         Find break parameter in correct asm argument.
8584 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8586         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8587         Remove out4.
8588         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8589         error occured.
8590         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8591         Add __mutex.
8592         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8593         lll_futex_requeue, lll_mutex_unlock_force): Define.
8595 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8597         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8598         (pthread_cond_t): Add __mutex.
8599         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8600         lll_futex_requeue, lll_mutex_unlock_force): Define.
8602 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8604         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8605         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8606         Add __mutex field.
8607         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8608         Define.
8609         (lll_futex_wait, lll_futex_wake): Define.
8610         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8611         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8612         FUTEX_REQUEUE instead of FUTEX_WAIT.
8613         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8614         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8615         mutex which was used in condvar structure.  Call
8616         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8617         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8619         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8620         include tcb-offsets.h.  Read wakeup value in locked region.
8621         Use the value of gbr register as THREAD_ID.
8622         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8623         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8624         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8626         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8627         macros.
8629 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8631         * sysdeps/pthread/pthread_cond_broadcast.c
8632         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8634 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8636         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8637         typo in register name.
8638         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8639         correctly.  Actually use requeue.  Little optimization.
8640         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8641         mutex address early.  Handle cancellation state as 32-bit value.
8642         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8643         Remove unnecessary label.
8645 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8647         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8648         instead of FUTEX_WAIT.
8649         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8653         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8654         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8655         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8656         of __pthread_mutex_lock_internal.
8657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8659         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8660         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8663         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8664         Add pthread_mutex_cond_lock.
8665         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8666         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8667         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8668         lll_mutex_cond_lock.
8669         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8670         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8671         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8672         Add __mutex field.
8673         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8674         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8676         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8677         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8679         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8680         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8681         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8682         macro don't define aliases.
8684         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8685         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8686         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8687         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
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         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8694 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8696         * sem_open.c: Fix one endless loop.  Implement correct semantics
8697         wrt opening the same semaphore more then once.
8698         * sem_close.c: Adjust for sem_open change.
8699         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8700         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8701         * Makefile (tests): Add tst-sem7.
8702         * tst-sem7.c: New file.
8704 2003-05-16  Roland McGrath  <roland@redhat.com>
8706         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8707         uninitialized variable braino.
8709 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8711         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8712         test for syscall availability.
8714         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8715         __no_posix_timers to -1 if the syscalls don't exist.
8717         * pthread_join.c (pthread_join): Set tid field of the joined
8718         thread to -1.  This isn't necessary but helps to recognize some
8719         error conditions with almost no cost.
8721         * allocatestack.c (FREE_P): Also negative values indicate an
8722         unused stack.
8724         * unwind.c: Include <unistd.h>.
8726 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8728         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8730 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8732         * Makefile (crti-objs, crtn-objs): New variables.
8733         (omit-deps, extra-objs): Add crtn.
8734         ($(objpfx)libpthread.so): Depend on both crti and crtn
8735         and links to them in multidir.
8736         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8738 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8740         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8741         (lll_mutex_unlock): Use atomic_exchange_rel.
8743 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8745         * cond-perf.c (cons): Add missing locking around setting of alldone.
8747 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8749         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8750         related macros.
8751         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8753 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8755         * tst-sem6.c: New file.
8756         * Makefile (tests): Add tst-sem6.
8758         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8759         Use atomic_exchange_rel instead of atomic_exchange.
8760         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8761         Likewise.
8763         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8764         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8765         vsyscall is possible.
8767         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8768         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8769         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8770         pthread_setaffinity_np.
8771         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8772         and pthread_setaffinity_np.
8773         * Makefile (libpthread-routines): Add pthread_getaffinity and
8774         pthread_setaffinity.
8776         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8777         use it in case mmap to allocate the stack fails.
8778         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8779         ARCH_MAP_FLAGS here.
8780         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8781         ARCH_RETRY_MMAP.
8783 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8785         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8786         handler implementation.  It is now lockless in fork().
8787         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8788         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8789         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8790         declare the __fork_*_lists.
8791         (struct fork_handler): Include pointers to all three functions.
8792         Add next, refcntr and need_signal elements.
8793         (__fork_handlers): New declaration.
8794         (__register_atfork_malloc): Remove declaration.
8795         (HAVE_register_atfork_malloc): Remove definition.
8796         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8797         __pthread_child_handler variable.
8798         (__libc_pthread_init): Use __register_atfork instead of explicitly
8799         adding to the list.
8800         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8801         and lll_futex_wake.
8802         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8804         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8805         function must never be reached.
8807         * cond-perf.c: New file.
8809 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8811         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8813 2003-05-04  Roland McGrath  <roland@redhat.com>
8815         * Makefile ($(objpfx)../libc.so): New target.
8817 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8819         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8820         (pthread_condattr_t): Size is only an int, don't use long for
8821         alignment.
8822         (pthread_mutexattr_t): Likewise.
8823         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8824         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8825         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8827 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8829         * sysdeps/i386/tls.h: Define THREAD_ID.
8830         * sysdeps/ia64/tls.h: Likewise.
8831         * sysdeps/powerpc/tls.h: Likewise.
8832         * sysdeps/s390/tls.h: Likewise.
8833         * sysdeps/sh/tls.h: Likewise.
8834         * sysdeps/x86_64/tls.h: Likewise.
8835         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8836         record ownership.
8837         * pthread_mutex_timedlock.c: Likewise.
8838         * pthread_mutex_trylock.c: Likewise.
8839         * pthread_mutex_unlock.c: Likewise.
8840         * pthread_rwlock_trywrlock.c: Likewise.
8841         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8842         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8843         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8844         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8846         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8847         flag.
8849 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8851         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8852         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8853         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8854         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8855         Make __align long long instead of long.
8856         (pthread_rwlock_t): Formatting.
8857         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8858         (pthread_rwlock_t): Formatting.
8859         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8860         (pthread_cond_t): Make __align long long instead of long.
8861         (pthread_rwlock_t): Move __flags field to the same position as in
8862         linuxthreads.
8864 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8866         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8867         * tst-rwlock7.c (do_test): Likewise.
8869 2003-04-26  Roland McGrath  <roland@redhat.com>
8871         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8873 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8875         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8876         sizeof (struct pthread).
8877         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8878         1 struct pthread.
8879         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8880         to 0.
8881         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8882         struct pthread.
8883         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8884         to 32-bit bytes.
8885         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8886         tcbp.
8887         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8888         unneccessarily.
8889         (NO_TLS_OFFSET): Define.
8890         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8891         add TLS_TCB_SIZE unnecessarily.
8893 2003-04-22  Roland McGrath  <roland@redhat.com>
8895         * Makeconfig (shared-thread-library): Reverse link order to work
8896         around linker bug.
8898 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8900         * semaphore.h: Fix typo in comment.
8902 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8904         * sysdeps/pthread/sigfillset.c: New file.
8906         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8907         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8908         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8909         * sysdeps/pthread/sigaction.c: Likewise.
8910         * sysdeps/pthread/sigprocmask.c: New file.
8911         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8912         __SIGRTMIN+1.
8913         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8914         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8915         in this case.
8917 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8919         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8920         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8922         * sysdeps/unix/sysv/linux/unregister-atfork.c
8923         (__unregister_atfork): Don't free memory not allocated dynamically.
8925         * semaphore.h: Remove __THROW marker from cancellation points.
8926         * nptl/sysdeps/pthread/pthread.h: Likewise.
8928 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8930         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8931         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8932         __THROW.
8934 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8936         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8938 2003-04-15  Roland McGrath  <roland@redhat.com>
8940         * forward.c (__pthread_unwind): Tweak to avoid warning.
8942 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8944         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8946 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8949         overflow CFA advance instructions.
8950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8952 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8954         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8955         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8956         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8957         defined.
8959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8960         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8962         DW_CFA_advance_loc for .Laddl-.Lsubl.
8964 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8966         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8967         position-independent unwind data for static libraries.
8968         Add missing unwind info.  Add comments.
8970         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8971         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8975 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8977         * Makefile: Make sure all cancellation points are compiled with
8978         exception and asynchronous unwind tables.
8980         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8981         which mishandles loading of global object addresses in PIC.
8982         (THREAD_SETMEM_NC): Likewise.
8984 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8986         * pthread.h: Define new data structure for cleanup buffer.  Declare
8987         new cleanup handler interfaces.
8988         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8989         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8990         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8991         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8992         it.  Declare old cleanup handler installation functions.
8993         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8994         handling.
8995         * cleanup_defer.c: Likewise.
8996         * cleanup_compat.c: New file.  Old cleanup code.
8997         * cleanup_def_compat.c: New file.  Old cleanup code.
8998         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8999         if own thread descriptor.
9000         * unwind.c: New file.
9001         * forward.c: Add __pthread_unwind.
9002         * init.c (pthread_functions): Add __pthread_unwind.
9003         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9004         Add ptr___pthread_unwind.
9005         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9006         and unwind function.
9007         * Makefile (libpthread-routines): Add cleanup_compat,
9008         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9009         table generation if necessary.
9010         * version.c: Record whether unwind support is compiled in.
9011         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9012         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9013         handler interfaces.
9014         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9015         complication to generate unwind information for syscall wrappers.
9016         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9017         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9018         __cleanup_fct_attribute.
9020         * Makefile: Add rules to build and run tst-cleanup0.
9021         * tst-cleanup0.c: New file.
9022         * tst-cleanup0.expect: New file.
9024         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9025         caller.  Optimize to avoid often unecessary local variable.
9027 2003-04-11  Roland McGrath  <roland@redhat.com>
9029         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9030         sets variable `multidir'; include that.
9031         (generated): Add it.
9032         ($(objpfx)$(multidir)/crti.o): New target.
9033         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9035 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9037         * tst-attr2.c (do_test): Add cast to avoid warning.
9038         * tst-mutex4.c (do_test): Likewise.
9040 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9042         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9043         in child.
9045 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9047         * Makefile (tests): Add tst-detach1.
9048         * tst-detach1.c: New file.
9050 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9052         * sysdeps/pthread/pthread.h: Remove duplicate
9053         pthread_cleanup_{push,pop} definitions.
9055         * tst-barrier2.c: Eliminate warnings.
9056         * tst-cancel4.c: Likewise.
9057         * tst-cond4.c: Likewise.
9058         * tst-cond6.c: Likewise.
9059         * tst-detach1.c: Likewise.
9060         * tst-rwlock4.c: Likewise.
9061         * tst-rwlock6.c: Likewise.
9062         * tst-rwlock7.c: Likewise.
9063         * tst-sem3.c: Likewise.
9064         * tst-spin2.c: Likewise.
9065         * tst-umask1.c: Likewise.
9067 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9069         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9071 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9073         * descr.h (struct pthread): Move cancelhandling member to the front.
9075 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9077         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9078         malloc_parent, and malloc_child statically.
9079         (__register_atfork_malloc): New function.
9080         (free_mem): Don't free any of the malloc_* variables on the list.
9081         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9082         Define HAVE_register_atfork_malloc.
9084 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9086         * sysdeps/pthread/createthread.c (create_thread): Add some more
9087         comments explaining when to set multiple_threads and when not.
9089         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9090         THREAD_ATOMIC_BIT_SET if not already defined.
9091         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9092         THREAD_ATOMIC_BIT_SET:
9093         * sysdeps/x86_64/tls.h: Likewise.
9094         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9095         THREAD_ATOMIC_CMPXCHG_VAL.
9096         (_pthread_cleanup_pop_restore): Likewise.
9097         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9098         (__pthread_enable_asynccancel_2): Likewise.
9099         (__pthread_disable_asynccancel): Likewise.
9100         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9101         (__libc_disable_asynccancel): Likewise.
9102         * init.c (sigcancel_handler): Likewise.
9103         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9104         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9106 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9108         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9109         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9110         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9111         * Makefile (tests): Add tst-cancel11.
9112         * tst-cancel11.c: New file.
9114 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9116         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9117         round, not the first.  Use specific_used flag instead of local
9118         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9119         (__free_tcb): Don't call deallocate_tsd here.
9120         (start_thread): Call deallocate_tsd here.
9121         * pthread_setspecific.c: Set specific_used flag really only when
9122         needed.
9123         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9124         * tst-tsd3.c: New file.
9125         * tst-tsd4.c: New file.
9127 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9129         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9130         Use atomic_exchange_and_add instead of __lll_add.
9131         (__lll_mutex_timedlock): Likewise.
9132         Patch by Ian Wienand.
9134 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9136         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9137         (SINGLE_THREAD_P): Fix typo.
9138         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9140 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9142         * Makefile (tests): Add tst-align.
9143         * tst-align.c: New file.
9144         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9146         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9147         function correctly.
9149         * tst-tsd2.c: Add casts to avoid warnings.
9151 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9153         * descr.h (struct pthread): Move most often used elements to the front.
9155 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9157         * Makefile (libpthread-routines): Add pthread_atfork.
9158         (libpthread-static-only-routines): Add pthread_atfork.
9160 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9162         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9163         of TLS_DTV_AT_TP.
9164         (INSTALL_DTV): Add parens.
9165         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9166         Use passed descr instead of THREAD_SELF.
9167         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9168         (__lll_mutex_timedlock_wait): Correct expected value after
9169         spurious wakeup.
9170         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9171         Release lock before waking up the waiters.
9172         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9173         criteria.  Reorderstruct passed to cleanup handler.  Fix
9174         handling of cancellation and failung pthread_mutex_unlock call.
9175         Use __pthread_enable_asynccancel_2 instead of
9176         __pthread_enable_asynccancel.
9177         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9178         Return result of lock re-get if it fails.
9179         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9180         for __pthread_cleanup_push.
9181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9182         completely broken rwlock implementation.
9183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9187         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9188         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9189         versioned_symbol macro.
9190         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9191         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9193 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9195         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9196         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9197         and __helper_tid.
9198         (struct timer): Remove th and bar field.
9199         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9200         debugging code.  Create only one helper thread.
9201         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9202         helper thread.
9203         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9204         Renamed.  Define statically.  Use thread info from siginfo.
9205         (__helper_once): New variable.
9206         (__helper_tid): New variable.
9207         (__reset_helper_control): New function.
9208         (__start_helper_thread): New function.
9210         * pthread_create.c (start_thread): Don't use setjmp inside
9211         __builtin_expect to work around gcc bug.
9213         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9214         timer_delete syscall fails, but not with ENOSYS, set
9215         __no_posix_timers.
9217         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9218         (timer_settime): Fix typo.
9219         * sysdeps/unix/sysv/linux/timer_getoverr.c
9220         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9222 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9225         offset of cleanupbuf.__prev.
9227 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9229         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9230         of included file.
9232 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9234         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9235         NULL provide default definition to syscall.
9237 2003-03-25  Roland McGrath  <roland@redhat.com>
9239         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9240         (timer_id2ptr): Fix typo.
9242 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9244         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9245         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9246         * sysdeps/ia64/pthreaddef.h: Likewise.
9247         * sysdeps/powerpc/pthreaddef.h: Likewise.
9248         * sysdeps/s390/pthreaddef.h: Likewise.
9249         * sysdeps/sh/pthreaddef.h: Likewise.
9250         * sysdeps/x86_64/pthreaddef.h: Likewise.
9251         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9252         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9253         being changed.
9254         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9255         SIGTIMER is not unblocked.
9256         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9257         RT signal taken.
9258         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9259         be send.
9260         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9261         pass pointer through as ID.
9262         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9263         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9264         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9265         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9266         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9267         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9268         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9269         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9270         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9271         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9272         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9273         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9274         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9275         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9277         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9278         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9279         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9280         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9281         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9282         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9283         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9284         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9285         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9286         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9287         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9288         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9289         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9290         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9291         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9292         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9293         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9294         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9296         * pthreadP.h: Remove FRAME_LEFT definition.
9297         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9298         already left frame.  Programs which have this problem are not POSIX
9299         compliant.
9300         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9302 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9304         * sysdeps/pthread/tst-timer.c: Check return values of the
9305         functions we test.
9307 2003-03-23  Roland McGrath  <roland@redhat.com>
9309         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9310         * tst-tls3mod.c: Likewise.
9311         * tst-tls1.c: Likewise.
9312         * tst-tls2.c: Likewise.
9314         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9315         undefined behavior.
9317         * tst-join5.c (tf1, tf2): Add a cast.
9319         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9321         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9322         Don't test anything.
9323         * tst-cond4.c: Likewise.
9324         * tst-cond6.c: Likewise.
9325         * tst-flock2.c: Likewise.
9326         * tst-mutex4.c: Likewise.
9327         * tst-rwlock4.c: Likewise.
9328         * tst-signal1.c: Likewise.
9329         * tst-spin2.c: Likewise.
9330         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9332         * tst-mutex4.c: Use test-skeleton.c.
9333         * tst-spin2.c: Likewise.
9334         * tst-sysconf.c: Likewise.
9335         * tst-barrier2.c: Likewise.
9336         * tst-cond4.c: Likewise.
9337         * tst-cond6.c: Likewise.
9338         * tst-rwlock4.c: Likewise.
9339         * tst-unload.c: Likewise.
9340         * tst-flock2.c (do_test): Use return instead of exit.
9342 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9344         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9346 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9348         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9349         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9350         instead of __lll_compare_and_swap.
9351         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9352         Likewise.
9353         Removed definition if __lll_compare_and_swap.
9355         * cancellation.c: Adjust for new form of compare&exchange macros.
9356         * cleanup_defer.c: Likewise.
9357         * init.c: Likewise.
9358         * libc-cancellation.c: Likewise.
9359         * old_pthread_cond_broadcast.c: Likewise.
9360         * old_pthread_cond_signal.c: Likewise.
9361         * old_pthread_cond_timedwait.c: Likewise.
9362         * old_pthread_cond_wait.c: Likewise.
9363         * pthread_cancel.c: Likewise.
9364         * pthread_create.c: Likewise.
9365         * pthread_detach.c: Likewise.
9366         * pthread_join.c: Likewise.
9367         * pthread_key_delete.c: Likewise.
9368         * pthread_setcancelstate.c: Likewise.
9369         * pthread_setcanceltype.c: Likewise.
9370         * pthread_timedjoin.c: Likewise.
9371         * pthread_tryjoin.c: Likewise.
9372         * sysdeps/pthread/createthread.c: Likewise.
9374 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9376         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9377         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9378         definitions.  Replace uses with calls to atomic_* functions.
9379         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9380         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9381         __lll_test_and_set calls with atomic_exchange_and_add and
9382         atomic_exchange calls respectively.
9383         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9384         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9385         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9386         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9387         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9388         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9389         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9391         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9392         returns the old value.
9394 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9396         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9397         int for variable OLDVAL and correct inline assembler contraint.
9398         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9399         type int for variable OLD.
9401         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9402         only for s390-32.
9403         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9404         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9405         instead of multiple_threads field in the TCB.
9407 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9409         * sysdeps/i386/i686/bits/atomic.h: Removed.
9410         * sysdeps/i386/i586/bits/atomic.h: Removed.
9411         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9412         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9413         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9414         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9415         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9416         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9417         * atomic.h: Removed.  Moved to glibc.
9419         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9420         support for clock selection.
9422         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9423         signalling waiters.
9425 2003-03-18  Roland McGrath  <roland@redhat.com>
9427         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9428         Add __lll_rel_instr first.  Add memory clobber.
9429         (lll_mutex_unlock): Use __lll_test_and_set.
9430         From Paul Mackerras <paulus@samba.org>.
9432         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9433         unconditionally.
9434         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9435         (SINGLE_THREAD_P):  Add `header.' prefix.
9436         From Paul Mackerras <paulus@samba.org>.
9438         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9439         pthread_timedjoin_np to ...
9440         (libpthread: GLIBC_2.3.3): ... here.
9441         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9443         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9444         Avoid shadowing VAL variable.
9446         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9447         New macro.
9449 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9451         * Makefile (tests): Add tst-cond11.
9452         * tst-cond11.c: New file.
9454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9455         struct passed to cleanup handler to eliminate one more
9456         instruction.
9457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9459         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9460         (pthrad_cond_t): Replace __unused field with __clock.
9462         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9463         waken all waiters in cleanup handler.
9464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9467         * pthread_condattr_getclock.c: New file.
9468         * pthread_condattr_setclock.c: New file.
9469         * sysdeps/pthread/pthread.h: Declare these new functions.
9470         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9471         * Makefile (libpthread-routines): Add the new functions.
9472         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9473         Renamed field to value.  Document use of the bits.
9474         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9475         change.
9476         * pthread_condattr_setpshared.c: Likewise.
9477         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9478         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9479         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9480         Add __clock field.
9481         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9482         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9483         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9484         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9486         Implement clock selection.
9487         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9488         * pthread-errnos.sym: Add ENOSYS.
9489         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9490         _POSIX_CLOCK_SELECTION.
9491         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9493         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9494         invalid .size directive.
9496 2003-03-17  Roland McGrath  <roland@redhat.com>
9498         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9499         Formatting tweaks.
9501 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9503         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9504         Use __lll_add instead of spelling it out.  Use protected symbol names.
9505         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9506         Use __lll_add.
9507         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9508         Renamed from lll_compare_and_swap.  Use new name where necessary.
9509         (__lll_add): Defined.
9510         (__lll_dec_if_positive): Defined.
9511         (__lll_test_and_set): Defined.
9512         * sysdeps/ia64/pthread_spin_init.c: Removed.
9513         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9514         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9515         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9516         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9517         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9518         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9519         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9520         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9521         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9522         __sync_lock_release_si.
9523         Patch by Jakub Jelinek.
9525         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9526         Fix timeout handling.
9527         (__lll_timedwait_tid): Likewise.
9528         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9529         Patch by Jakub Jelinek.
9531         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9533 2003-03-17  Roland McGrath  <roland@redhat.com>
9535         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9536         * sysdeps/pthread/pthread_spin_init.c: New file.
9537         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9538         * sysdeps/powerpc/Makefile: New file.
9539         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9540         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9541         * sysdeps/powerpc/pthreaddef.h: New file.
9542         * sysdeps/powerpc/tcb-offsets.sym: New file.
9543         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9544         * sysdeps/powerpc/tls.h: New file.
9545         * sysdeps/powerpc/bits/atomic.h: New file.
9546         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9547         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9548         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9550         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9551         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9552         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9553         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9554         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9555         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9556         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9557         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9559         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9560         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9561         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9562         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9563         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9564         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9566         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9567         not gettimeofday.
9568         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9569         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9570         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9571         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9572         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9574 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9576         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9577         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9580         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9582 2003-03-16  Roland McGrath  <roland@redhat.com>
9584         * tst-fork4.c: Include <string.h>.
9585         * tst-signal2.c: Likewise.
9586         * tst-mutex5.c (do_test): exit -> return.
9587         * tst-mutex2.c: Include <stdlib.h>.
9589 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9591         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9592         (__lll_mutex_timedlock_wait): Correct expected value after
9593         spurious wakeup.  Otherwise we would never wait again.
9595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9596         zone versus inline asm stupidity.  Use correct instructions.
9598         * tst-rwlock6.c: Add some more status output.
9600 2003-03-15  Roland McGrath  <roland@redhat.com>
9602         * sysdeps/pthread/configure.in: New file.
9603         * sysdeps/pthread/configure: New file (generated).
9605 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9607         * allocatestack.c (allocate_stack): Store the exact stack size of
9608         user allocated stacks.
9610 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9612         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9613         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9614         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9615         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9616         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9617         Use `header.' prefix.
9618         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9620 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9622         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9623         __builtin_frame_address, use stack pointer.
9625         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9626         instead of __builtin_frame_pointer.
9628 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9630         * tst-basic1.c (do_test): Add cast to avoid warning.
9631         * tst-basic2.c (do_test): Likewise.
9633         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9634         amount of stack correction.
9636         * tst-fork4.c: Use test-skeleton.c.
9638 2003-03-14  Roland McGrath  <roland@redhat.com>
9640         * init.c: Fix typo "#eli" for "#else".
9642 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9644         * allocatestack.c (__stack_user): Use hidden_data_def.
9645         * pthread_create.c (__pthread_keys): Likewise.
9647         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9649 2003-03-14  Roland McGrath  <roland@redhat.com>
9651         * tst-fork4.c: New file.
9652         * Makefile (tests): Add it.
9654         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9655         we always define the padding space.
9656         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9657         stopped supporting its own extensions fully.
9658         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9659         struct also called `header', so `header.multiple_threads' is the field
9660         name to use on all machines.
9661         * allocatestack.c (allocate_stack): Use `header.' prefix.
9662         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9663         * pthread_create.c (__pthread_create_2_1): Likewise.
9664         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9665         (THREAD_SELF): Likewise.
9666         * sysdeps/x86_64/tls.h: Likewise.
9667         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9668         (SINGLE_THREAD_P): Likewise.
9669         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9670         (SINGLE_THREAD_P): Likewise.
9671         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9672         (SINGLE_THREAD_P): Likewise.
9674         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9675         value directly.
9677 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9679         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9680         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9682         * pthread_create.c (start_thread): setjmp is expected to return 0.
9684         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9685         (THREAD_GETMEM_NC): Likewise.
9687 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9689         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9690         and the size of the stack which must be allocated is a multiple,
9691         allocate one more page.
9692         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9693         MULTI_PAGE_ALIASING.
9695 2003-03-13  Roland McGrath  <roland@redhat.com>
9697         * pthread_create.c (start_thread): Set EXITING_BIT after the
9698         event-reporting (and destructors), not before.
9700 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9702         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9703         lll_futex_wake): Declare register variables as long int instead of
9704         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9705         Make syscall arguments clobbered by the syscall.
9706         (lll_futex_wait): Define using lll_futex_timed_wait.
9708         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9709         to void *.
9711         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9712         PPID if [! NDEBUG].
9714         * allocatestack.c (nptl_ncreated): Only declare if
9715         COLORING_INCREMENT != 0.
9717         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9718         (__libc_enable_asynccancel_2): Remove prototype.
9720         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9721         ctid to match kernel.
9723 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9725         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9726         libc_multiple_threads.
9727         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9728         __libc_multiple_threads to...
9729         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9731         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9732         versioning.
9733         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9734         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9736         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9737         (__pthread_once_internal): Define.
9739         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9740         macros instead of .symver directly.
9741         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9742         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9744         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9745         * sysdeps/x86_64/tcb-offsets.sym: New file.
9746         * sysdeps/x86_64/Makefile: New file.
9748         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9749         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9750         to access own pthread_t in TCB.
9751         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9752         Likewise.
9753         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9754         Likewise.
9755         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9757 2003-03-12  Roland McGrath  <roland@redhat.com>
9759         * pthread-errnos.sym: New file.
9760         * Makefile (gen-as-const-headers): New variable, list that file.
9761         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9762         header <pthread-errnos.h> instead of defining errno values here.
9763         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9764         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9765         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9767         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9768         Likewise.
9769         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9770         Likewise.
9771         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9773         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9774         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9775         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9776         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9777         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9778         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9779         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9780         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9781         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9782         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9783         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9784         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9785         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9786         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9788         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9789         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9790         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9791         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9792         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9793         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9794         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9795         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9796         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9797         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9799         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9800         CLONE_CHILD_SETTID worked.
9802 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9804         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9805         file.
9806         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9807         file.
9809         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9810         (pthread_cond_t): Add padding.
9812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9813         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9814         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9817         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9819         (__pthread_rwlock_timedrdlock): Likewise.
9820         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9821         (__pthread_rwlock_wrlock): Likewise.
9822         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9823         (__pthread_rwlock_rdlock): Likewise.
9825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9828         result of lock re-get if it fails.
9830 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9832         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9833         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9834         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9836         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9837         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9838         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9839         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9840         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9841         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9843         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9844         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9846         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9847         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9848         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9849         (create_thread): Likewise.
9850         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9851         * init.c (__pthread_initialize_minimal_internal): Initialize
9852         __libc_multiple_threads_ptr if necessary.
9853         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9854         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9855         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9856         __libc_multiple_threads.
9857         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9858         necessary.
9860         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9861         (THREAD_SETMEM_NC): Likewise.
9863         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9864         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9865         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9866         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9868         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9869         Eliminate one entire instruction.
9871         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9872         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9873         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9874         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9875         instead of __pthread_enable_asynccancel.
9876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9877         (__pthread_cond_wait): Likewise.
9878         * sysdeps/pthread/pthread_cond_timedwait.c
9879         (__pthread_cond_timedwait): Likewise.
9880         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9883         (__condvar_cleanup): Wake up all waiters in case we got signaled
9884         after being woken up but before disabling asynchronous
9885         cancellation.
9886         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9888         (__condvar_cleanup): Likewise.
9890         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9891         Make it an error if architecture has no #if case.  Add x86-64.
9893         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9894         pt-initfini.s generation.
9896         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9897         (TLS_INIT_TP): Fix typo.
9899 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9901         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9902         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9904         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9905         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9906         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9907         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9908         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9909         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9910         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9911         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9913 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9915         * sysdeps/pthread/pthread_cond_timedwait.c
9916         (__pthread_cond_timedwait): Return the result of the final
9917         locking.  If it succeeds, the regular function return value.
9919         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9920         Return result of the final locking.
9921         * version.c (__nptl_main): Work around problems with the strange
9922         INTERNAL_SYSCALL macro on ppc32.
9923         * init.c (__pthread_initialize_minimal_internal): Unblock
9924         SIGCANCEL in case the parent blocked it.
9925         Reported by Paul Mackerras <paulus@samba.org>.
9927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9928         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9929         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9931 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9933         * sysdeps/pthread/pthread_cond_timedwait.c
9934         (__pthread_cond_timedwait): Unlock and fail if
9935         __pthread_mutex_unlock_internal failed.
9937         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9938         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9939         Use ARCH_CLONE.
9940         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9941         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9942         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9943         ALLOCATE_STACK): New macros.
9944         (TLS_TPADJ): New macro.
9945         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9946         (allocate_stack): Handle TLS_DTV_AT_TP and
9947         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9948         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9949         Don't set PD->self.
9950         * init.c [__ia64__] (__NR_set_tid_address): Define.
9952         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9953         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9954         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9955         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9956         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9957         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9958         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9959         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9960         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9961         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9962         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9963         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9964         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9965         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9966         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9967         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9968         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9969         * sysdeps/ia64/bits/atomic.h: New file.
9970         * sysdeps/ia64/Makefile: New file.
9971         * sysdeps/ia64/pthread_spin_init.c: New file.
9972         * sysdeps/ia64/pthread_spin_lock.c: New file.
9973         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9974         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9975         * sysdeps/ia64/pthreaddef.h: New file.
9976         * sysdeps/ia64/tcb-offsets.sym: New file.
9977         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9978         * sysdeps/ia64/tls.h: New file.
9980         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9981         to syscall instead of no arguments.
9983 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9985         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9986         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9987         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9988         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9990         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9991         unused code.
9993         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9995         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9996         lowlevelbarrier.sym.
9997         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9998         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9999         Include lowlevelbarrier.h and don't define offsets locally.
10000         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10002         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10003         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10004         (__lll_mutex_timedlock_wait): Likewise.
10005         (lll_mutex_lock): Adjust asm for that.
10006         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10007         (lll_lock): Adjust asm for operand order change.
10008         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10009         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10011         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10012         Reverse order of parameters.
10013         (__lll_timedwait_tid): Remove regparms attribute.
10014         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10015         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10017         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10018         (__lll_timedwait_tid): Remove one unnecessary instruction.
10020         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10021         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10022         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10023         lowlevelmutex.S.
10025         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10026         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10027         for NOT_IN_libc.
10028         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10029         lowlevellock.S.
10031         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10032         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10033         for libc.so.
10034         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10035         define LOCK here (if UP is not defined).  The actual code is in
10036         lowlevelmutex.S.
10038         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10039         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10040         __lll_timedwait_tid for libc.so.
10041         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10042         define LOCK here (if UP is not defined).  The actual code is in
10043         lowlevellock.S.
10045         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10046         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10047         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10048         instead of lowlevelsem.h.
10049         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10050         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10051         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10053         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10054         lowlevelrwlock.sym.
10055         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10056         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10057         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10060         register loading.
10061         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10062         last changed.  D'oh.
10064         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10066         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10067         of __libc_locking_needed.
10068         (lll_trylock): Initialize %eax to zero.
10070         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10071         pthread_cond_t definition.
10073 2003-03-10  Roland McGrath  <roland@redhat.com>
10075         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10076         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10077         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10078         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10079         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10081         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10082         Instead of setting PD->multiple_threads, set globals
10083         __pthread_multiple_threads and __libc_multiple_threads.
10084         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10085         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10086         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10088         * descr.h (struct pthread): Conditionalize first member on
10089         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10090         containing an anonymous tcbhead_t.  Move `list' member out.
10091         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10092         * allocatestack.c: Remove use of `header.data.' prefix.
10093         * pthread_create.c: Likewise.
10094         * init.c (__pthread_initialize_minimal_internal): Likewise.
10095         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10096         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10097         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10098         * sysdeps/x86_64/tls.h: Likewise.
10099         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10100         (SINGLE_THREAD_P): Likewise.
10101         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10102         (SINGLE_THREAD_P): Likewise.
10103         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10104         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10106 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10108         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10110         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10111         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10113         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10114         leftovers from the ia32 code.
10116         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10117         memory load.
10118         (clear_once_control): Don't load %esi.
10120         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10121         handling.
10123         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10125         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10126         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10128         * Makefile (tests): Add tst-cond10.
10129         * tst-cond10.c: New file.
10131 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10133         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10134         * tst-signal3.c (do_test): Likewise.
10135         * tst-sem5.c (do_test): Likewise.
10136         * tst-kill6.c (do_test): Likewise.
10137         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10139         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10140         of inc/dec.
10141         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10142         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10143         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10144         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10146         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10148         Likewise.
10149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10150         Likewise.
10151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10156         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10157         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10158         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10160         * allocatestack.c (allocate_stack): If mprotect() fails free the
10161         TLS memory.
10163 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10165         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10167         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10168         lll_wake_tid.  This was used only to work around kernel limits in
10169         the early days.
10170         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10171         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10172         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10173         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10175         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10176         (__pthread_initialize_minimal_internal): Change initialization of
10177         __static_tls_align_m1 appropriately.
10178         * pthreadP.h (__static_tls_align_m1): Renamed from
10179         __static_tls_align.
10180         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10181         instead of __static_tls_align-1.
10183 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10185         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10187         * pthread_create.c: Define __pthread_keys using nocommon
10188         attribute, not by placing it explicitly in bss.
10189         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10191         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10192         Use it in mmap call to allocate stacks.
10194         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10196         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10197         result of the thread function.
10199 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10201         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10202         version is just fine.
10204         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10205         (__pthread_child_handler): Renamed from pthread_child_handler,
10206         exported, and marked hidden.  Change all users.
10207         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10208         free __pthread_child_handler from child list.
10210 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10212         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10214         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10215         Fix handling of cancellation and failing pthread_mutex_unlock call.
10216         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10217         (__pthread_cond_wait): Likewise.
10219         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10220         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10221         lll_futex_timed_wait call.
10222         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10223         (pthread_rwlock_timedwrlock): Likewise.
10225         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10226         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10227         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10229         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10230         check of lll_futex_wake return value.
10232 2003-03-03  Roland McGrath  <roland@redhat.com>
10234         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10236         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10237         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10238         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10240 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10242         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10243         error for CPU clocks.
10245         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10246         _POSIX_MONOTONIC_CLOCK.
10247         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10249         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10250         recent kernels.
10252 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10254         * descr.h (struct pthread): Move cleanup field to the front.
10256 2003-03-01  Roland McGrath  <roland@redhat.com>
10258         * sem_open.c (sem_open): Braino fix.
10260 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10262         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10264         __pthread_cleanup_pop functionality.
10265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10267         * descr.h (struct pthread): Move tid field to the front now that
10268         it is often used.
10270         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10271         (__lll_mutex_timedlock_wait): Remove.
10272         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10273         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10274         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10275         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10276         (lll_unlock_wake_cb): Don't save and restore %esi.
10277         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10278         %esi.
10279         (__lll_timedwait_tid): Add alignment.
10280         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10281         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10282         %esi.
10283         (__lll_timedwait_tid): Removed.
10284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10285         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10286         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10287         (pthread_barrier_wait): Don't save, load, and restore %esi for
10288         last thread.
10289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10290         (__pthread_cond_signal): Don't save, load, and restore %esi.
10291         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10292         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10293         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10294         Don't save, load, and restore %esi.
10296 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10298         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10299         Release lock before waking up the waiters.
10301         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10303         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10304         (reader_thread): Likewise.
10306         * sysdeps/pthread/pthread_rwlock_unlock.c
10307         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10308         to wake up readers if there are none.
10310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10311         Release internal lock before wake threads.
10313 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10315         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10316         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10317         predefined.
10318         * tst-rwlock9.c: Likewise.
10319         * tst-rwlock10.c: New file.
10320         * tst-rwlock11.c: New file.
10322         * Makefile (tests): Add tst-dlsym1.
10323         * tst-dlsym1.c: New file.
10325         * init.c (__pthread_initialize_minimal_internal): Set
10326         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10327         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10329 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10331         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10333         * tst-cond2.c: Fix sychronization with child.
10335         * tst-rwlock8.c (reader_thread): Remove unused variable.
10337         * Makefile: Add rules to build and run tst-tls3.
10338         * tst-tls3.c: New file.
10339         * tst-tls3mod.c: New file.
10341         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10342         * tst-rwlock8.c: New file.
10343         * tst-rwlock9.c: New file.
10344         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10345         complete broken rwlock implementation.
10346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10347         Likewise.
10348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10349         Likewise.
10350         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10351         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10352         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10353         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10354         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10355         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10356         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10358 2003-02-23  Roland McGrath  <roland@redhat.com>
10360         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10362 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10364         * Makefile (tests): Add tst-context1.
10365         * tst-context1.c: New file.
10367         * Makefile (tests): Add tst-tls1 and tst-tls2.
10368         * tst-tls1.c: New file.
10369         * tst-tls2.c: New file.
10371         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10372         for failed cmpxchg.
10374         * pthread_create.c (start_thread): Set EXITING_BIT early.
10376         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10377         (THREAD_GETMEM_NC): Likewise.
10379 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10381         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10382         off 3 more bytes by using offset-less instructions when possible.
10384         * Makefile: Add dependency for $(objpfx)version.d.
10386         * eintr.c (eintr_source): Add unnecessary return but the compiler
10387         insists.
10389         * tst-kill3.c: Include <unistd.h>.
10391 2003-02-21  Roland McGrath  <roland@redhat.com>
10393         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10395 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10397         * Makefile (tests): Add tst-eintr1.
10398         (distribute): Add eintr.c.
10399         * tst-eintr1.c: New file.
10400         * eintr.c: New file.
10402         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10404         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10405         Disallow sending SIGCANCEL.
10407         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10408         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10409         * tst-kill1.c: New file.
10410         * tst-kill2.c: New file.
10411         * tst-kill3.c: New file.
10412         * tst-kill5.c: New file.
10413         * tst-kill6.c: New file.
10414         * tst-basic7.c: Renamed to...
10415         * tst-kill4.c: ...this.
10417 2003-02-21  Roland McGrath  <roland@redhat.com>
10419         * Makefile (install-lib-ldscripts): New variable.
10421 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10423         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10424         * pthread_cancel.c: Use INVALID_TD_P.
10425         * pthread_detach.c: Likewise.
10426         * pthread_getschedparam.c: Likewise.
10427         * pthread_setschedparam.c: Likewise.
10428         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10429         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10430         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10431         * pthread_timedjoin.c: Likewise.
10433         * tst-basic7.c: Include <signal.h>.
10435         * pthread_join.c (pthread_join): Limited checking for invalid
10436         descriptors.
10437         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10439 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10441         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10442         beginning of the loop.  Clear the entire first block of TSD.
10443         * Makefile (tests): Add tst-key4.
10444         * tst-key4.c: New file.
10446 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10448         * Makefile (tests): Add tst-basic7.
10449         * tst-basic7.c: New file.
10451         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10452         Add some more __builtin_expect.
10454         * pthreadP.h: Define dummy version of DEBUGGING_P.
10456 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10458         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10459         _POSIX_THREAD_PRIORITY_SCHEDULING.
10460         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10461         _XOPEN_REALTIME_THREADS.
10462         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10464         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10465         kernel returns EINVAL for PID <= 0, work around it.
10467         * Makefile (tests): Add tst-signal5.
10468         * tst-signal5.c: New file.
10470         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10471         and LOGIN_NAME_MAX.
10473         * tst-cancel1.c (tf): Block all signals.
10475         * Makefile (tests): Add tst-basic6.
10476         * tst-basic6.c: New file.
10478         * tst-basic1.c: Add test for process ID.
10480         * Makefile (tests): Add tst-cancel10.
10481         * tst-cancel10.c: New file.
10483         * Makefile (tests): Add tst-signal4.
10484         * tst-signal4.c: New file.
10486         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10487         __sigismember instead of sigismember.  Add __builtin_expect.
10489 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10491         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10492         pthread_setcancelstate, and pthread_rwlock_setpshared.
10494         * tst-cancel7.c (do_test): Make sure the pid file exists before
10495         canceling the thread.
10497         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10498         pthread_rwlock_timedrdlock tests.
10499         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10500         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10501         Check for invalid tv_nsec field.
10502         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10503         Likewise.
10505         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10506         recursive mutex of overflow.
10508         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10510         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10511         going into an endless loop.
10512         * Makefile (tests): Add tst-cancel9.
10513         * tst-cancel9.c: New file.
10515         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10517 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10519         * tst-mutex5.c (do_test): Add more timedlock tests.
10521         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10522         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10524         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10525         use INLINE_SYSCALL.  Error number is returned, not -1.
10527         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10528         and __deallocate_stack with internal_function.
10529         * pthread_create.c: Adjust definitions appropriately.
10530         * allocatestack.c: Likewise.
10532         * pthread_join.c: Add one more __builtin_expect.
10533         * pthread_timedjoin.c: Likewise.
10535         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10536         not data of sequence number does not match.
10537         Add one __builtin_expect.
10539         * Makefile (tests): Add tst-clock1.
10540         * tst-clock1.c: New file.
10542         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10543         negative arguments.
10544         * Makefile (tests): Add tst-basic5.
10545         * tst-basic5.c: New file.
10547 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10549         * Makefile (tests): Add tst-basic4.
10550         * tst-basic4.c: New file.
10552         * pthreadP.h: Add declaraction for __nptl_nthreads.
10553         * pthread_create.c: Define __nptl_nthreads
10554         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10555         after thread is done.  If then zero, call exit(0).
10556         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10557         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10558         * init.c (pthread_functions): Initialize ptr_nthreads.
10559         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10560         (__reclaim_stacks): Decrement __nptl_nthreads.
10561         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10562         Define.
10563         * Makefile (tests): Add tst-basic3.
10564         * tst-basic3.c: New file.
10566         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10567         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10568         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10569         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10570         if asynchronous canceling is enabled.
10571         * pthread_join.c (pthread_join): When recognizing circular joins,
10572         take into account the other thread might be already canceled.
10573         * Makefile (tests): Add tst-join5.
10574         * tst-join5.c: New file.
10576         * Makefile (tests): Add tst-join4.
10577         * tst-join4.c: New file.
10579 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10581         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10583 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10585         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10586         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10587         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10588         warning.
10589         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10590         to avoid warning.
10591         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10592         error if lll_futex_wake failed.
10594 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10597         handling of cancellation and failung pthread_mutex_unlock call.
10598         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10599         * Makefile (tests): Add tst-cond8 and tst-cond9.
10600         * tst-cond8.c: New file.
10601         * tst-cond9.c: New file.
10603         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10605         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10606         non-standard initializers with __USE_GNU.
10608         * Makefile (tests): Add tst-cleanup3.
10609         * tst-cleanup3.c: New file.
10611 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10613         * Makefile (tests): Add tst-attr1 and tst-attr2.
10614         * tst-attr1.c: New file.
10615         * tst-attr2.c: New file.
10617         * Makefile: Add rules to build and run tst-atfork2 test.
10618         * tst-atfork2.c: New file.
10619         * tst-atfork2mod.c: New file.
10621         * sysdeps/unix/sysv/linux/unregister-atfork.c
10622         (__unregister_atfork): Free the memory allocated for the handlers
10623         after removing them from the lists.
10625         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10626         cleanup function.
10628         * tst-atfork1.c (do_test): Wait for the child we forked.
10629         Report error in child.
10631         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10633         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10635 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10637         * Makefile (tests): Add tst-cancel8.
10638         * tst-cancel8.c: New file.
10640         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10641         clearing of control variable.
10642         * Makefile (tests): Add tst-once3 and tst-once4.
10643         * tst-once3.c: New file.
10644         * tst-once4.c: New file.
10646 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10648         * sysdeps/sh/Makefile: New file.
10649         * sysdeps/sh/bits/atomic.h: New file.
10650         * sysdeps/sh/pthread_spin_init.c: New file.
10651         * sysdeps/sh/pthread_spin_lock.c: New file.
10652         * sysdeps/sh/pthread_spin_trylock.S: New file.
10653         * sysdeps/sh/pthread_spin_unlock.S: New file.
10654         * sysdeps/sh/pthreaddef.h: New file.
10655         * sysdeps/sh/tcb-offsets.sym: New file.
10656         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10657         * sysdeps/sh/tls.h: New file.
10658         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10659         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10660         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10661         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10662         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10663         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10664         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10665         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10666         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10667         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10668         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10669         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10670         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10671         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10672         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10673         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10674         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10675         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10676         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10677         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10679         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10682         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10683         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10684         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10685         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10686         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10687         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10689 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10691         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10692         according to POSIX.
10694         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10696 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10698         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10699         (TLS_GET_FS): New #define.
10700         (TLS_SET_FS): New #define.
10701         Correct value of __NR_set_thread_area.
10703         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10705 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10707         * Makefile (tests): Add tst-popen1.
10708         * tst-popen1.c: New file.
10710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10711         but inactive generalization.
10712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10713         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10714         Minor optimization, remove one instruction.
10715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10717 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10719         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10721 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10723         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10724         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10725         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10726         * sysdeps/pthread/pthread_cond_signal.c: New file.
10727         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10728         * sysdeps/pthread/pthread_cond_wait.c: New file.
10729         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10730         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10731         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10732         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10733         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10734         * sysdeps/s390/Makefile: New file.
10735         * sysdeps/s390/bits/atomic.h: New file.
10736         * sysdeps/s390/pthread_spin_init.c: New file.
10737         * sysdeps/s390/pthread_spin_lock.c: New file.
10738         * sysdeps/s390/pthread_spin_trylock.c: New file.
10739         * sysdeps/s390/pthread_spin_unlock.c: New file.
10740         * sysdeps/s390/pthreaddef.h: New file.
10741         * sysdeps/s390/tcb-offsets.sym: New file.
10742         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10743         * sysdeps/s390/tls.h: New file.
10744         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10745         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10746         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10747         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10748         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10749         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10750         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10751         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10752         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10753         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10754         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10755         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10756         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10757         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10758         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10759         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10760         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10761         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10762         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10763         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10764         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10765         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10766         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10768 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10770         * atomic.h: Add a couple more default implementations.
10771         (atomic_compare_and_exchange_acq): Use
10772         __arch_compare_and_exchange_32_acq in return value definition.  It
10773         always exists.
10774         (atomic_bit_set): Renamed from atomic_set_bit.
10775         Add missing atomic_ prefixes.
10777         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10778         thread library is available, use correct value to mark initialized
10779         once variable.
10781 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10783         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10784         __sysconf to determine pagesize.
10786         * pthread_create.c: Include <atomic.h>.
10787         * allocatestack.c (allocate_stack): Implement coloring of the
10788         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10789         size minus one.  Adjust users.
10790         * sysdeps/i386/i686/Makefile: New file.
10792 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10794         * allocatestack.c: Improve comment throughout the file.
10796         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10797         (__lll_lock_wait): Add branch prediction.
10798         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10799         (__lll_lock_wait): Likewise.
10800         (lll_unlock_wake_cb): Removed.
10802 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10804         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10805         _POSIX_THREAD_PRIORITY_SCHEDULING.
10807 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10809         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10810         Fix return type of ptr___pthread_getspecific.
10812 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10814         * Makefile (tests): Add tst-umask1.
10815         (tst-umask1-ARGS): Define.
10816         * tst-umask1.c: New file.
10818 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10820         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10821         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10822         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10823         pthread_rwlock_unlock.
10824         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10825         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10826         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10828         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10829         New file.
10830         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10831         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10832         New file.
10833         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10834         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10835         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10836         New file.
10837         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10838         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10839         New file.
10840         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10841         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10842         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10843         New file.
10844         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10845         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10846         New file.
10847         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10849         * Makefile (libpthread-routines): Remove lowlevelcond and
10850         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10851         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10852         and pthread_cond_broadcast.
10853         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10854         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10855         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10856         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10857         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10858         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10859         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10860         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10861         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10862         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10867         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10868         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10869         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10870         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10871         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10872         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10873         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10874         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10875         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10876         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10877         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10878         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10879         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10880         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10881         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10882         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10883         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10885         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10886         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10887         of the code is moved to ...
10888         * sysdeps/pthread/createthread.c: ...here.  New file.
10890 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10892         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10893         (__new_sem_post): Clear %eax before returning.
10894         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10896         * Makefile (tests): Add tst-cleanup2.
10897         * tst-cleanup2.c: New file.
10899         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10900         Interpret first parameter correctly.
10902 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10904         * Makefile (headers): Add bits/semaphore.h.
10906 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10908         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10909         if not SHARED.
10911 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10913         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10914         must be used and mapping failed.
10915         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10917         * Makefile (CFLAGS-pthread_self.os): Define this, not
10918         CFLAGS-pthread_self.c.
10920 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10922         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10923         lll_unlock_wake_cb.
10925         * Makefile (libpthread-routines): Add version.  Add rules to build
10926         version.os and banner.h.
10927         * version.c: New file.
10929 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10931         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10932         the alias unconditional.
10933         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10935 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10937         * Makefile (CFLAGS-pthread_self.c): New definition.
10939 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10941         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10942         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10943         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10944         * init.c (__pthread_initialize_minimal_internal): Likewise.
10946 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10948         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10950         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10951         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10952         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10953         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10954         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10955         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10957 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10959         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10960         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10961         * tst-cancel-wrappers.sh: Remove all exceptions.
10963 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10965         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10966         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10968         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10969         Use __libc_pthread_functions array if SHARED.
10971         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10972         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10974         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10975         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10976         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10977         __libc_ptf_call instead of __libc_maybe_call.
10978         (PTF): New #define.
10979         (__libc_cleanup_region_start): Wrap function name with PTF call.
10980         (__libc_cleanup_region_end): Likewise.
10981         (__libc_cleanup_end): Likewise.
10983         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10984         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10985         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10986         * pthreadP.h: Add prototypes.
10988         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10989         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10990         __pthread_rwlock_unlock aliases.
10991         * pthreadP.h: Add prototypes for new aliases.
10993         * pthreadP.h (struct pthead_functions): Moved to...
10994         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10995         * init.c (pthread_functions): Add initializers for new elements.
10997         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10998         __pthread_cleanup_pop_restore aliases.
10999         * pthreadP.h: Add prototypes.
11001         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11002         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11003         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11004         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11005         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11006         * pthreadP.h: Adjust prototypes and callers.
11008 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11010         * Makefile (tests): Add tst-cancel7.
11011         (tst-cancel7-ARGS): New variable.
11012         * tst-cancel7.c: New file.
11014         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11015         around gcc defficiencies.
11016         * old_pthread_cond_signal.c: Likewise.
11017         * old_pthread_cond_timedwait.c: Likewise.
11018         * old_pthread_cond_wait.c: Likewise.
11020         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11022 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11024         * Makefile (tests): Add tst-cond7.
11025         * tst-cond7.c: New file.
11027         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11028         (condvar_cleanup): Get condvar address from the right place.
11030         * atomic.h: Correct definitions of atomic_full_barrier,
11031         atomic_read_barrier, atomic_write_barrier.
11033         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11034         race-free.
11035         * old_pthread_cond_signal.c: Likewise.
11036         * old_pthread_cond_timedwait.c: Likewise.
11037         * old_pthread_cond_wait.c: Likewise.
11039 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11041         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11043 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11045         * pthreadP.h (pthread_cond_2_0_t): New type.
11046         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11047         Use new type for the 2.0 condvar function prototypes.
11048         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11049         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11050         parameter.
11051         * old_pthread_cond_destroy.c: Likewise.
11052         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11053         * old_pthread_cond_signal.c: Likewise.
11054         * old_pthread_cond_timedwait.c: Likewise.
11055         * old_pthread_cond_wait.c: Likewise.
11057         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11058         (__pthread_cond_wait): Don't save cancellation mode and seq value
11059         in same location.
11061         * herrno.c (__h_errno_location): Don't define as weak.
11063 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11065         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11066         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11067         and pthread_cond_wait.
11068         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11069         Renamed to...
11070         (__pthread_cond_broadcast_2_0): ... this.
11071         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11072         Renamed to...
11073         (__pthread_cond_destroy_2_0): ... this.
11074         * old_pthread_cond_init.c (__old_pthread_cond_init):
11075         Renamed to...
11076         (__pthread_cond_init_2_0): ... this.
11077         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11078         Renamed to...
11079         (__pthread_cond_signal_2_0): ... this.
11080         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11081         Renamed to...
11082         (__pthread_cond_wait_2_0): ... this.
11083         * pthread_cond_destroy.c: Include shlib-compat.h.
11084         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11085         * pthread_cond_init.c: Include shlib-compat.h.
11086         (pthread_cond_init): Change strong_alias into versioned_symbol.
11087         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11088         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11089         fields.
11090         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11091         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11092         __pthread_cond_wait_2_0): New prototypes.
11093         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11094         __old_pthread_cond_init, __old_pthread_cond_signal,
11095         __old_pthread_cond_wait): Removed.
11096         * init.c: Include shlib-compat.h.
11097         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11098         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11099         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11100         ptr___pthread_cond_*_2_0 fields.
11101         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11102         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11104         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11105         LIBC_SIGACTION was not yet defined.
11106         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11107         [!defined LIBC_SIGACTION] (__sigaction): New function and
11108         libc_hidden_weak.
11109         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11110         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11112 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11114         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11116 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11118         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11119         New, larger type definition.
11120         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11121         implementation.
11122         * Versions [libpthread]: Add definitions for new pthread_cond_*
11123         interfaces for version GLIBC_2.3.2.
11124         * pthread_cond_init.c: Update initialization for new type definition.
11125         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11126         pthread_cond_timedwait, pthread_cond_signal, and
11127         pthread_cond_broadcast.  Add old_pthread_cond_init,
11128         old_pthread_cond_destroy, old_pthread_cond_wait,
11129         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11130         old_pthread_cond_broadcast.
11131         * old_pthread_cond_broadcast.c: New file.
11132         * old_pthread_cond_destroy.c: New file.
11133         * old_pthread_cond_init.c: New file.
11134         * old_pthread_cond_signal.c: New file.
11135         * old_pthread_cond_timedwait.c: New file.
11136         * old_pthread_cond_wait.c: New file.
11137         * pthreadP.h: Add prototypes for the compatibility interfaces.
11139         * pthread_cond_destroy.c: Don't include <errno.h>.
11141 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11143         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11144         unnecessary zero offset when addressing MUTEX.
11146 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11148         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11149         __register_atfork.
11150         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11151         for __register_atfork.
11153 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11155         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11156         instead of ASSEMBLER test macro.
11158         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11159         __libc_current_sigrtmax): Add libc_hidden_def.
11161         * sysdeps/pthread/list.h: Remove assert.h include.
11163 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11165         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11166         __pthread_initialize_minimal_internal not
11167         __pthread_initialize_minimal.
11169 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11171         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11172         __pthread_initialize_minimal as hidden.
11174         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11175         constructor.
11177 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11179         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11180         $(common-objpfx)format.lds, include that into the output script.
11181         Fix comment.
11182         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11184 2002-12-28  Andreas Jaeger  <aj@suse.de>
11186         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11187         nsec resolution changes.
11188         (xstat64_conv): Likewise.
11189         (xstat32_conv): Likewise.
11190         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11191         struct kernel_stat.
11192         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11193         structs stat and stat64.
11194         * time/time.h (__timespec_defined): Define for __USE_MISC.
11195         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11197 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11199         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11200         argument.
11201         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11202         (pthread_exit): Use strong_alias to avoid warnings.
11203         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11204         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11205         ptr___pthread_attr_init_2_*.
11206         * init.c (pthread_functions): Adjust.
11208 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11210         * forward.c: Make all functions available by default again.  It
11211         caused too much trouble.
11213         * pt-siglongjmp.c: Removed.
11215 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11217         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11218         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11219         * sysdeps/i386/Makefile: New file.
11220         * sysdeps/i386/tcb-offsets.sym: New file.
11221         * sysdeps/pthread/tcb-offsets.h: New file.
11222         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11223         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11225         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11226         __register_atfork...
11227         (GLIBC_2.3.2): ...here.
11229 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11231         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11232         pthread_attr_setstackaddr with __attribute_deprecated__.
11234 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11236         * pt-system.c (system): Remove cancellation handling.
11237         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11238         cancellation routines.
11240 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11242         * descr.h: Include <dl-sysdep.h>.
11243         (struct pthread): Move header.data.list to the back of the struct.
11244         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11245         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11246         (SYSINFO_OFFSEET): Likewise.
11248 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11250         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11251         Define.
11252         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11253         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11254         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11255         (USE_DL_SYSINFO): Undef.
11257 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11259         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11260         $(common-objpfx)libc.so.
11261         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11262         it is bigger than pipe buffer size even on arches with bigger
11263         page size.
11264         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11266 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11268         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11269         correct errno access for case that USE___THREAD is not defined.
11271 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11273         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11274         Patch by Marijn Ros <marijn@mad.scientist.com>.
11276 2002-12-22  Roland McGrath  <roland@redhat.com>
11278         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11280 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11282         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11284 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11286         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11287         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11288         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11290         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11291         of int $0x80.
11292         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11293         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11294         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11295         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11296         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11297         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11298         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11299         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11301         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11302         sysenter.
11303         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11305         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11307         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11308         in new TCB.
11309         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11310         that sysinfo is properly initialized.
11311         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11312         to 1 only for ld.so.
11314         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11315         RTLD_CORRECT_DYNAMIC_WEAK.
11317 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11319         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11320         Use return 0 as 6th argument to FORWARD4.
11321         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11323 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11325         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11326         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11327         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11328         (INIT_SYSINFO): New #define.
11329         (TLS_TP_INIT): Use INIT_SYSINFO.
11330         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11331         At test to make sure SYSINFO_OFFSET value is correct.
11332         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11334 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11336         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11337         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11338         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11339         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11340         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11341         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11342         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11344 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11346         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11347         macro instead of using int $0x80 directly.
11349         * sysdeps/pthread/bits/stdio-lock.h: New file.
11350         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11351         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11352         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11353         * Makefile (routines): Add libc-lowlevelmutex.
11355         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11356         __i686.get_pc_thunk.dx.
11358 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11360         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11361         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11362         ($(objpfx)tst-cancel-wrappers.out): New rule.
11363         * tst-cancel-wrappers.sh: New test.
11364         * tst-locale1.c: Include signal.h.
11365         (uselocale): Test static linking of __libc_current_sigrt*.
11367 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11369         * Makefile (tests): Add tst-cancel6.
11370         * tst-cancel6.c: New file
11372 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11374         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11375         Define meaningfully for assembler as well.
11376         * pthreadP.h (struct pthread_functions): Remove
11377         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11378         and ptr_pthread_attr_init_2_1 fields.
11379         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11380         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11381         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11382         (FORWARD3): Define using FORWARD4.
11383         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11384         versions.
11385         * pt-system.c: Remove duplicate stdlib.h include.
11387 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11389         * sem_init.c: Define sem_init@GLIBC_2.0.
11390         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11391         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11393         * flockfile.c: Moved to...
11394         * sysdeps/pthread/flockfile.c: ...here.  New file.
11395         * funlockfile.c: Moved to...
11396         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11397         * ftrylockfile.c: Moved to...
11398         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11400 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11402         * libc-cancellation.c: Guard both function with
11403         #if !defined NOT_IN_libc.
11404         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11405         automatically provided pthread wrappers.
11406         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11407         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11408         nor in libpthread.
11409         * pt-open.c: Removed.
11410         * pt-fcntl.c: Removed.
11411         * pt-fsync.c: Removed.
11412         * pt-lseek.c: Removed.
11413         * pt-msgrcv.c: Removed.
11414         * pt-msgsnd.c: Removed.
11415         * pt-msync.c: Removed.
11416         * pt-nanosleep.c: Removed.
11417         * pt-open64.c: Removed.
11418         * pt-pause.c: Removed.
11419         * pt-pread.c: Removed.
11420         * pt-pread64.c: Removed.
11421         * pt-pwrite.c: Removed.
11422         * pt-pwrite64.c: Removed.
11423         * pt-read.c: Removed.
11424         * pt-recv.c: Removed.
11425         * pt-recvfrom.c: Removed.
11426         * pt-recvmsg.c: Removed.
11427         * pt-send.c: Removed.
11428         * pt-sendto.c: Removed.
11429         * pt-sigtimedwait.c: Removed.
11430         * pt-sigwait.c: Removed.
11431         * pt-wait.c: Removed.
11432         * pt-waitpid.c: Removed.
11433         * pt-write.c: Removed.
11434         * pt-accept.c: Removed.
11435         * pt-close.c: Removed.
11436         * pt-connect.c: Removed.
11437         * pt-lseek64.c: Removed.
11438         * pt-sendmsg.c: Removed.
11439         * pt-tcdrain.c: Removed.
11441 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11443         * init.c (__pthread_initialize_minimal_internal): Renamed from
11444         __pthread_initialize_minimal.  Make old name an alias.  This
11445         converts a normal relocation into a relative relocation.
11447         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11449         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11450         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11451         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11452         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11453         pt-sigwaitinfo, pt-waitid, and pt-writev.
11454         * pt-creat.c: Removed.
11455         * pt-poll.c: Removed.
11456         * pt-pselect.c: Removed.
11457         * pt-readv.c: Removed.
11458         * pt-select.c: Removed.
11459         * pt-sigpause.c: Removed.
11460         * pt-sigsuspend.c: Removed.
11461         * pt-sigwaitinfo.c: Removed.
11462         * pt-waitid.c: Removed.
11463         * pt-writev.c: Removed.
11465         * init.c (pthread_functions): New variable.
11466         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11467         (or NULL) to __libc_pthread_init.
11468         * forward.c: Rewrite to use __libc:pthread_functions array to get
11469         function addresses.
11470         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11471         prototype.
11472         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11473         Take new parameter.  Copy content of variable pointed to by it
11474         to __libc_pthread_init.
11476         * pthreadP.h (struct pthread_functions): New type.
11477         (__libc_pthread_init): Declare.
11479         * pthread_attr_destroy.c: Add namespace protected alias.
11480         * pthread_attr_getdetachstate.c: Likewise.
11481         * pthread_attr_getinheritsched.c: Likewise.
11482         * pthread_attr_getschedparam.c: Likewise.
11483         * pthread_attr_getschedpolicy.c: Likewise.
11484         * pthread_attr_getscope.c: Likewise.
11485         * pthread_attr_setdetachstate.c: Likewise.
11486         * pthread_attr_setinheritsched.c: Likewise.
11487         * pthread_attr_setschedparam.c: Likewise.
11488         * pthread_attr_setschedpolicy.c: Likewise.
11489         * pthread_attr_setscope.c: Likewise.
11490         * pthread_cond_broadcast.c: Likewise.
11491         * pthread_cond_destroy.c: Likewise.
11492         * pthread_cond_init.c: Likewise.
11493         * pthread_cond_signal.c: Likewise.
11494         * pthread_cond_wait.c: Likewise.
11495         * pthread_condattr_destroy.c: Likewise.
11496         * pthread_condattr_init.c: Likewise.
11497         * pthread_equal.c: Likewise.
11498         * pthread_exit.c: Likewise.
11499         * pthread_getschedparam.c: Likewise.
11500         * pthread_self.c: Likewise.
11501         * pthread_setcancelstate.c: Likewise.
11502         * pthread_setschedparam.c: Likewise.
11503         * pthread_mutex_destroy.c: Likewise.
11504         * pthread_mutex_init.c: Likewise.
11505         * pthreadP.h: Add prototypes for the aliases.
11507         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11508         multiple_threads member in correct TCB to 1.
11510         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11511         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11512         member of thread decriptor, otherwise return unconditionally 1.
11514 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11516         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11517         regular Linux version.  Remove file.
11518         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11519         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11520         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11521         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11522         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11523         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11524         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11525         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11526         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11527         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11528         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11529         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11530         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11531         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11532         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11533         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11534         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11535         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11536         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11537         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11538         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11539         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11540         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11541         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11542         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11543         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11544         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11545         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11546         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11547         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11549 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11551         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11552         * sysdeps/unix/sysv/linux/open.c: Removed.
11553         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11554         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11555         * sysdeps/unix/sysv/linux/msync.c: Removed.
11556         * sysdeps/unix/sysv/linux/read.c: Removed.
11557         * sysdeps/unix/sysv/linux/close.c: Removed.
11558         * sysdeps/unix/sysv/linux/creat.c: Removed.
11559         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11560         * sysdeps/unix/sysv/linux/pause.c: Removed.
11561         * sysdeps/unix/sysv/linux/select.c: Removed.
11562         * sysdeps/unix/sysv/linux/write.c: Removed.
11564 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11566         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11567         element in TCB to see whether locking is needed.
11569         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11570         MULTIPLE_THREADS_OFFSET value is correct.
11572         * sysdeps/unix/sysv/linux/close.c: New file.
11573         * sysdeps/unix/sysv/linux/connect.S: New file.
11574         * sysdeps/unix/sysv/linux/creat.c: New file.
11575         * sysdeps/unix/sysv/linux/fsync.c: New file.
11576         * sysdeps/unix/sysv/linux/llseek.c: New file.
11577         * sysdeps/unix/sysv/linux/lseek.c: New file.
11578         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11579         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11580         * sysdeps/unix/sysv/linux/msync.c: New file.
11581         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11582         * sysdeps/unix/sysv/linux/open.c: New file.
11583         * sysdeps/unix/sysv/linux/open64.c: New file.
11584         * sysdeps/unix/sysv/linux/pause.c: New file.
11585         * sysdeps/unix/sysv/linux/poll.c: New file.
11586         * sysdeps/unix/sysv/linux/pread.c: New file.
11587         * sysdeps/unix/sysv/linux/pread64.c: New file.
11588         * sysdeps/unix/sysv/linux/pselect.c: New file.
11589         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11590         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11591         * sysdeps/unix/sysv/linux/readv.c: New file.
11592         * sysdeps/unix/sysv/linux/recv.S: New file.
11593         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11594         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11595         * sysdeps/unix/sysv/linux/select.c: New file.
11596         * sysdeps/unix/sysv/linux/send.S: New file.
11597         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11598         * sysdeps/unix/sysv/linux/sendto.S: New file.
11599         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11600         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11601         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11602         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11603         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11604         * sysdeps/unix/sysv/linux/system.c: New file.
11605         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11606         * sysdeps/unix/sysv/linux/wait.c: New file.
11607         * sysdeps/unix/sysv/linux/waitid.c: New file.
11608         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11609         * sysdeps/unix/sysv/linux/writev.c: New file.
11610         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11612         * pt-readv.c: Fix comment.
11614 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11616         * tst-cleanup1.c: Include stdlib.h.
11618         * tst-cancel5.c: New test.
11619         * Makefile (tests): Add tst-cancel5.
11620         (tst-cancel5): Link against libc.so libpthread.so in that order.
11622 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11624         * forward.c (test_loaded): Prevent recursive calls.
11626         * Makefile (routines): Add libc-cancellation.
11627         * libc-cancellation.c: New file.
11628         * descr.h (struct pthread): Add multiple_threads field.
11629         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11630         new thread descriptor to 1.
11631         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11632         Initialize multiple_thread field after successful thread creation.
11633         * cancellation.c (__do_cancel): Move to pthreadP.h.
11634         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11635         (__pthread_disable_asynccancel): Add internal_function attribute.
11636         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11637         * pthread_setcancelstate.c: Likewise.
11638         * pthread_setcanceltype.c: Likewise.
11639         * pthread_exit.c: Likewise.
11640         * pthreadP.h (CANCELLATION_P): Likewise.
11641         (__do_cancel): Define as static inline.
11642         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11643         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11644         declarations.
11645         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11646         fields.  Define MULTIPLE_THREADS_OFFSET.
11647         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11648         declaration.
11649         * sysdeps/unix/sysv/linux/accept.S: New file.
11650         * sysdeps/unix/sysv/linux/read.c: New file.
11651         * sysdeps/unix/sysv/linux/write.c: New file.
11652         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11653         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11654         initialization of __libc_locking_needed.
11655         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11656         __libc_locking_needed, use multiple_threads field in TCB.
11657         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11659 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11661         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11662         version.
11663         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11665         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11666         access to __libc_locking_needed for PIC.
11668 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11670         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11671         declare for libc.so.
11672         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11673         expression.
11674         (__libc_lock_lock): Put into statement expression.
11675         (__libc_lock_unlock): Remove trailing semicolon.
11676         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11678 2002-12-12  Roland McGrath  <roland@redhat.com>
11680         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11681         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11683 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11685         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11686         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11687         Initialize __libc_locking_needed.
11688         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11689         instead of __register_pthread_fork_handler.
11690         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11691         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11692         fork-gen with libc_pthread_init.
11693         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11694         of __register_pthread_fork_handler.
11695         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11696         of __register_pthread_fork_handler.
11697         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11698         __libc_locking_needed to determine whether lock prefix can be avoided.
11699         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11701 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11703         * Makefile (tests): Add tst-cleanup1.
11704         * tst-cleanup1.c: New file.
11705         * cancellation.c (__cleanup_thread): Removed.
11706         (__do_cancel): Remove call to __cleanup_thread.
11707         * pthreadP.h: Remove __cleanup_thread prorotype.
11709         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11710         Remember function and argument even if cancellation handler
11711         function is not available.
11712         (__libc_cleanup_region_end): Execute registered function directly if
11713         pthread functions are not available.
11714         (__libc_cleanup_end): Likewise.
11716         * init.c (__pthread_initialize_minimal): Fix initialization in
11717         static lib by preventing gcc from being too clever.
11719 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11721         * init.c (__pthread_initialize_minimal): Remove unneccesary
11722         sigaddset call.
11724         * Makefile (tests): We can run tst-locale2 now.
11726 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11728         * Versions: Remove duplicated sigwait entry.
11730 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11732         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11733         inside libpthread.
11735         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11737         * pthreadP.h: Declare __pthread_enable_asynccancel and
11738         __pthread_disable_asynccancel.
11739         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11740         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11741         * cancellation.c (__pthread_enable_asynccancel): New function.
11742         (__pthread_disable_asynccancel): New function.
11743         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11744         * pt-close.c: Likewise.
11745         * pt-connect.c: Likewise.
11746         * pt-creat.c: Likewise.
11747         * pt-fcntl.c: Likewise.
11748         * pt-fsync.c: Likewise.
11749         * pt-lseek.c: Likewise.
11750         * pt-lseek64.c: Likewise.
11751         * pt-msgrcv.c: Likewise.
11752         * pt-msgsnd.c: Likewise.
11753         * pt-msync.c: Likewise.
11754         * pt-nanosleep.c: Likewise.
11755         * pt-open.c: Likewise.
11756         * pt-open64.c: Likewise.
11757         * pt-pause.c: Likewise.
11758         * pt-poll.c: Likewise.
11759         * pt-pread.c: Likewise.
11760         * pt-pread64.c: Likewise.
11761         * pt-pselect.c: Likewise.
11762         * pt-pwrite.c: Likewise.
11763         * pt-pwrite64.c: Likewise.
11764         * pt-read.c: Likewise.
11765         * pt-readv.c: Likewise.
11766         * pt-recv.c: Likewise.
11767         * pt-recvfrom.c: Likewise.
11768         * pt-recvmsg.c: Likewise.
11769         * pt-select.c: Likewise.
11770         * pt-send.c: Likewise.
11771         * pt-sendmsg.c: Likewise.
11772         * pt-sendto.c: Likewise.
11773         * pt-sigpause.c: Likewise.
11774         * pt-sigsuspend.c: Likewise.
11775         * pt-sigtimedwait.c: Likewise.
11776         * pt-sigwait.c: Likewise.
11777         * pt-sigwaitinfo.c: Likewise.
11778         * pt-system.c: Likewise.
11779         * pt-tcdrain.c: Likewise.
11780         * pt-wait.c: Likewise.
11781         * pt-waitid.c: Likewise.
11782         * pt-waitpid.c: Likewise.
11783         * pt-write.c: Likewise.
11784         * pt-writev.c: Likewise.
11785         * pthread_join.c: Likewise.
11786         * pthread_timedjoin.c: Likewise.
11788         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11789         (__xpg_sigpause): New function.
11790         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11792 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11794         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11796         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11797         _GI_pthread_cleanup_pop to pthreadP.h.
11799         * ftrylockfile.c: Use _IO_lock_trylock instead of
11800         pthread_mutex_trylock.
11802         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11803         (CANCEL_RESET): Likewise.
11804         (__pthread_setcanceltype_): Declare.
11805         (__pthread_mutex_lock_internal): Declare.
11806         (__pthread_mutex_unlock_internal): Declare.
11807         (__pthread_once_internal): Declare.
11808         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11809         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11811         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11812         and pthread_mutex_unlock.
11813         * pthread_cond_wait.c: Likewise.
11814         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11815         * pthread_mutex_unlock.c: Likewise.
11817         * pthread_setcanceltype.c: Add additional alias
11818         __pthread_setcanceltype.
11820         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11821         * sem_open.c (sem_open): Likewise.
11822         Use __libc_open, __libc_write, and __libc_close instead of
11823         open, write, and close respectively.
11825         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11826         Rewrite as statement expression since it must return a value.
11828         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11829         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11830         __pthread_kill.
11832         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11833         alias __pthread_once_internal.
11835         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11837 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11839         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11840         * tst-stdio1.c: New file.
11841         * tst-stdio2.c: New file.
11843         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11845         * Makefile (tests): Comment out tst-locale2 for now.
11846         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11848         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11849         -D_IO_MTSAFE_IO.
11850         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11851         Use _IO_lock_init instead of explicit assignment.
11853         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11854         Define __libc_lock_* and __libc_lock_recursive macros with
11855         lowlevellock macros, not pthread mutexes.
11857         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11858         of pthread_mutex_lock.
11859         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11860         instead of pthread_mutex_unlock.
11862 2002-12-06  Roland McGrath  <roland@redhat.com>
11864         * allocatestack.c (__stack_user): Use uninitialized defn.
11865         * init.c (__pthread_initialize_minimal): Initialize it here.
11867 2002-12-05  Roland McGrath  <roland@redhat.com>
11869         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11870         string.
11871         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11873         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11874         missing & here too.
11876 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11878         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11879         lowlevellock.
11880         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11881         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11882         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11883         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11884         for __libc_lock_* macros.
11885         * Makefile (routines): Add libc-lowlevellock.
11887 2002-10-09  Roland McGrath  <roland@redhat.com>
11889         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11890         Under [__PIC__], call the function via the pointer fetched for
11891         comparison rather than a call by name that uses the PLT.
11892         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11893         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11894         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11895         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11896         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11898 2002-12-04  Roland McGrath  <roland@redhat.com>
11900         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11902         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11903         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11905         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11907 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11909         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11910         a completely opaque, non-integer type.
11911         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11913 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11915         * sysdeps/i386/tls.h: Include stdlib.h.
11916         * sysdeps/x86_64/tls.h: Likewise.
11918 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11920         * Makefile (tests): Add tst-locale2.
11921         (tests-static): Likewise.
11922         * tst-locale2.c: New file.
11924         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11925         volatile and add memory clobbers to lock operations.
11927 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11929         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11930         * sysdeps/i386/i486/bits/atomic.h: New file.
11931         * sysdeps/i386/i586/bits/atomic.h: New file.
11932         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11933         include i486 version.
11934         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11935         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11936         Patch by Marijn Ros <marijn@mad.scientist.com>.
11938         * allocatestack.c (get_cached_stack): Don't crash if we first
11939         found a stack with a larger size then needed.
11940         Reported by Hui Huang <hui.huang@sun.com>.
11942         * Makefile (tests): Add tst-sysconf.
11943         * tst-sysconf.c: New file.
11945         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11946         PTHREAD_THREADS_MAX.
11948 2002-12-02  Roland McGrath  <roland@redhat.com>
11950         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11951         Declare using hidden_proto instead of attribute_hidden, so there are
11952         non-.hidden static symbols for gdb to find.
11953         (__pthread_keys): Likewise.
11954         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11955         * allocatestack.c (__stack_user): Likewise.
11956         * pthread_create.c (__pthread_keys): Likewise.
11957         (__nptl_threads_events, __nptl_last_event): Make these static instead
11958         of hidden.
11959         * pthread_key_create.c (__pthread_pthread_keys_max,
11960         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11962 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11964         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11965         statically.
11966         * tst-locale1.c: New file.
11968         * pthread_cond_timedwait.c: Include <stdlib.h>.
11970         * Makefile (tests): Add tst-fork2 and tst-fork3.
11971         * tst-fork2.c: New file.
11972         * tst-fork3.c: New file.
11974 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11976         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11978         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11979         require it to 200112L.
11981         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11982         instruction only if HAVE_CMOV is defined.
11983         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11985         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11987         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11989         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11991         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11993 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11995         * sysdeps/x86_64/bits/atomic.h: New file.
11997         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11998         16-bit operations.
12000         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12001         possible since gettid cannot fail.
12003         * sysdeps/x86_64/pthreaddef.h: New file.
12005         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12007         * sysdeps/x86_64/pthread_spin_init.c: New file.
12008         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12009         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12010         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12012         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12013         Add missing lock prefix.  Minute optimization.
12015         * tst-spin2.c (main): Also check successful trylock call.
12017         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12018         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12020         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12021         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12023         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12024         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12025         value in case of an error.  Add support for INTERNAL_SYSCALL.
12027         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12028         value in case of an error.
12030         * sysdeps/x86_64/tls.h: New file.
12032 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12034         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12035         takes the array member name and the index as parameters.
12036         (THREAD_SETMEM_NC): Likewise.
12037         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12038         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12039         interfaces.
12041         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12042         to decide which code to use.
12043         (THREAD_SETMEM_NC): Likewise.
12045         * allocatestack.c (queue_stack): Don't remove stack from list here.
12046         Do it in the caller.  Correct condition to prematurely terminate
12047         loop to free stacks.
12048         (__deallocate_stack): Remove stack from list here.
12050 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12052         * Makefile (tests): Add tst-stack1.
12053         * tst-stack1.c: New file.
12055         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12056         provided stack.
12058         * pthread_attr_getstack.c: Return bottom of the thread area.
12060 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12062         * Makefile (libpthread-routines): Add pt-allocrtsig and
12063         pthread_kill_other_threads.
12064         * pt-allocrtsig.c: New file.
12065         * pthread_kill_other_threads.c: New file.
12066         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12067         all three functions.
12068         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12069         allocrtsig.
12070         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12071         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12072         and __libc_allocate_rtsig_private.
12073         * Versions (libpthread): Export pthread_kill_other_threads_np,
12074         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12076 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12078         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12079         the end of the stack.  Adjust computations.
12080         When mprotect call fails dequeue stack and free it.
12081         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12082         attribute.
12083         * pthread_getattr_np.c: Likewise.
12085         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12086         surprises.
12088 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12090         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12091         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12093 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12095         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12096         * pthread_setspecific.c: Likewise.
12098 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12100         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12101         definitions.  Get them from the official place.
12102         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12104         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12105         Use new CLONE_ flags in clone() calls.
12107         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12108         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12110         * Versions: Add pthread_* functions for libc.
12111         * forward.c: New file.
12113         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12114         errno-loc.
12115         * herrno.c: New file.
12116         * res.c: New file.
12118         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12119         sem_trywait, and sem_timedwait.  Add herrno and res.
12120         * sem_init.c: Don't initialize lock and waiters members.
12121         * sem_open.c: Likewise.
12122         * sem_post.c: Removed.
12123         * sem_wait.c: Removed.
12124         * sem_trywait.c: Removed.
12125         * sem_timedwait.c: Removed.
12126         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12127         Includes full implementations of sem_post, sem_wait, sem_trywait,
12128         and sem_timedwait.
12129         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12130         for new implementation.
12131         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12132         and waiters fields.
12134         * tst-sem3.c: Improve error message.
12135         * tst-signal3.c: Likewise.
12137         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12138         to tell the kernel about the termination futex and to initialize tid
12139         member.  Don't initialize main_thread.
12140         * descr.h (struct pthread): Remove main_thread member.
12141         * cancelllation.c (__do_cancel): Remove code handling main thread.
12142         The main thread is not special anymore.
12144         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12145         size of the stacks to stack_cache_actsize.
12147         * pt-readv.c: Add missing "defined".
12148         * pt-sigwait.c: Likewise.
12149         * pt-writev.c: Likewise.
12151 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12153         * Versions: Export __connect from libpthread.
12154         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12156         * Makefile (libpthread-routines): Add pt-raise.
12157         * sysdeps/unix/sysv/linux/raise.c: New file.
12158         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12159         * sysdeps/generic/pt-raise.c: New file.
12161         * pthread_cond_init.c: Initialize all data elements of the condvar
12162         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12164         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12165         * pthread_create.c: Likewise.
12167         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12168         * tst-key1.c: New file.
12169         * tst-key2.c: New file.
12170         * tst-key3.c: New file.
12172         * Versions: Export pthread_detach for version GLIBC_2.0.
12173         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12175 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12177         * pthread_key_create.c: Terminate search after an unused key was found.
12178         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12180         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12181         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12183 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12185         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12186         dynamic lookup for errno in PIC.
12188         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12189         release the stack lock as soon as possible.
12190         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12191         the static TLS block.
12192         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12194         * cancellation.c: Renamed from cancelation.c.
12195         * Makefile: Adjust accordingly.
12196         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12197         * cleanup_defer.c: Use CANCELLATION_P.
12198         * pthread_testcancel.c: Likewise.
12199         * descr.h: Fix spelling in comments.
12200         * init.c: Likewise.
12201         * pthread_getattr_np.c: Likewise.
12202         * pthread_getschedparam.c: Likewise.
12203         * pthread_setschedparam.c: Likewise.
12204         * Versions: Likewise.
12206         * pt-pselect.c: New file.
12207         * Makefile (libpthread-routines): Add pt-pselect.
12208         * Versions: Add pselect.
12210         * tst-cancel4.c: New file.
12211         * Makefile (tests): Add tst-cancel4.
12213 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12215         * pthread_mutex_lock.c: Always record lock ownership.
12216         * pthread_mutex_timedlock.c: Likewise.
12217         * pthread_mutex_trylock.c: Likewise.
12219         * pt-readv.c: New file.
12220         * pt-writev.c: New file.
12221         * pt-creat.c: New file.
12222         * pt-msgrcv.c: New file.
12223         * pt-msgsnd.c: New file.
12224         * pt-poll.c: New file.
12225         * pt-select.c: New file.
12226         * pt-sigpause.c: New file.
12227         * pt-sigsuspend.c: New file.
12228         * pt-sigwait.c: New file.
12229         * pt-sigwaitinfo.c: New file.
12230         * pt-waitid.c: New file.
12231         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12232         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12233         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12234         * Versions: Add all the new functions.
12236         * tst-exit1.c: New file.
12237         * Makefile (tests): Add tst-exit1.
12239         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12241 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12243         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12245         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12246         call.  pthread_join is an official cancellation point.
12247         * pthread_timedjoin.c: Likewise.
12249         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12250         and the condvar's mutex are retrieved.
12251         * pthread_cond_timedwait.c: Likewise.
12252         Reported by dice@saros.East.Sun.COM.
12254 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12256         * pthreadP.h: Cut out all type definitions and move them...
12257         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12258         * pthreadP.h: Include <internaltypes.h>.
12260         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12261         performance tweaks.
12263         * sem_trywait.c: Shuffle #includes around to get right order.
12264         * sem_timedwait.c: Likewise.
12265         * sem_post.c: Likewise.
12266         * sem_wait.c: Likewise.
12268         * nptl 0.3 released.
12270         * Makefile (tests): Add tst-signal3.
12271         * tst-signal3.c: New file.
12273 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12275         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12276         the asms modify the sem object.
12277         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12279         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12280         the actual members.
12281         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12282         * semaphoreP.h: Include pthreadP.h.
12283         * sem_getvalue.c: Adjust to sem_t change.
12284         * sem_init.c: Likewise.
12285         * sem_open.c: Likewise.
12286         * sem_post.c: Likewise.
12287         * sem_timedwait.c: Likewise.
12288         * sem_trywait.c: Likewise.
12289         * sem_wait.c: Likewise.
12291 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12293         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12294         * tst-basic2.c: New file.
12295         * tst-exec1.c: New file.
12296         * tst-exec2.c: New file.
12297         * tst-exec3.c: New file.
12299         * tst-fork1.c: Remove extra */.
12301         * nptl 0.2 released.  The API for IA-32 is complete.