Add copyright notices to testsuite shell scripts
[platform/upstream/glibc.git] / nptl / ChangeLog
1 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
2
3         * tst-tls6.sh: Add copyright header.
4
5 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
6
7         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
8         to uint64_t for 64-bit store.
9         (THREAD_SETMEM_NC): Likewise.
10
11 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
12
13         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
14         64-bit store.
15         (THREAD_SETMEM_NC): Likewise.
16
17 2012-09-14  Jeff Law  <law@redhat.com>
18
19         [BZ #14583]
20         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
21
22 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
23
24         [BZ #14576]
25         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
26         Removed.
27
28 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
29
30         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
31         (LDLIBS-tst-cancel24): This.
32
33 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
34
35         [BZ #14545]
36         * Makefile (tests-static): Add tst-cancel21-static.
37         (tests): Likewise.
38         * tst-cancel21-static.c: New file.
39
40 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
41
42         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
43         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
44         [__NR_clock_getres]: Make code unconditional.
45         (pthread_getcpuclockid): Remove code left unreachable by removal
46         of conditionals.
47
48 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
49
50         [BZ #14532]
51         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
52         atomic_compare_and_exchange_bool_rel.
53         * tst-sem14.c: New file.
54         * Makefile (tests): Add tst-sem14.
55
56 2012-08-15  Roland McGrath  <roland@hack.frob.com>
57
58         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
59         of -D_IO_MTSAFE_IO.
60         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
61         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
62
63 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
64
65         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
66         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
67         * pthread_condattr_setclock.c (pthread_condattr_setclock)
68         [!__ASSUME_POSIX_TIMERS]: Likewise.
69         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
70         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
71         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
72         [!__ASSUME_POSIX_TIMERS]: Likewise.
73         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
74         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
75         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
76         code unconditional.
77         [!__NR-timer_create]: Remove conditional code.
78         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
79         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
80         code unconditional.
81         [!__NR_timer_delete]: Remove conditional code.
82         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
83         * sysdeps/unix/sysv/linux/timer_getoverr.c
84         [__NR_timer_getoverrun]: Make code unconditional.
85         [!__NR_timer_getoverrun]: Remove conditional code.
86         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
87         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
88         Make code unconditional.
89         [!__NR_timer_gettime]: Remove conditional code.
90         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
91         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
92         Make code unconditional.
93         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
94         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
95         Make code unconditional.
96         [!__NR_timer_settime]: Remove conditional code.
97         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
98         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
99         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
100         conditional code.
101
102 2012-08-15  Tom de Vries  <vries@codesourcery.com>
103             Maxim Kuvyrkov  <maxim@codesourcery.com>
104
105         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
106         (__libc_lock_trylock): Allow pre-existing definitions.
107
108 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
109
110         * pthread_spin_lock.c: New file.
111         * pthread_spin_trylock.c: New file.
112
113 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
114
115         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
116         code unconditional.
117         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
118         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
119         unconditional.
120         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
121         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
122         Make code unconditional.
123         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
124         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
125         __NR_tgkill]: Make code unconditional.
126         (raise) [__ASSUME_TGKILL]: Likewise.
127         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
128         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
129         [__ASSUME_TGKILL]: Make code unconditional.
130         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
131         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
132         __NR_tgkill]: Make code unconditional.
133         (raise) [__ASSUME_TGKILL]: Likewise.
134         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
135
136 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
137
138         * sysdeps/pthread/createthread.c (create_thread)
139         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
140
141 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
142
143         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
144         code unconditional.
145         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
146
147 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
148
149         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
150         (pagesize): New static variable.
151         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
152         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
153         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
154         halfway up the stack top page.  Verify that the top page was
155         written into.
156         (do_test): Get pagesize using sysconf.
157
158 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
159
160         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
161         label.
162         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
163         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
164         Likewise.
165
166 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
167
168         * tst-pthread-getattr.c: Revert last change.
169
170 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
171
172         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
173         size.
174         (_MIN): New macro.
175         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
176         of MEM to test.
177         (check_stack_top): Read valued written into STACKADDR in
178         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
179
180 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
181
182         * nptl-init.c (sighandler_setxid): Fix the comment that
183         describes it.
184
185 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
186
187         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
188         (__lll_robust_timedlock_wait): Simplify CFI directives.
189
190 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
191
192         [BZ #12416]
193         * Makefile (tests): Add test case.
194         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
195         the __libc_stack_end page from stacksize.  Truncate stacksize to
196         make it page aligned when it is computed from RLIMIT_STACK.
197         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
198         accessible.
199
200 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
201
202         [BZ #14205]
203         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
204         branches.
205
206 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
207             Jakub Jelinek  <jakub@redhat.com>
208
209         [BZ #14188]
210         * sysdeps/pthread/pthread.h
211         [!(defined __GNUC__ && defined __EXCEPTIONS)]
212         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
213         __libc_unlikely instead of __builtin_expect.
214
215 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
216
217         [BZ #14117]
218         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
219         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
220         * sysdeps/unix/sysv/linux/i386/Implies: New file.
221         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
222         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
223         to ...
224         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
225         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
226         to ...
227         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
228
229 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
230
231         [BZ #14132]
232         * nptl-init.c (pthread_functions): Remove use of INTUSE and
233         _internal aliases.
234         (__pthread_initialize_minimal_internal): Likewise.
235         * sem_open.c: Likewise.
236         * sem_unlink.c: Likewise.
237         * pthreadP.h: Replace _internal aliases by hidden_proto
238         declarations.
239         * pthread_getspecific.c: Replace _internal alias by hidden_def.
240         * pthread_key_create.c: Likewise.
241         * pthread_mutex_destroy.c: Likewise.
242         * pthread_mutex_init.c: Likewise.
243         * pthread_mutex_lock.c: Likewise.
244         * pthread_mutex_unlock.c: Likewise.
245         * pthread_once.c: Likewise.
246         * pthread_rwlock_rdlock.c: Likewise.
247         * pthread_rwlock_unlock.c: Likewise.
248         * pthread_rwlock_wrlock.c: Likewise.
249         * pthread_setspecific.c: Likewise.
250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
251         Likewise.
252         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
253         Likewise.
254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
255         Likewise.
256         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
257         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
258         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
259         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
260         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
261         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
262         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
263         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
264         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
265         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
266         Likewise.
267         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
268         Likewise.
269         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
270         Likewise.
271
272 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
273
274         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
275         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
276
277         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
278         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
279         directives.
280         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
281         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
282         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
283         (pthread_barrier_wait): Likewise.
284         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
285         (__pthread_cond_broadcast): Likewise.
286         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
287         (__pthread_cond_signal): Likewise.
288         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
289         (__pthread_cond_timedwait): Likewise.
290         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
291         Likewise.
292         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
293         (__pthread_rwlock_rdlock): Likewise.
294         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
295         (pthread_rwlock_timedrdlock): Likewise.
296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
297         (pthread_rwlock_timedwrlock): Likewise.
298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
299         (__pthread_rwlock_unlock): Likewise.
300         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
301         (__pthread_rwlock_wrlock): Likewise.
302         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
303         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
304         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
305         Likewise.
306         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
307
308 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
309
310         [BZ #12416]
311         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
312         __libc_stack_end rounded to the end of containing page as the
313         real stack end.
314
315 2012-05-25  Rayson Ho  <rho@redhat.com>
316
317         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
318         probes for i386.
319         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
320         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
321         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
323         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
325         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
326         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
327
328 2012-05-25  Rayson Ho  <rho@redhat.com>
329             Roland McGrath  <roland@hack.frob.com>
330
331         * DESIGN-systemtap-probes.txt: New file.
332         * pthread_cond_broadcast.c: SystemTap probes.
333         * pthread_cond_init.c: Likewise.
334         * pthread_cond_signal.c: Likewise.
335         * pthread_cond_wait.c: Likewise.
336         * pthread_cond_destroy.c: Likewise.
337         * pthread_create.c: Likewise.
338         * pthread_join.c: Likewise.
339         * pthread_mutex_destroy.c: Likewise.
340         * pthread_mutex_init.c: Likewise.
341         * pthread_mutex_lock.c: Likewise.
342         * pthread_mutex_timedlock.c: Likewise.
343         * pthread_mutex_unlock.c: Likewise.
344         * pthread_rwlock_destroy.c: Likewise.
345         * pthread_rwlock_rdlock.c: Likewise.
346         * pthread_rwlock_unlock.c: Likewise.
347         * pthread_rwlock_wrlock.c: Likewise.
348         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
354         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
355         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
356
357 2012-05-24  Roland McGrath  <roland@hack.frob.com>
358
359         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
360
361 2012-05-17  Andreas Jaeger  <aj@suse.de>
362
363         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
364         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
365         only for older kernels.
366
367 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
368
369         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
370         not define.
371
372 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
373
374         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
375         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
376         (lll_robust_lock): Likewise.
377         (lll_cond_lock): Likewise.
378         (lll_robust_cond_lock): Likewise.
379         (lll_timedlock): Likewise.
380         (lll_robust_timedlock): Likewise.
381         (lll_unlock): Likewise.
382         (lll_robust_unlock): Likewise.
383
384 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
385
386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
387         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
388
389 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
390
391         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
392         on NWAITERS.
393         (__gcc_personality_v0): Replace 8-byte data alignment with
394         LP_SIZE alignment and .quad with ASM_ADDR.
395
396 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
397
398         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
399         on NWAITERS.
400         (__gcc_personality_v0): Replace 8-byte data alignment with
401         LP_SIZE alignment and .quad with ASM_ADDR.
402
403 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
404
405         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
406         NWAITERS, which is unsigned long int.
407
408 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
409
410         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
411         (__gcc_personality_v0): Replace 8-byte data alignment with
412         LP_SIZE alignment and .quad with ASM_ADDR.
413
414 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
415
416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
417         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
418         __vdso_clock_gettime pointer into RAX_LP.
419         (__gcc_personality_v0): Replace 8-byte data alignment with
420         LP_SIZE alignment and .quad with ASM_ADDR.
421
422 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
423
424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
425         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
426         __vdso_clock_gettime pointer into RAX_LP.
427         (__gcc_personality_v0): Replace 8-byte data alignment with
428         LP_SIZE alignment and .quad with ASM_ADDR.
429
430 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
431
432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
433         LP_OP(cmp) and R8_LP on dep_mutex pointer.
434
435 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
436
437         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
438         to update pointer in memory.  Load pointer into RDI_LP.
439
440 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
441
442         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
443         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
444         of 8.
445         (LLL_STUB_UNWIND_INFO_END): Likewise.
446         (lll_timedlock): Load timeout pointer into RDX_LP.
447         (lll_robust_timedlock): Likewise.
448
449 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
450             Jakub Jelinek  <jakub@redhat.com>
451
452         [BZ #13613]
453         * Makefile (tests): Add test cases.
454         * descr.h (struct pthread): Add a comment describing multiple_threads.
455         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
456         single-process case.
457         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
458         before setting cancelstate of the thread.
459         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
460         (__libc_multiple_threads): Add explanatory comment.
461         * tst-cancel-self-cancelstate.c: New test case.
462         * tst-cancel-self-canceltype.c: Likewise.
463         * tst-cancel-self-cleanup.c: Supporting file for test cases.
464         * tst-cancel-self-testcancel.c: New test case.
465         * tst-cancel-self.c: Likewise.
466         * vars.c: Expand comment to include single-process case.
467
468 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
469
470         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
471         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
472         to 32 bytes.
473
474 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
475
476         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
477         New.
478         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
479         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
480
481 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
482
483         * shlib-versions: Move x86_64-.*-linux.* entry to ...
484         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
485         * sysdeps/x86_64/x32/shlib-versions: New file.
486
487 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
488
489         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
490         __SIZEOF_PTHREAD_XXX_T.
491         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
492         (pthread_mutex_t): Likewise.
493         (pthread_rwlock_t): Likewise.
494         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
495         is defined.
496
497 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
498
499         * sysdeps/x86_64/x32/tls.h: New file.
500
501 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
502
503         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
504         integer.
505         (THREAD_SETMEM_NC): Likewise.
506
507 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
508
509         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
510         mov/%0.
511
512 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
513
514         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
515         (__cleanup_fct_attribute): Check __x86_64__ instead of
516         __WORDSIZE.
517
518 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
519
520         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
521         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
522         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
523         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
524         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
525
526 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
527
528         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
529         instead of __WORDSIZE.
530
531 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
532
533         [BZ #3748]
534         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
535
536 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
537
538         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
539         (__pthread_cond_timedwait): Use CFI directives.
540         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
541         (__pthread_cond_wait): Likewise.
542         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
543         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
544
545 2012-05-03  David S. Miller  <davem@davemloft.net>
546
547         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
548         always have to return 0, especially for the pthread_spin_init
549         alias.
550         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
551         newline.
552         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
553         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
554
555 2012-05-02  David S. Miller  <davem@davemloft.net>
556
557         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
558         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
559         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
560         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
561         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
562         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
563         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
564         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
565         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
566         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
567         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
568         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
569         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
570         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
571         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
572         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
573         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
574         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
575
576 2012-05-02  Allan McRae  <allan@archlinux.org>
577
578         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
579         (LDFLAGS-tst-cancel24): Likewise.
580
581 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
582
583         * sysdeps/i386/pthread_spin_lock.S: New.
584         * sysdeps/i386/pthread_spin_lock.c: Delete.
585         * sysdeps/x86_64/pthread_spin_lock.S: New.
586         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
587
588 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
589
590         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
591         run when cross-compiling.
592
593 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
594
595         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
596         instead of libgcc_s.h.
597
598 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
599
600         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
601
602 2012-03-27  David S. Miller  <davem@davemloft.net>
603
604         * tst-cond16.c (do_test): Use a thread stack size which is either
605         PTHREAD_STACK_MIN or the page size, whichever is larger.
606         * tst-cond18.c (do_test): Likewise.
607
608 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
609
610         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
611         register char * __asm__("rsp") to get stack frame.
612
613 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
614
615         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
616         __NR_futex directly.
617
618 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
619
620         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
621         _Unwind_Ptr first.
622
623 2012-03-16  David S. Miller  <davem@davemloft.net>
624
625         [BZ #13844]
626         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
627         instead of "...".
628         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
629         Delete, not needed.
630
631 2012-03-15  David S. Miller  <davem@davemloft.net>
632
633         [BZ #13844]
634         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
635
636 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
637
638         [BZ #13673]
639         * pt-crti.S: Replace FSF snail mail address with URL.
640
641 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
642
643         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
644         Do not define before including <time.h>.
645
646 2012-03-08  David S. Miller  <davem@davemloft.net>
647
648         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
649
650 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
651
652         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
653         Check for timestamp before the Epoch.
654
655         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
656         updating nwaiters.
657
658         * tst-sem13.c (do_test): Add another test case.
659         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
660         Fix updating nwaiters.
661
662 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
663
664         [BZ #10545]
665         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
666         link test to a compile test.
667         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
668         <stdio.h>.
669         * sysdeps/pthread/configure: Regenerated.
670
671 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
672
673         * Makefile (distribute): Remove variable.
674
675 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
676
677         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
678         superfluous assignment.
679         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
680         Likewise.
681         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
682         (sem_timedwait): Likewise.
683
684 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
685
686         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
687         installed headers to...
688         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
689
690 2012-03-06  David S. Miller  <davem@davemloft.net>
691
692         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
693         atomic_increment and remove unused local variable.
694         (__old_sem_post): Likewise.
695
696 2012-02-27  David S. Miller  <davem@davemloft.net>
697
698         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
699         non-existing __pthread_attr.
700         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
701         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
702         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
703         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
704         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
705
706 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
707
708         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
709
710         * sysdeps/pthread/pthread.h: Define __need_timespec before including
711         <time.h>.
712         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
713         union.
714         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
715         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
716         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
717         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
718         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
719
720 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
721
722         [BZ #13695]
723         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
724         pt-initfini.s.
725         [crti.S not in sysdirs] (omit-deps): Do not append.
726         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
727         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
728         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
729         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
730         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
731         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
732         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
733         [crti.S in sysdirs] (extra-objs): Append unconditionally.
734         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
735         unconditionally.
736         * sysdeps/pthread/pt-initfini.c: Remove file.
737
738 2012-02-16  Richard Henderson  <rth@twiddle.net>
739
740         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
741         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
742
743 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
744
745         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
746
747 2012-02-16  David S. Miller  <davem@davemloft.net>
748
749         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
750
751 2012-02-15  Marek Polacek  <polacek@redhat.com>
752
753         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
754
755 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
756
757         Replace FSF snail mail address with URLs, as per GNU coding standards.
758
759 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
760
761         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
762
763 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
764
765         Support crti.S and crtn.S provided directly by architectures.
766         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
767         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
768         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
769         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
770         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
771         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
772         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
773         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
774         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
775         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
776         * pt-crti.S: New file.
777         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
778
779 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
780
781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
782         macros for PIC register setup.
783         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
784         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
785         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
786         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
787         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
788
789 2012-01-11  Marek Polacek  <polacek@redhat.com>
790
791         * forward.c (FORWARD_NORETURN): Define macro.
792         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
793         (__pthread_exit): Likewise.
794
795 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
796
797         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
798
799         * pthreadP.h: Add noreturn to __pthread_exit.
800         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
801
802 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
803
804         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
805         Call pthread_attr_setstacksize() with result of
806         __pthread_get_minstack() to account for application TLS usage.
807
808 2012-01-08  Marek Polacek  <polacek@redhat.com>
809
810         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
811
812 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
813
814         [BZ #13553]
815         * pthreadP.h: Use const instead of __const.
816         * semaphore.h: Likewise.
817         * sysdeps/pthread/bits/libc-lock.h: Likewise.
818         * sysdeps/pthread/bits/sigthread.h: Likewise.
819         * sysdeps/pthread/pthread.h: Likewise.
820
821         * Makefile: Remove elf=yes test, only ELF is supported.
822
823         * shlib-versions: Remove entries for ports architectures.
824
825         In case anyone cares, the IA-64 architecture could move to ports.
826         * sysdeps/ia64/*: Removed.
827         * sysdeps/unix/sysv/linux/ia64/*: Removed.
828
829 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
830
831         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
832         __pthread_get_minstack.
833         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
834
835         [BZ #13088]
836         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
837         through __pthread_get_minstack.
838         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
839         directly from _rtld_global_ro.
840         (__pthread_get_minstack): New function.
841         * pthreadP.h: Declare __pthread_get_minstack.
842         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
843
844 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
845
846         [BZ #13515]
847         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
848         Correct reading name from file.
849
850 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
851
852         * allocatestack.c (allocate_stack): Return errno on failure.
853
854 2011-12-14  Jeff Law  <law@redhat.com>
855
856         [BZ #5245]
857         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
858
859 2011-11-28  Andreas Schwab  <schwab@redhat.com>
860
861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
862         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
864
865 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
866
867         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
868         /proc/self/maps.
869
870 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
871
872         [BZ #13358]
873         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
874         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
875         path for kernels with FUTEX_CLOCK_REALTIME.
876         Debugged by H.J. Lu <hjl.tools@gmail.com>.
877
878 2011-10-27  Andreas Schwab  <schwab@redhat.com>
879
880         [BZ #13344]
881         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
882         for memory synchronization functions.
883         * semaphore.h: Likewise.
884
885 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
886
887         * tst-cancel7.c: Avoid warning.
888         * tst-mutex6.c: Likewise.
889         * tst-mutex9.c: Likewise.
890         * tst-mutexpi6.c: Likewise.
891
892 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
893
894         * sysdeps/i386/tls.h: Remove #include <list.h>.
895
896 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
897
898         * pthread_create.c (start_thread): Call __ctype_init.
899
900 2011-09-15  Andreas Schwab  <schwab@redhat.com>
901
902         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
903         defined.
904         (list_add): Add atomic_write_barrier.
905         * descr.h: Define __need_list_t before including <list.h>.
906         * nptl-init.c: Include <list.h>
907         * allocatestack.c: Likewise.
908
909 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
910
911         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
912         * sysdeps/ia64/tls.h: Likewise.
913         * sysdeps/powerpc/tls.h: Likewise.
914         * sysdeps/s390/tls.h: Likewise.
915         * sysdeps/sh/tls.h: Likewise.
916         * sysdeps/sparc/tls.h: Likewise.
917         * sysdeps/x86_64/tls.h: Likewise.
918
919 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
920
921         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
922
923         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
924         !USE___THREAD.
925         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
926         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
927         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
928         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
929         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
930         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
931         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
932         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
933         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
934         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
935         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
936         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
937
938         * tst-tls1.c: Support for __thread is now mandatory.
939         * tst-tls2.c: Likewise.
940         * tst-tls3.c: Likewise.
941         * tst-tls3mod.c: Likewise.
942         * tst-tls4.c: Likewise.
943         * tst-tls4moda.c: Likewise.
944         * tst-tls4modb.c: Likewise.
945         * tst-tls5.h: Likewise.
946
947 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
948
949         [BZ #12403]
950         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
951         (pthread_rwlock_timedwrlock): Use correct macro in test.
952         Patch by H.J. Lu <hongjiu.lu@intel.com>.
953
954 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
955
956         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
957         use gettimeofday vsyscall, just call gettimeofday.
958         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
959         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
960         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
961         Likewise.
962         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
963         Likewise.
964         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
965         Simplify __vdso_clock_gettime use.
966
967 2011-09-05  David S. Miller  <davem@davemloft.net>
968
969         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
970         New function.
971         (sem_timedwait): Call it to force an exception region around
972         the async cancel enable and the futex operation.
973         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
974         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
975         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
976         (__new_sem_wait): Call it to force an exception region around
977         the async cancel enable and the futex operation.
978         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
979         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
980
981 2011-08-31  Andreas Schwab  <schwab@redhat.com>
982
983         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
984         thread is woken up.
985
986 2011-08-20  David S. Miller  <davem@davemloft.net>
987
988         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
989
990 2011-08-14  Roland McGrath  <roland@hack.frob.com>
991
992         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
993         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
994
995 2011-08-08  Andreas Schwab  <schwab@redhat.com>
996
997         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
998         stack.
999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1000         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1001
1002 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1003
1004         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1005         barrier.
1006         (__gcc_personality_v0): Likewise.
1007         (_Unwind_ForcedUnwind): Likewise.
1008         (_Unwind_GetCFA): Likewise.
1009
1010 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1011
1012         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1013         UINTMAX_C.
1014
1015 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1016
1017         * nptl-init.c (__nptl_set_robust): New function.
1018         (pthread_functions): Add reference.
1019         * npthreadP.h: Declare __nptl_set_robust.
1020         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1021         ptr_set_robust member.
1022         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1023         child if threads are used.
1024
1025 2011-06-14  Andreas Jaeger  <aj@suse.de>
1026
1027         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1028
1029 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1030
1031         [BZ #386]
1032         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1033
1034 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1035
1036         [BZ #12650]
1037         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1038         clearing memory.
1039         Patch partly by Robert Rex <robert.rex@exasol.com>.
1040
1041 2011-01-19  Roland McGrath  <roland@redhat.com>
1042
1043         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1044         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1045         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1046         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1047         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1048         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1049
1050 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1051
1052         * Makefile (test-extras): Add tst-cleanup4aux.
1053
1054 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1055
1056         [BZ #10563]
1057         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1058         (__SETXID_2): Likewise.
1059         (__SETXID_3): Likewise.
1060
1061 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1062
1063         [BZ #10484]
1064         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1065         * alloca_cutoff.c: Add libc_hidden_def.
1066
1067 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1068
1069         [BZ #12113]
1070         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1071         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1072         of "struct pthread".
1073
1074 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1075
1076         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1077         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1078         (pthread_cleanup_push_defer_np): Likewise.
1079
1080 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1081
1082         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1083         small.
1084
1085 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1086             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1087
1088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1089         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1090
1091 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1092
1093         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1094
1095 2010-05-01  Alan Modra  <amodra@gmail.com>
1096
1097         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1098         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1099         to save temps.  Correct cfi for possible later frame manipulation.
1100         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1101         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1102         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1103         (DOCARGS_6, UNDOCARGS_6): Likewise.
1104         (CENABLE, CDISABLE): Add nops for non-shared calls.
1105
1106 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1107
1108         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1109         Fix type mismatch.
1110
1111 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1112
1113         * tst-abstime.c (do_test): Some more cleanups
1114
1115 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1116
1117         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1118
1119 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1120             Ulrich Drepper  <drepper@redhat.com>
1121
1122         * Makefile (tests): Add tst-abstime.
1123         * tst-abstime.c: New file.
1124         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1125         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1126         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1127         (__lll_timedlock_wait): Likewise.
1128         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1129         (__lll_robust_timedlock_wait): Likewise.
1130         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1131         (__pthread_cond_timedwait): Likewise.
1132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1133         (pthread_rwlock_timedrdlock): Likewise.
1134         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1135         (pthread_rwlock_timedwrlock): Likewise.
1136         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1137         Likewise.
1138
1139 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1140
1141         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1142
1143 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1144
1145         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1146         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1147
1148 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1149
1150         [BZ #11390]
1151         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1152         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1153         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1154         pthread_setname.
1155         * Makefile (libpthread-routines): Add pthread_getname and
1156         pthread_setname.
1157         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1158
1159 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1160
1161         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1162         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1163         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1164         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1165
1166 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1167
1168         * pthread_cond_timedwait.c: Add check for
1169         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1170         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1171         INTERNAL_SYSCALL.
1172
1173 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1174
1175         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1176         and the call fails wake eventually waiting setxid threads.  Don't free
1177         stack here if we try starting a thread.
1178         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1179         if the clone call failed.
1180
1181 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1182
1183         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1184         * allocatestack.c (get_cached_stack): Set setxid_futex.
1185         (allocate_stack): Likewise.
1186
1187 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1188             Ulrich Drepper  <drepper@redhat.com>
1189
1190         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1191         it is creating a thread or it is just being created.
1192         * pthread_create.c (start_thread): Wake setxid thread if it is
1193         waiting.
1194         (__pthread_create_2_1): Initialize setxid_futex.
1195         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1196         is waiting.
1197
1198 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1199
1200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1201         Fix unwind info.
1202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1203
1204 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1205
1206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1207         Fix pthread_cond_timedwait with requeue-PI.
1208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1209         Fix pthread_cond_wait with requeue-PI.
1210
1211 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1212
1213         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1214         and pthread_mutexattr_setrobust for GLIBC_2.12.
1215         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1216         * pthread_mutexattr_getrobust.c: Define alias
1217         pthread_mutexattr_getrobust.
1218         * pthread_mutexattr_setrobust.c: Define alias
1219         pthread_mutexattr_setrobust.
1220
1221 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1222
1223         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1224
1225 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1226
1227         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1228
1229 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1230
1231         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1232         call __gmon_start__.
1233         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1234
1235 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1236
1237         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1238         using memset.
1239
1240 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1241
1242         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1243         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1245         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1248         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1249         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1250
1251 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1252
1253         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1254         Don't update nwaiters after invalid timeout is recognized.
1255
1256 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1257
1258         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1259         __gmon_start__.
1260
1261 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1262
1263         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1264         THREAD_SELF->cancelhandling after returning from futex call.
1265
1266 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1267
1268         * tst-sem13.c: New file.
1269         * Makefile (tests): Add tst-sem13.
1270
1271 2009-11-22  Roland McGrath  <roland@redhat.com>
1272
1273         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1274         instead of recapitulating its contents.
1275
1276 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1277
1278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1279         optimizations and cleanups.
1280
1281 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1282
1283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1284         Remove redundant code. Fix cfi offsets.
1285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1286         Fix cfi offsets.
1287
1288 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1289
1290         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1291         reduce size of unwind info.
1292
1293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1294         cfi directives.
1295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1296         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1297
1298 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1299
1300         [BZ #4457]
1301         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1302         LIBGCC_S_SO.
1303         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1304
1305 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1306
1307         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1308
1309         [BZ #3270]
1310         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1311         steps to avoid races with creation and terminations.
1312         * nptl-init.c (sighandler_setxid): Adjust.
1313         Patch by Daniel Jacobowitz.
1314
1315 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1316
1317         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1318
1319 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1320             Joseph Myers  <joseph@codesourcery.com>
1321
1322         [BZ #7094]
1323         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1324         Initialize the sigev_notify field for newly created timer to make sure
1325         the timer gets deleted from the active timer's list upon timer_delete.
1326
1327 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1328
1329         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1330         Correct a logic error.
1331
1332 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1333
1334         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1335         of the field in local variables.
1336         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1337         variable and don't unconditionally clear it.
1338
1339 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1340
1341         * pthread_create.c (start_thread): Hint to the kernel that memory for
1342         the stack can be reused.  We do not mark all the memory.  The part
1343         still in use and some reserve are kept.
1344
1345 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1346
1347         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1348
1349 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1350
1351         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1352         directives.
1353
1354 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1355
1356         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1357         directives.
1358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1359
1360 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1361
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1363         (__pthread_cond_signal): Don't clobber register used for syscall
1364         number.
1365
1366 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1367
1368         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1369         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1370
1371         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1372         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1373         register.
1374
1375 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1376
1377         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1378         enabled by the special *_asynccancel functions.
1379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1381
1382         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1383
1384 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1385
1386         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1387         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1388         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1389         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1390         since we can assume the special __*_{en,dis}able_asynccancel
1391         functions.
1392         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1393         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1394         and PTHREAD_CANCELED.
1395
1396 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1397
1398         * descr.h: Better definition of *_BITMASK macros for cancellation.
1399
1400 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1401
1402         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1403
1404         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1405         dynamic linker might have to save.
1406         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1407         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1408         printing.
1409
1410         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1411
1412 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1413
1414         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1415         New function.
1416         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1417         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1418         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1419         requeue_pi for robust mutexes.
1420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1422         Don't only skip __pthread_mutex_cond_lock.  Call instead
1423         __pthread_mutex_cond_lock_adjust.
1424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1425
1426         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1427         optimization of PI mutex handling.
1428
1429 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1430
1431         [BZ #10418]
1432         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1433         instead of of _acq variants of cmpxchg.
1434
1435 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1436
1437         * sysdeps/x86_64/configure.in: New file.
1438
1439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1440         path when not using absolute timeout futex.
1441
1442 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1443
1444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1445         optimizations of last changes.
1446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1447
1448 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1449
1450         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1451         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1453         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1456         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1458
1459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1460         (__pthread_cond_timedwait): Make more robust.
1461
1462 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1463
1464         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1465         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1466         directly use absolute timeout.
1467
1468         * tst-sem5.c (do_test): Add test for premature timeout.
1469         * Makefile: Linu tst-sem5 with librt.
1470
1471         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1472         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1473         directly use absolute timeout.
1474         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1475         (pthread_rwlock_timedrdlock): Likewise.
1476
1477         * tst-cond11.c (run_test): Add test to check that the timeout is
1478         long enough.
1479
1480         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1481         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1482         directly use absolute timeout.
1483
1484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1485         (__pthread_cond_wait): Convert to using exception handler instead of
1486         registered unwind buffer.
1487         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1488         (__pthread_cond_timedwait): Likewise.
1489
1490 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1491
1492         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1493         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1494         use absolute timeout.
1495
1496         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1497         handling of uncontested semaphore.
1498
1499         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1500         (__condvar_cleanup): Rewrite to use cfi directives instead of
1501         hand-coded unwind tables.
1502         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1503         Likewise.
1504         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1505         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1506         Likewise.
1507
1508 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1509
1510         * Makefile (libpthread-routines): Add pthread_sigqueue.
1511         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1512         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1513         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1514
1515 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1516
1517         [BZ #10262]
1518         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1519         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1520         cannot be assumed.
1521         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1522
1523 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1524
1525         * libc-cancellation.c: Move __libc_cleanup_routine to...
1526         * libc-cleanup.c: ...here.  New file.
1527         * Makefile (routines): Add libc-cleanup.
1528
1529         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1530         test.
1531         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1532         * sysdeps/pthread/librt-cancellation.c: Likewise.
1533
1534         [BZ #9924]
1535         * nptl-init.c: Renamed from init.c.
1536         * Makefile: Change all occurences of init.c to nptl-init.c.
1537
1538 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1539
1540         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1541         to test when deciding on the delay.
1542         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1543         * pthread_cancel.c: Close race between deciding on sending a signal
1544         and setting the CANCELING_BIT bit.
1545
1546         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1547         thread is canceled.
1548         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1549
1550 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1551
1552         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1553         is available.
1554         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1555         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1556         * sysdeps/i386/tls.h: Likewise.
1557         (tcbhead_t): Add __private_tm member.
1558
1559 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1560
1561         * sem_open.c (sem_open): Rewrite initialization of initsem to
1562         avoid warnings.
1563
1564         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1565         Avoid warning by using may_alias attribute on ptrhack.
1566
1567 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1568
1569         [BZ #10090]
1570         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1571         Check policy and priority for validity.
1572         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1573
1574 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1575
1576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1577         (__pthread_cond_timedwait): Change to use cfi directives instead of
1578         hand-coded unwind sections.
1579
1580 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1581
1582         * init.c (nptl_freeres): Compile only for SHARED.
1583
1584 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1585
1586         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1587         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1588         FUTEX_BITSET_MATCH_ANY.
1589
1590 2009-02-27  Roland McGrath  <roland@redhat.com>
1591
1592         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1593         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1594
1595 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1596
1597         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1598         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1599         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1600         200112L to 200809L.
1601
1602 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1603
1604         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1605         POSIX 2008.
1606
1607 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1608
1609         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1610         Unify name of include protector macro.
1611
1612 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1613
1614         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1615         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1616
1617 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1618
1619         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1620         pointer variables.
1621
1622         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1623         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1624         * init.c (nptl_freeres): New function.
1625         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1626         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1627         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1628         variable.
1629         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1630         load DSO.  Assign last.
1631         (__unwind_freeres): New function.
1632
1633         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1634         for better debugging.  No need to use stack_list_add here.
1635
1636 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1637
1638         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1639         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1640         instead of computing relative timeout.
1641         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1642         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1643
1644 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1645
1646         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1647
1648 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1649
1650         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1651         (list_add_tail): Removed.
1652
1653 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1654
1655         * (in_flight_stack): New variable.
1656         (stack_list_del): New function.  Use instead of list_del.
1657         (stack_list_add): New function.  Use instead of list_add when adding to
1658         stack_cache and stack_used lists.
1659         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1660         when the fork call interrupted another thread.
1661
1662 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1663
1664         * init.c (__pthread_initialize_minimal_internal): Optimize test
1665         FUTEX_CLOCK_REALTIME a bit.
1666
1667 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1668
1669         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1670         only passing five parameters to FUTEX_WAIT_BITSET call.
1671
1672         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1673         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1674         instead of computing relative timeout.
1675
1676 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1677
1678         * init.c (__pthread_initialize_minimal_internal): Check for
1679         FUTEX_CLOCK_REALTIME flag.
1680         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1681         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1682         relative timeout.
1683
1684         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1685         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1686         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1687         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1688         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1689         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1690
1691 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1692
1693         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1694         loop body instead of ; to avoid gcc warnings.
1695         (pthread_cleanup_pop_restore_np): Likewise.
1696         Patch by Caolán McNamara <caolanm@redhat.com>.
1697
1698 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1699
1700         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1701         fast path here, for robust/PI/PP mutexes call
1702         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1703         of ifs according to their probability.
1704         (__pthread_mutex_lock_full): New function.
1705         * pthread_mutex_unlock.c: Include assert.h.
1706         (__pthread_mutex_unlock_usercnt): Handle only the
1707         fast path here, for robust/PI/PP mutexes call
1708         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1709         of ifs according to their probability.
1710         (__pthread_mutex_unlock_full): New function.
1711         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1712         (__pthread_mutex_lock_full): Define.
1713
1714 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1715
1716         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1717         implementation.  Add necessary padding and.
1718         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1719         words.
1720
1721 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1722
1723         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1724         and FUTEX_WAKE_BITSET.
1725
1726 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1727
1728         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1729         and FUTEX_WAKE_BITSET.
1730         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1731         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1732         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1733         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1734
1735 2008-11-25  Roland McGrath  <roland@redhat.com>
1736
1737         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1738         Subdirectories moved to ports repository as
1739         sysdeps/.../nptl subdirectories.
1740
1741 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1742
1743         [BZ #7008]
1744         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1745         of old value.
1746         * pthread_cond_init.c (__pthread_cond_init): Fix
1747         cond->__data.__nwaiters initialization.
1748         * Makefile (tests): Add tst-cond23.
1749         * tst-cond23.c: New test.
1750
1751 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1752
1753         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1754         arguments.
1755         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1756         arguments.
1757
1758 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1759
1760         [BZ #6955]
1761         * pthread_mutex_lock.c: Add support for private PI mutexes.
1762         * pthread_mutex_timedlock.c: Likewise.
1763         * pthread_mutex_trylock.c: Likewise.
1764         * pthread_mutex_unlock.c: Likewise.
1765         Patch mostly by Ben Jackson <ben@ben.com>.
1766
1767 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1768
1769         [BZ #6843]
1770         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1771         Increase stack size for helper thread.
1772
1773 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1774
1775         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1776         assembly with a clobber list for access registers a0 and a1.
1777
1778 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1779
1780         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1781         to force runp->refcntr to be read from memory.
1782
1783 2008-09-08  Richard Guenther  <rguenther@suse.de>
1784
1785         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1786         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1787         lll_timedlock, lll_robust_timedlock, lll_unlock,
1788         lll_robust_unlock): Promote private to int.
1789
1790 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1791
1792         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1793         ARCH_RETRY_MMAP definitions.
1794         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1795         Define MAP_STACK when not defined.
1796         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1797         handling of ARCH_RETRY_MMAP.
1798
1799 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1800
1801         * tst-align2.c (f): Print message that f is reached.
1802
1803 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1804
1805         [BZ #6740]
1806         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1807         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1808
1809 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1810
1811         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1812         SOCK_CLOEXEC if possible.
1813
1814 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1815
1816         * Makefile (tests): Add tst-rwlock2a.
1817         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1818         * tst-rwlock2a.c: New file.
1819
1820 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1821
1822         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1823
1824 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1825
1826         * sysdeps/pthread/pthread.h: Fix typo in comment.
1827
1828 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1829
1830         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1831         of CPU set to the kernel.
1832
1833 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1834
1835         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1836         cfi directives.
1837         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1839         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1840         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1841         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1842         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1843
1844 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1845
1846         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1847         cfi directives.
1848         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1849         Likewise.
1850         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1851         Likewise.
1852         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1853         Likewise.
1854
1855 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1856
1857         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1858
1859 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1860
1861         David S. Miller  <davem@davemloft.net>
1862
1863         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1864
1865 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1866
1867         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1868         __pshared correctly.
1869         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1870         Likewise.
1871         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1872         Likewise.
1873         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1874         Likewise.
1875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1876         Likewise.
1877         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1878
1879 2008-04-14  David S. Miller  <davem@davemloft.net>
1880
1881         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1882         (__old_sem_wait): Fix argument to lll_futex_wait().
1883
1884 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1885
1886         * pthread_create.c: Require pthread_mutex_trylock and
1887         pthread_key_delete for libgcc.
1888
1889 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1890
1891         [BZ #6020]
1892         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1893         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1894         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1895
1896 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1897
1898         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1899         <linux/limits.h> has defined it.
1900         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1901         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1902         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1903         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1904
1905 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1906
1907         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1908         of ASSEMBLER.
1909         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1910         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1911
1912 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1913
1914         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1915         HAVE_DL_DISCOVER_OSVERSION.
1916         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1917         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1918
1919 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1920
1921         [BZ #5778]
1922         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1923         _POSIX_CHOWN_RESTRICTED value to zero.
1924
1925 2008-01-31  Roland McGrath  <roland@redhat.com>
1926
1927         * Makefile (omit-deps): Variable removed.
1928
1929 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1930
1931         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1932         unnecessary addr32 prefix.
1933
1934 2008-01-29  Roland McGrath  <roland@redhat.com>
1935
1936         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1937
1938 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1939
1940         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1941
1942 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1943
1944         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1945         a scratch register.
1946         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1947         (__lll_lock_wait_private): Fix typo.
1948         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1949         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1950         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1951         Adjust XADD use.
1952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1953         (pthread_rwlock_timedrdlock): Return correct return value.
1954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1955         (pthread_rwlock_timedwrlock): Likewise.
1956
1957 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1958
1959         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1960         thread returns the program exits with an error code.
1961
1962 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1963
1964         * pthread-errnos.sym: Add EOVERFLOW.
1965         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1966         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1967         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1968         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1969
1970 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1971
1972         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1973         parameter.  Passed it as permission to mmap.
1974         * allocatestack.c (allocate_stack): Pass prot as second parameter
1975         to ARCH_RETRY_MMAP.
1976
1977 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1978
1979         * tst-basic7.c: Allocate memory for the stack.
1980
1981         [BZ #5465]
1982         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1983         (__pthread_cond_timedwait): Don't use VDSO.
1984         Patch by Michal Januszewski.
1985
1986 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1987
1988         [BZ #5455]
1989         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1990         Allow label before pthread_cleanup_pop.
1991         (pthread_cleanup_pop_restore_np): Likewise.
1992
1993 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1994
1995         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1996         Store 2 before returning ETIMEDOUT.
1997
1998 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1999
2000         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2001         Store 2 before returning ETIMEDOUT.
2002         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2003         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2004         (__lll_lock_wait_private): Optimize.
2005         (__lll_lock_wait): Likewise.
2006
2007 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2008
2009         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2010         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2011         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2012
2013 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2014
2015         [BZ #5240]
2016         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2017         If we time out, try one last time to lock the futex to avoid
2018         losing a wakeup signal.
2019         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2021
2022         [BZ #5245]
2023         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2024         if necessary.
2025
2026 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2027
2028         [BZ #5245]
2029         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2030         mmap failed to EAGAIN.
2031         * Makefile (tests): Add tst-basic7.
2032         * tst-basic7.c: New file.
2033
2034 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2035
2036         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2037         Use __linkin_atfork.
2038
2039 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2040
2041         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2042         missing line continuations.
2043         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2044         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2045
2046 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2047
2048         [BZ #5220]
2049         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2050         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2051         (struct timer): Add next element.
2052         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2053         enqueue timer structure into __active_timer_sigev_thread list.
2054         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2055         remove timer struct from __active_timer_sigev_thread.
2056         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2057         Before using timer structure make sure it is still on the
2058         __active_timer_sigev_thread list.  Keep lock until done.
2059         Define __active_timer_sigev_thread and
2060         __active_timer_sigev_thread_lock.
2061
2062 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2063
2064         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2065         Redefine thread_atfork for use of ATFORK_MEM.
2066         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2067         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2068         function.
2069         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2070         Use atomic operation when removing first element of list.
2071
2072 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2073
2074         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2075         routine instead of an alias to __new_sem_post.
2076
2077 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2078
2079         * init.c (__pthread_initialize_minimal): Initialize word to appease
2080         valgrind.
2081
2082 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2083
2084         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2085         libc.so just clear NAME.
2086         (__libc_rwlock_fini): Nop inside of libc.so.
2087         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2088         all zeros.
2089
2090 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2091
2092         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2093         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2094         unlocking failed.
2095         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2096
2097 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2098
2099         [BZ #4938]
2100         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2101         reclaimed stack if necessary.
2102         * Makefile (tests): Add tst-tsd6.
2103         * tst-tsd6.c: New file.
2104
2105 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2106
2107         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2108         Add private argument.
2109
2110 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2111
2112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2113         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2114
2115 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2116
2117         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2118         (__lll_robust_timedlock): Pass private as last argument to
2119         __lll_robust_timedlock_wait.
2120         (__lll_unlock): Fix a pasto.
2121
2122 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2123
2124         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2125         sparc_old_sem): New structs.
2126         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2127         (__sem_wait_cleanup): New function.
2128         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2129         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2130         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2131         lll_futex_wait.
2132         (__old_sem_wait): New function.
2133         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2134         nptl/sysdeps/unix/sysv/linux/sparc version.
2135         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2136         Likewise.
2137         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2138         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2139         (__new_sem_trywait): Use sparc_old_sem structure.
2140         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2141         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2142         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2143         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2144         lll_futex_timed_wait.
2145         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2146         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2147         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2148         lll_futex_wake.
2149         (__old_sem_post): New function.
2150         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2151         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2152         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2153         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2154         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2155         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2156
2157 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2158
2159         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2160         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2161         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2162         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2163         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2164         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2165         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2166         Use FUTEX_WAKE_OP.
2167         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2168         kernel-features.h and tcb-offsets.h.
2169         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2170         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2171         process private.
2172         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2173         tcb-offsets.h.
2174         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2175         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2176         process private.
2177         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2178         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2179         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2180         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2184
2185 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2186
2187         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2188         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2189         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2190         lll_futex_timed_wait.
2191
2192         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2193         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2194         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2195         __lll_robust_unlock, __lll_wait_tid): Likewise.
2196
2197 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2198
2199         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2200         Fix a pasto.
2201         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2202         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2203         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2204         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2206         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2207         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2209         kernel-features.h.
2210         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2211         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2212         process private.  Switch DW_CFA_advance_loc1 and some
2213         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2215         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2216         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2217         process private.  Switch DW_CFA_advance_loc{1,2} and some
2218         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2219         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2220         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2221         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2222         Likewise.
2223         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2224         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2226         Likewise.
2227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2228         (__pthread_cond_broadcast): Compare %r8 instead of
2229         dep_mutex-cond_*(%rdi) with $-1.
2230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2231         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2232         of oring.
2233
2234 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2235
2236         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2237
2238 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2239
2240         * allocatestack.c: Include kernel-features.h.
2241         * pthread_create.c: Likewise.
2242         * pthread_mutex_init.c: Likewise.
2243         * init.c: Likewise.
2244         * pthread_cond_timedwait.c: Likewise.
2245         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2246         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2247         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2249         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2251         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2252         Likewise.
2253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2254         Likewise.
2255         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2256         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2257         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2258         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2259
2260 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2261
2262         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2263         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2264         byte elements.  One of them is the new __shared element.
2265         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2266         adjust names of other padding elements.
2267         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2268         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2269         byte elements.  One of them is the new __shared element.
2270         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2271         adjust names of other padding elements.
2272         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2273         Renamed __pad1 element to __shared, adjust names of other padding
2274         elements.
2275         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2276         (pthread_rwlock_t): Likewise.
2277         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2278         typo.
2279
2280 2007-08-09  Anton Blanchard  <anton@samba.org>
2281
2282         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2283
2284 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2285
2286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2287         <kernel-features.h>.
2288         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2289
2290 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2291
2292         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2293         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2294         dealing with robust mutexes.
2295         * pthread_mutex_timedlock.c: Likewise.
2296         * pthread_mutex_trylock.c: Likewise.
2297         * pthread_mutex_unlock.c: Likewise.
2298         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2299
2300 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2301
2302         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2303         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2304         (PTHREAD_MUTEX_PSHARED): Define.
2305         * pthread_mutex_init.c (__pthread_mutex_init): Set
2306         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2307         mutexes.
2308         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2309         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2310         as second argument to lll_lock.
2311         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2312         instead of its __data.__lock field.
2313         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2314         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2315         to lll_robust_lock.
2316         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2317         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2318         instead of mutex->__data.__kind directly, pass
2319         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2320         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2321         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2322         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2323         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2324         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2325         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2326         of mutex->__data.__kind directly.
2327         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2328         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2329         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2330         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2331         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2332         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2333         and lll_futex_wake.
2334         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2335         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2336         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2337         directly.
2338         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2339         Take mutex as argument instead of its __data.__lock field, pass
2340         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2341         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2342         __data.__lock field.
2343         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2344         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2345         to lll_robust_cond_lock.
2346         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2347         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2348         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2349         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2350         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2351         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2352         lll_futex_wait.
2353         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2354         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2355         lll_futex_wake.
2356         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2357         pshared variable, pass it to lll_lock, lll_unlock,
2358         lll_futex_timedwait and lll_futex_wake.
2359         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2360         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2361         and lll_futex_wake.
2362         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2363         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2364         macro.
2365         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2366         lll_futex_wake_unlock): Likewise.
2367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2368         Likewise.
2369         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2370         lll_futex_wake_unlock): Likewise.
2371         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2372         Likewise.
2373         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2374         lll_futex_wake_unlock): Likewise.
2375         (lll_futex_wake): Fix a typo.
2376         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2378         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2379         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2380         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2382         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2383         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2385         (__pthread_cond_timedwait): Likewise.
2386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2387         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2388
2389 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2390
2391         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2392         Don't use CGOTSETUP and CGOTRESTORE macros.
2393         (CGOTSETUP, CGOTRESTORE): Remove.
2394         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2395         @local symbol.
2396
2397 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2398
2399         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2400         definitions for private futexes.
2401         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2402         kernel-features.h and lowlevellock.h.  Use private futexes if
2403         they are available.
2404         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2405         (__lll_mutex_lock_wait): Rename to
2406         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2407         (__lll_mutex_timedlock_wait): Rename to ...
2408         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2409         Don't compile in for libc.so.
2410         (__lll_mutex_unlock_wake): Rename to ...
2411         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2412         (__lll_timedwait_tid): Use __NR_gettimeofday.
2413         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2414         the header from assembler.  Renamed all lll_mutex_* resp.
2415         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2416         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2417         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2418         Define.
2419         (__lll_lock_wait_private): Add prototype.
2420         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2421         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2422         __lll_unlock_wake): Likewise.
2423         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2424         if private is constant LLL_PRIVATE.
2425         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2426         lll_timedlock, lll_robust_timedlock): Add private argument.
2427         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2428         if private is constant LLL_PRIVATE.
2429         (lll_robust_unlock, lll_robust_dead): Add private argument.
2430         (lll_lock_t): Remove.
2431         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2432         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2433         lll_cond_wake, lll_cond_broadcast): Remove.
2434         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2435         kernel-features.h and lowlevellock.h.
2436         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2437         (LOAD_FUTEX_WAIT): Define.
2438         (__lll_robust_mutex_lock_wait): Rename to ...
2439         (__lll_robust_lock_wait): ... this.  Add private argument.
2440         Use LOAD_FUTEX_WAIT macro.
2441         (__lll_robust_mutex_timedlock_wait): Rename to ...
2442         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2443         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2444         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2445         lowlevellock.h.
2446         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2447         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2448         __lll_mutex_{lock,unlock}_*.
2449         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2450         lowlevellock.h and pthread-errnos.h.
2451         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2452         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2453         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2454         __lll_mutex_{lock,unlock}_*.
2455         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2456         lowlevellock.h and pthread-errnos.h.
2457         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2458         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2459         __lll_mutex_{lock,unlock}_*.
2460         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2461         lowlevellock.h.
2462         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2463         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2464         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2465         (__condvar_tw_cleanup): Likewise.
2466         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2467         lowlevellock.h.
2468         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2469         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2470         __lll_mutex_{lock,unlock}_*.
2471         ( __condvar_w_cleanup): Likewise.
2472         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2473         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2474         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2475         lowlevellock.h.
2476         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2477         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2478         __lll_mutex_{lock,unlock}_*.
2479         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2480         lowlevellock.h.
2481         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2482         FUTEX_PRIVATE_FLAG): Remove.
2483         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2484         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2485         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2486         lowlevellock.h.
2487         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2488         FUTEX_PRIVATE_FLAG): Remove.
2489         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2490         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2491         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2492         lowlevellock.h.
2493         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2494         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2495         __lll_mutex_{lock,unlock}_*.
2496         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2497         lowlevellock.h.
2498         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2499         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2500         __lll_mutex_{lock,unlock}_*.
2501         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2502         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2503         (__new_sem_post): Use standard initial exec code sequences.
2504         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2505         lowlevellock.h.
2506         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2507         FUTEX_PRIVATE_FLAG): Remove.
2508         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2509         exec code sequences.
2510         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2511         (__new_sem_trywait): Use standard initial exec code sequences.
2512         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2513         (__new_sem_wait): Use standard initial exec code sequences.
2514
2515 2007-07-31  Anton Blanchard  <anton@samba.org>
2516
2517         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2518         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2519         atomic_full_barrier.
2520
2521 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2522
2523         * allocatestack.c (stack_cache_lock): Change type to int.
2524         (get_cached_stack, allocate_stack, __deallocate_stack,
2525         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2526         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2527         as second argument to lll_lock and lll_unlock macros on
2528         stack_cache_lock.
2529         * pthread_create.c (__find_in_stack_list): Likewise.
2530         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2531         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2532         as second argument.
2533         * descr.h (struct pthread): Change lock and setxid_futex field
2534         type to int.
2535         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2536         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2537         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2538         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2539         Likewise.
2540         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2541         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2542         * pthreadP.h (__attr_list_lock): Change type to int.
2543         * pthread_attr_init.c (__attr_list_lock): Likewise.
2544         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2545         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2546         lll_{,un}lock.
2547         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2548         also for lll_futex_{wake,wait}.
2549         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2550         a pointer to const.
2551         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2552         LLL_SHARED as second argument to lll_{,un}lock.
2553         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2554         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2555         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2556         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2557         Likewise.
2558         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2559         as second argument to lll_{,un}lock macros on pd->lock.
2560         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2561         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2562         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2563         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2564         Likewise.
2565         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2566         Likewise.
2567         * pthread_once.c (once_lock): Change type to int.
2568         (__pthread_once): Pass LLL_PRIVATE as second argument to
2569         lll_{,un}lock macros on once_lock.
2570         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2571         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2572         rwlock->__data.__shared as second argument to them and similarly
2573         for lll_futex_w*.
2574         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2575         Likewise.
2576         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2577         Likewise.
2578         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2579         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2580         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2581         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2582         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2583         to lll_{,un}lock macros on __sem_mappings_lock.
2584         * sem_open.c (check_add_mapping): Likewise.
2585         (__sem_mappings_lock): Change type to int.
2586         * semaphoreP.h (__sem_mappings_lock): Likewise.
2587         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2588         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2589         instead of lll_*mutex_*, pass LLL_SHARED as last
2590         argument.
2591         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2592         pass LLL_SHARED as last argument.
2593         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2594         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2595         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2596         pass LLL_SHARED as last argument.
2597         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2598         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2599         LLL_SHARED as last argument.
2600         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2601         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2602         Similarly.
2603         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2604         __libc_lock_lock_recursive, __libc_lock_unlock,
2605         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2606         argument to lll_{,un}lock.
2607         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2608         _IO_lock_unlock): Likewise.
2609         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2610         compound literal.
2611         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2612         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2613         __fork_lock.
2614         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2615         free_mem): Likewise.
2616         (__fork_lock): Change type to int.
2617         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2618         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2619         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2620         lll_futex_wake.
2621         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2622         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2623         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2624         New function.
2625         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2626         pass it through to lll_futex_*wait, only compile in when
2627         IS_IN_libpthread.
2628         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2629         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2630         argument and pass it through to lll_futex_*wait.
2631         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2632         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2633         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2634         inline functions to __lll_* resp. __lll_robust_*.
2635         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2636         (lll_mutex_dead): Add private argument.
2637         (__lll_lock_wait_private): New prototype.
2638         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2639         __lll_robust_lock_timedwait): Add private argument to prototypes.
2640         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2641         call __lll_lock_wait_private, otherwise pass private to
2642         __lll_lock_wait.
2643         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2644         __lll_robust_timedlock): Add private argument, pass it to
2645         __lll_*wait functions.
2646         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2647         call __lll_unlock_wake_private, otherwise pass private to
2648         __lll_unlock_wake.
2649         (__lll_robust_unlock): Add private argument, pass it to
2650         __lll_robust_unlock_wake.
2651         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2652         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2653         argument, pass it through to __lll_* inline function.
2654         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2655         (lll_lock_t): Remove.
2656         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2657         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2658         lll_cond_wake, lll_cond_broadcast): Remove.
2659         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2660         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2661         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2662         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2663         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2664         the header from assembler.  Renamed all lll_mutex_* resp.
2665         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2666         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2667         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2668         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2669         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2670         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2671         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2672         Remove prototype.
2673         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2674         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2675         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2676         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2677         MULTIPLE_THREADS_OFFSET as another asm operand.
2678         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2679         MULTIPLE_THREADS_OFFSET as last asm operand, call
2680         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2681         otherwise pass private as another argument to __lll_lock_wait.
2682         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2683         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2684         private as another argument to __lll_*lock_wait call.
2685         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2686         MULTIPLE_THREADS_OFFSET as another asm operand, call
2687         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2688         otherwise pass private as another argument to __lll_unlock_wake.
2689         (lll_robust_unlock): Add private argument, pass private as another
2690         argument to __lll_unlock_wake.
2691         (lll_robust_dead): Add private argument, use __lll_private_flag
2692         macro.
2693         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2694         LLL_MUTEX_LOCK_INITIALIZER.
2695         (lll_lock_t): Remove.
2696         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2697         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2698         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2699         lll_cond_wake, lll_cond_broadcast): Remove.
2700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2701         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2702         2007-05-2{3,9} changes.
2703         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2704         kernel-features.h and lowlevellock.h.
2705         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2706         (LOAD_FUTEX_WAIT): Rewritten.
2707         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2708         define.
2709         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2710         (__lll_mutex_lock_wait): Rename to ...
2711         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2712         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2713         (__lll_mutex_timedlock_wait): Rename to ...
2714         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2715         contains private argument.  Don't compile in for libc.so.
2716         (__lll_mutex_unlock_wake): Rename to ...
2717         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2718         Don't compile in for libc.so.
2719         (__lll_timedwait_tid): Use __NR_gettimeofday.
2720         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2721         kernel-features.h and lowlevellock.h.
2722         (LOAD_FUTEX_WAIT): Define.
2723         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2724         define.
2725         (__lll_robust_mutex_lock_wait): Rename to ...
2726         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2727         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2728         macro.
2729         (__lll_robust_mutex_timedlock_wait): Rename to ...
2730         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2731         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2732         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2733         lowlevellock.h.
2734         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2735         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2736         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2737         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2738         to __lll_lock_wait in %edx.
2739         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2740         Include lowlevellock.h and pthread-errnos.h.
2741         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2742         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2743         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2744         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2745         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2746         __lll_unlock_wake.
2747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2748         Include lowlevellock.h and pthread-errnos.h.
2749         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2750         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2751         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2752         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2753         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2754         __lll_unlock_wake.
2755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2756         Include lowlevellock.h.
2757         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2758         Don't define.
2759         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2760         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2761         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2762         __lll_unlock_wake.  Use __NR_gettimeofday.
2763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2764         Include lowlevellock.h.
2765         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2766         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2767         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2768         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2769         and __lll_unlock_wake.
2770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2771         Include lowlevellock.h.
2772         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2773         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2774         MUTEX(%ebx) address in %edx rather than %ecx to
2775         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2776         and __lll_unlock_wake.  Move return value from %ecx to %edx
2777         register.
2778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2779         Include lowlevellock.h.
2780         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2781         Don't define.
2782         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2783         MUTEX(%ebp) address in %edx rather than %ecx to
2784         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2785         and __lll_unlock_wake.  Move return value from %ecx to %edx
2786         register.  Use __NR_gettimeofday.
2787         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2788         Include lowlevellock.h.
2789         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2790         Don't define.
2791         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2792         MUTEX(%ebp) address in %edx rather than %ecx to
2793         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2794         and __lll_unlock_wake.  Move return value from %ecx to %edx
2795         register.  Use __NR_gettimeofday.
2796         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2797         Include lowlevellock.h.
2798         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2799         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2800         MUTEX(%edi) address in %edx rather than %ecx to
2801         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2802         and __lll_unlock_wake.
2803         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2804         Include lowlevellock.h.
2805         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2806         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2807         MUTEX(%ebx) address in %edx rather than %ecx to
2808         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2809         and __lll_unlock_wake.  Move return value from %ecx to %edx
2810         register.
2811         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2812         lowlevellock.h.
2813         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2814         define.
2815         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2816         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2817         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2818         lowlevellock.h.
2819         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2820         (sem_timedwait): Use __NR_gettimeofday.
2821         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2822         lowlevellock.h.
2823         (LOCK): Don't define.
2824         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2825         lowlevellock.h.
2826         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2827         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2828         are waiters.
2829         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2830         2007-05-2{3,9} changes.
2831         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2832         kernel-features.h and lowlevellock.h.
2833         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2834         (LOAD_FUTEX_WAIT): Rewritten.
2835         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2836         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2837         (__lll_mutex_lock_wait): Rename to ...
2838         (__lll_lock_wait): ... this.  %esi is now private argument.
2839         Don't compile in for libc.so.
2840         (__lll_mutex_timedlock_wait): Rename to ...
2841         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2842         Don't compile in for libc.so.
2843         (__lll_mutex_unlock_wake): Rename to ...
2844         (__lll_unlock_wake): ... this.  %esi contains private argument.
2845         Don't compile in for libc.so.
2846         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2847         kernel-features.h and lowlevellock.h.
2848         (LOAD_FUTEX_WAIT): Define.
2849         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2850         (__lll_robust_mutex_lock_wait): Rename to ...
2851         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2852         Use LOAD_FUTEX_WAIT macro.
2853         (__lll_robust_mutex_timedlock_wait): Rename to ...
2854         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2855         private, use LOAD_FUTEX_WAIT macro.
2856         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2857         lowlevellock.h.
2858         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2859         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2860         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2861         __lll_lock_wait and __lll_unlock_wake.
2862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2863         Include lowlevellock.h and pthread-errnos.h.
2864         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2865         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2866         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2867         pass LLL_SHARED in %esi to both __lll_lock_wait and
2868         __lll_unlock_wake.
2869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2870         Include lowlevellock.h and pthread-errnos.h.
2871         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2872         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2873         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2874         pass LLL_SHARED in %esi to both __lll_lock_wait and
2875         __lll_unlock_wake.
2876         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2877         Include lowlevellock.h.
2878         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2879         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2880         pass LLL_SHARED in %esi to both __lll_lock_wait and
2881         __lll_unlock_wake.
2882         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2883         Include lowlevellock.h.
2884         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2885         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2886         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2887         and __lll_unlock_wake.
2888         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2889         Include lowlevellock.h.
2890         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2891         Don't define.
2892         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2893         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2894         and __lll_unlock_wake.
2895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2896         Include lowlevellock.h.
2897         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2898         Don't define.
2899         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2900         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2901         and __lll_unlock_wake.
2902         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2903         Include lowlevellock.h.
2904         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2905         Don't define.
2906         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2907         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2908         and __lll_unlock_wake.
2909         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2910         Include lowlevellock.h.
2911         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2912         Don't define.
2913         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2914         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2915         and __lll_unlock_wake.
2916         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2917         Include lowlevellock.h.
2918         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2919         Don't define.
2920         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2921         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2922         and __lll_unlock_wake.
2923         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2924         lowlevellock.h.
2925         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2926         define.
2927         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2928         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2929         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2930         lowlevellock.h.
2931         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2932         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2933         lowlevellock.h.
2934         (LOCK): Don't define.
2935         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2936         lowlevellock.h.
2937         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2938         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2939         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2940         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2941         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2942         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2943         (__lll_lock_wait_private): New function.
2944         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2945         it to lll_futex_*wait.  Don't compile in for libc.so.
2946         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2947         Remove.
2948         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2949         (struct sparc_pthread_barrier): Remove.
2950         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2951         struct sparc_pthread_barrier.  Pass
2952         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2953         and lll_futex_wait macros.
2954         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2955         Remove.
2956         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2957         Include sparc pthread_barrier_wait.c instead of generic one.
2958
2959 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2960
2961         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2962
2963         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2964         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2965         %ecx.
2966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2967         (pthread_rwlock_timedwrlock): Likewise.
2968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2969         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2970
2971 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2972
2973         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2974
2975 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2976
2977         * tst-locale2.c (useless): Add return statement.
2978
2979 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2980
2981         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2982         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2983         * pthread_create.c (start_thread): Likewise.
2984         * init.c (sighandler_setxid): Likewise.
2985         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2986         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2987         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2988         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2989         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2990         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2991         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2992         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2993         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2994         Likewise.
2995         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2996         Likewise.
2997         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2998         Likewise.
2999         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3000         __rtld_notify): Likewise.
3001         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3002         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3003         __pthread_once): Likewise.
3004         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3005         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3006         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3007         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3008         (lll_futex_wait): Add private argument, define as wrapper around
3009         lll_futex_timed_wait.
3010         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3011         use __lll_private_flag macro.
3012         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3013         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3014         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3015         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3016         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3017         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3018         (lll_futex_wait): Add private argument, define as wrapper around
3019         lll_futex_timed_wait.
3020         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3021         use __lll_private_flag macro.
3022         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3023         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3024         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3025         Define.
3026         (lll_futex_timed_wait, lll_futex_wake): Use it.
3027         (lll_private_futex_wait, lll_private_futex_timed_wait,
3028         lll_private_futex_wake): Removed.
3029         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3030         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3031         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3032         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3033         (lll_futex_wait): Add private argument, define as wrapper around
3034         lll_futex_timed_wait.
3035         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3036         use __lll_private_flag macro.
3037         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3038         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3039         to lll_futex_*.
3040         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3041         (lll_private_futex_wait, lll_private_futex_timed_wait,
3042         lll_private_futex_wake): Removed.
3043         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3044         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3045         (lll_private_futex_wait, lll_private_futex_timed_wait,
3046         lll_private_futex_wake): Removed.
3047         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3048         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3049         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3050         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3051         (lll_futex_wait): Add private argument, define as wrapper around
3052         lll_futex_timed_wait.
3053         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3054         use __lll_private_flag macro.
3055         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3056         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3057         to lll_futex_*.
3058         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3059         Define.
3060         (lll_futex_timed_wait, lll_futex_wake): Use it.
3061         (lll_private_futex_wait, lll_private_futex_timed_wait,
3062         lll_private_futex_wake): Removed.
3063
3064 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3065
3066         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3067         of the structure for sparc32.
3068
3069 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3070
3071         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3072
3073 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3074
3075         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3076         code used when private futexes are assumed.
3077         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3078         Likewise.
3079
3080 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3081
3082         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3083         (__lll_private_flag): Define.
3084         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3085         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3086         __lll_private_flag.
3087         (lll_private_futex_wait, lll_private_futex_timedwait,
3088         lll_private_futex_wake): Define as wrapper around non-_private
3089         macros.
3090         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3091         (__lll_private_flag): Define.
3092         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3093         (lll_private_futex_wait, lll_private_futex_timedwait,
3094         lll_private_futex_wake): Define as wrapper around non-_private
3095         macros.
3096
3097 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3098
3099         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3100         parameter to lll_futex_wait call.
3101         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3102
3103         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3104         Replace lll_futex_wait with lll_private_futex_wait.
3105         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3106         Add LLL_SHARED parameter to lll_futex_wake().
3107
3108         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3109         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3110         lll_private_futex_wake.
3111         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3112         bit from private parm before syscall.
3113         (lll_futex_timed_wait): Likewise.
3114         (lll_futex_wake): Likewise.
3115         (lll_futex_wake_unlock): Likewise.
3116         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3117         (lll_robust_mutex_unlock): Likewise.
3118         (lll_mutex_unlock_force): Likewise.
3119         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3120
3121 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3122
3123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3124         compilation when unconditionally using private futexes.
3125         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3127         Likewise.
3128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3130
3131 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3132
3133         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3134         Define.
3135
3136 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3137
3138         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3139         kernel-features.h.
3140
3141 2007-05-16  Roland McGrath  <roland@redhat.com>
3142
3143         * init.c (__nptl_initial_report_events): New variable.
3144         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3145         to that.
3146
3147 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3148
3149         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3150         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3151
3152 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3153
3154         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3155         implementation.
3156
3157 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3158
3159         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3160         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3161         * pthread_mutex_timedlock.c: Likewise.
3162         * pthread_mutex_trylock.c: Likewise.
3163         * pthread_mutex_unlock.c: Likewise.
3164
3165 2007-06-17  Andreas Schwab  <schwab@suse.de>
3166
3167         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3168         sections.
3169
3170 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3171
3172         * allocatestack.c (allocate_stack): Make code compile if
3173         __ASSUME_PRIVATE_FUTEX is set.
3174
3175 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3176
3177         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3178         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3179         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3180         (__pthread_rwlock_wrlock): Likewise.
3181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3182         (pthread_rwlock_timedrdlock): Likewise.
3183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3184         (pthread_rwlock_timedwrlock): Likewise.
3185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3186         (__pthread_rwlock_unlock): Likewise.
3187
3188 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3189
3190         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3191         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3192         Split __flags into __flags, __shared, __pad1 and __pad2.
3193         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3194         futexes if they are available.
3195         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3196         in libc-lowlevellock.S allow using private futexes.
3197         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3198         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3199         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3200         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3201         lll_private_futex_timed_wait and lll_private_futex_wake.
3202         (lll_robust_mutex_unlock): Fix typo.
3203         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3204         field in futex command setup.
3205         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3206         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3207         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3208         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3209         if they are available.  Remove clear_once_control.
3210         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3211         futexes if they are available.
3212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3213         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3215         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3216         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3217         Wake only when there are waiters.
3218         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3219         support.  Indicate that there are waiters.  Remove unnecessary
3220         extra cancellation test.
3221         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3222         left-over duplication of __sem_wait_cleanup.
3223
3224 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3225
3226         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3227         parameter to lll_futex_wait, lll_futex_timed_wait, and
3228         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3229         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3230         lll_private_futex_wake.
3231         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3232         * allocatestack.c: Adjust use of lll_futex_* macros.
3233         * init.c: Likewise.
3234         * lowlevellock.h: Likewise.
3235         * pthread_barrier_wait.c: Likewise.
3236         * pthread_cond_broadcast.c: Likewise.
3237         * pthread_cond_destroy.c: Likewise.
3238         * pthread_cond_signal.c: Likewise.
3239         * pthread_cond_timedwait.c: Likewise.
3240         * pthread_cond_wait.c: Likewise.
3241         * pthread_create.c: Likewise.
3242         * pthread_mutex_lock.c: Likewise.
3243         * pthread_mutex_setprioceiling.c: Likewise.
3244         * pthread_mutex_timedlock.c: Likewise.
3245         * pthread_mutex_unlock.c: Likewise.
3246         * pthread_rwlock_timedrdlock.c: Likewise.
3247         * pthread_rwlock_timedwrlock.c: Likewise.
3248         * pthread_rwlock_unlock.c: Likewise.
3249         * sysdeps/alpha/tls.h: Likewise.
3250         * sysdeps/i386/tls.h: Likewise.
3251         * sysdeps/ia64/tls.h: Likewise.
3252         * sysdeps/powerpc/tls.h: Likewise.
3253         * sysdeps/pthread/aio_misc.h: Likewise.
3254         * sysdeps/pthread/gai_misc.h: Likewise.
3255         * sysdeps/s390/tls.h: Likewise.
3256         * sysdeps/sh/tls.h: Likewise.
3257         * sysdeps/sparc/tls.h: Likewise.
3258         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3259         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3260         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3261         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3262         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3263         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3264         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3265         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3266         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3267         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3268         Likewise.
3269         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3270         * sysdeps/x86_64/tls.h: Likewise.
3271
3272 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3273
3274         * pthread_getattr_np.c: No need to install a cancellation handler,
3275         this is no cancellation point.
3276         * pthread_getschedparam.c: Likewise.
3277         * pthread_setschedparam.c: Likewise.
3278         * pthread_setschedprio.c: Likewise.
3279         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3280         lll_unlock_wake_cb.
3281         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3282         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3283         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3284         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3285         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3286         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3287         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3288         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3289         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3290         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3291         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3293
3294         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3295         whether there are more than one thread makes no sense here since
3296         we only call the slow path if the locks are taken.
3297         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3298
3299         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3300         COND_NWAITERS_SHIFT.
3301         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3302         COND_CLOCK_BITS.
3303         * pthread_cond_init.c: Likewise.
3304         * pthread_cond_timedwait.c: Likewise.
3305         * pthread_cond_wait.c: Likewise.
3306         * pthread_condattr_getclock.c: Likewise.
3307         * pthread_condattr_setclock.c: Likewise.
3308         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3309         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3312         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3313
3314 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3315
3316         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3317         unistd.h.
3318
3319         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3320         insn suffix.
3321         (THREAD_GSCOPE_GET_FLAG): Remove.
3322         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3323         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3324         changes.
3325         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3326         (THREAD_GSCOPE_GET_FLAG): Remove.
3327         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3328         instead of THREAD_GSCOPE_GET_FLAG.
3329         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3330         it.
3331         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3332         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3333         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3334         THREAD_GSCOPE_WAIT): Define.
3335         * sysdeps/sparc/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/sh/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/ia64/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
3348 2007-05-24  Richard Henderson  <rth@redhat.com>
3349
3350         * descr.h (struct pthread): Add header.gscope_flag.
3351         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3352         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3353         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3354         THREAD_GSCOPE_WAIT): Define.
3355
3356 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3357
3358         * init.c: Make it compile with older kernel headers.
3359
3360         * tst-initializers1.c: Show through exit code which test failed.
3361
3362         * pthread_rwlock_init.c: Also initialize __shared field.
3363         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3364         element in rwlock structure into four byte elements.  One of them is
3365         the new __shared element.
3366         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3367         Likewise.
3368         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3369         __shared, adjust names of other padding elements.
3370         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3371         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3372         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3373         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3374         FUTEX_PRIVATE_FLAG.
3375         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3376         futex to use private operations if possible.
3377         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3378         Likewise.
3379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3380         Likewise.
3381         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3383         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3384         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3385         Likewise.
3386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3387         Likewise.
3388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3389         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3390
3391 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3392
3393         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3394         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3395         * pthread_rwlock_timedrdlock.c: Likewise.
3396         * pthread_rwlock_tryrdlock.c: Likewise.
3397
3398         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3399         optimization.
3400
3401         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3402         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3403         duplication of __sem_wait_cleanup.
3404
3405         * allocatestack.c: Revert last change.
3406         * init.c: Likewise.
3407         * sysdeps/i386/tls.h: Likewise.
3408         * sysdeps/x86_64/tls.h: Likewise.
3409         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3410         header structure.
3411         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3412
3413         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3414         Add private field.
3415         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3416         * pthread_barrier_init.c: Set private flag if pshared and private
3417         futexes are supported.
3418         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3419         private field in futex command setup.
3420         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3421
3422 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3423
3424         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3425         support.
3426         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3427         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3428         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3429         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3430         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3431
3432         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3433         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3434         fields in the structure.
3435         (__old_sem_init): New function.
3436         * sem_open.c: Initialize all fields of the structure.
3437         * sem_getvalue.c: Adjust for renamed element.
3438         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3439         (gen-as-const-headers): Add structsem.sym.
3440         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3441         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3442         struct new_sem.  Add struct old_sem.
3443         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3444         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3445         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3446         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3447         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3448         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3449         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3450         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3451         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3452         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3453         * tst-sem10.c: New file.
3454         * tst-sem11.c: New file.
3455         * tst-sem12.c: New file.
3456         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3457         of struct sem.
3458
3459 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3460             Jakub Jelinek  <jakub@redhat.com>
3461
3462         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3463         Move __pthread_enable_asynccancel right before futex syscall.
3464         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3465         Likewise.
3466
3467 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3468
3469         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3470         THREAD_COPY_PRIVATE_FUTEX): Define.
3471         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3472         THREAD_COPY_PRIVATE_FUTEX): Define.
3473         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3474         * init.c (__pthread_initialize_minimal_internal): Use
3475         THREAD_SET_PRIVATE_FUTEX.
3476
3477         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3478         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3479         THREAD_GSCOPE_FLAG_WAIT): Define.
3480         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3481         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3482         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3483         PTR_DEMANGLE.
3484         (THREAD_GSCOPE_GET_FLAG): Define.
3485         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3486         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3487         instead of ->header.gscope_flag directly.
3488
3489 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3490
3491         * init.c (__pthread_initialize_minimal_internal): Check whether
3492         private futexes are available.
3493         * allocatestack.c (allocate_stack): Copy private_futex field from
3494         current thread into the new stack.
3495         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3496         futexes if they are available.
3497         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3498         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3499         in libc-lowlevellock.S allow using private futexes.
3500         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3501         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3502         FUTEX_PRIVATE_FLAG.
3503         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3504         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3505         if they are available.
3506         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3507         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3508         * sysdeps/i386/tcb-offsets.sym: Likewise.
3509         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3510         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3511
3512 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3513
3514         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3515         Remove ptr_wait_lookup_done again.
3516         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3517         (__pthread_initialize_minimal_internal): Initialize
3518         _dl_wait_lookup_done pointer in _rtld_global directly.
3519         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3520         Remove code to code _dl_wait_lookup_done.
3521         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3522         encrypted for now.
3523
3524 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3525
3526         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3527         pthread_mutex_init failed with ENOTSUP.
3528
3529 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3530
3531         * allocatestack.c (__wait_lookup_done): New function.
3532         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3533         Add ptr_wait_lookup_done.
3534         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3535         * pthreadP.h: Declare __wait_lookup_done.
3536         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3537         Define macros to implement reference handling of global scope.
3538         * sysdeps/x86_64/tls.h: Likewise.
3539         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3540         Initialize GL(dl_wait_lookup_done).
3541
3542 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3543
3544         [BZ #4512]
3545         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3546         is detected.
3547         * pthread_mutex_timedlock.c: Likewise.
3548         * pthread_mutex_trylock.c: Likewise.
3549         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3550
3551         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3552         * tst-robust9.c: New file.
3553         * tst-robustpi9.c: New file.
3554
3555         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3556         unnecessary extra cancellation test.
3557
3558 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3559
3560         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3561         extra cancellation test.
3562         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3563
3564 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3565
3566         * descr.h (struct pthread): Rearrange members to fill hole in
3567         64-bit layout.
3568
3569         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3570         (__pthread_setaffinity_new): If syscall was successful and
3571         RESET_VGETCPU_CACHE is defined, use it before returning.
3572         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3573
3574 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3575
3576         [BZ #4455]
3577         * tst-align2.c: Include stackinfo.h.
3578         * tst-getpid1.c: Likewise.
3579
3580 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3581
3582         [BZ #4455]
3583         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3584         * tst-getpid1.c (do_test): Likewise.
3585
3586         [BZ #4456]
3587         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3588         (allocate_stack): Likewise.
3589
3590 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3591
3592         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3593         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3594         (__lll_robust_timedlock_wait): Likewise.
3595         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3596
3597 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3598
3599         [BZ #4465]
3600         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3601         * tst-cancel4.c (tf_fdatasync): New test.
3602
3603 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3604
3605         [BZ #4392]
3606         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3607         check mutexes like normal mutexes.
3608
3609         [BZ #4306]
3610         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3611         Initialize the whole sigevent structure to appease valgrind.
3612
3613 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3614
3615         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3616         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3617
3618 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3619
3620         * tst-locale1.c: Avoid warnings.
3621         * tst-locale2.c: Likewise.
3622
3623 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3624
3625         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3626         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3627
3628 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3629
3630         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3631         __extern_always_inline where appropriate.
3632         * sysdeps/pthread/pthread.h: Likewise.
3633
3634 2007-03-13  Richard Henderson  <rth@redhat.com>
3635
3636         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3637         separate cfi regions for the two subsections.
3638
3639 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3640
3641         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3642         new thread, don't just decrement it.
3643         Patch by Suzuki K P <suzuki@in.ibm.com>.
3644
3645 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3646
3647         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3648         PTHFCT_CALL definition.
3649
3650 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3651
3652         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3653         available, don't use it.
3654
3655 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3656
3657         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3658         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3659         call into the kernel to delay.
3660
3661 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3662
3663         * tst-initializers1.c: We want to test the initializers as seen
3664         outside of libc, so undefined _LIBC.
3665
3666         * pthread_join.c (cleanup): Avoid warning.
3667
3668 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3669
3670         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3671         (__lll_timedwait_tid): Add unwind info.
3672
3673         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3674         function table, mangle the pointers.
3675         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3676         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3677         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3678         demangle pointers before use.
3679         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3680         demangle pointer.
3681         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3682         * sysdeps/pthread/setxid.h: Likewise.
3683
3684 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3685
3686         * tst-rwlock7.c: Show some more information in case of correct
3687         behavior.
3688
3689 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3690
3691         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3692         (lll_futex_timed_wait): Undo part of last change, don't negate
3693         return value.
3694
3695 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3696
3697         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3698         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3699
3700 2006-12-28  David S. Miller  <davem@davemloft.net>
3701
3702         * shlib-versions: Fix sparc64 linux target specification.
3703
3704 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3705
3706         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3707         Adjust include path for pthread_barrier_wait.c move.
3708
3709 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3710
3711         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3712         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3713
3714 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3715
3716         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3717         6 argument cancellable syscalls.
3718         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3719         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3720         6 argument cancellable syscalls.
3721         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3722
3723 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3724
3725         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3726         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3727
3728 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3729
3730         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3731         __sync_lock_release instead of __sync_lock_release_si.
3732
3733 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3734
3735         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3736         Define.
3737         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3738         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3739         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3740         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3741         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3742         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3743         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3744         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3745         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3746         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3747         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3748
3749 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3750
3751         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3752         * pthread_barrier_wait.c: ...here.
3753         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3754         * pthread_cond_broadcast.c: ...here.
3755         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3756         * pthread_cond_signal.c: ...here.
3757         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3758         * pthread_cond_timedwait.c: ...here.
3759         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3760         * pthread_cond_wait.c: ...here.
3761         * sysdeps/pthread/pthread_once.c: Move to...
3762         * pthread_once.c: ...here.
3763         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3764         * pthread_rwlock_rdlock.c: ...here.
3765         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3766         * pthread_rwlock_timedrdlock.c: ...here.
3767         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3768         * pthread_rwlock_timedwrlock.c: ...here.
3769         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3770         * pthread_rwlock_unlock.c: ...here.
3771         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3772         * pthread_rwlock_wrlock.c: ...here.
3773         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3774         * pthread_spin_destroy.c: ...here.
3775         * sysdeps/pthread/pthread_spin_init.c: Move to...
3776         * pthread_spin_init.c: ...here.
3777         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3778         * pthread_spin_unlock.c: ...here.
3779         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3780         * pthread_getcpuclockid.c: ...here.
3781
3782         * init.c: USE_TLS support is now always enabled.
3783         * tst-tls5.h: Likewise.
3784         * sysdeps/alpha/tls.h: Likewise.
3785         * sysdeps/i386/tls.h: Likewise.
3786         * sysdeps/ia64/tls.h: Likewise.
3787         * sysdeps/powerpc/tls.h: Likewise.
3788         * sysdeps/s390/tls.h: Likewise.
3789         * sysdeps/sh/tls.h: Likewise.
3790         * sysdeps/sparc/tls.h: Likewise.
3791         * sysdeps/x86_64/tls.h: Likewise.
3792
3793 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3794
3795         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3796         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3797         failed.
3798
3799         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3800         Define to THREAD_SELF->header.multiple_threads.
3801         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3802         Likewise.
3803         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3804         Likewise.
3805         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3806         (SINGLE_THREAD_P): Likewise.
3807         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3808         (SINGLE_THREAD_P): Likewise.
3809         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3810         (SINGLE_THREAD_P): Likewise.
3811         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3812         (SINGLE_THREAD_P): Likewise.
3813         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3814         Likewise.
3815         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3816         (SINGLE_THREAD_P): Likewise.
3817         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3818         (SINGLE_THREAD_P): Likewise.
3819         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3820         Likewise.
3821
3822 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3823
3824         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3825         by default rather than 2_3_3.
3826
3827 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3828
3829         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3830         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3831         atomic_* instead of catomic_* macros.
3832
3833 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3834
3835         [BZ #3285]
3836         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3837         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3838         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3839         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3840         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3841         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3842         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3843         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3844         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3845         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3846         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3847         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3848         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3849
3850 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3851
3852         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3853         cancelable syscalls with six parameters.
3854
3855         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3856         operations instead of atomic_*.
3857
3858 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3859
3860         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3861
3862 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3863
3864         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3865         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3866         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3867         New file.
3868         * pthread_attr_setstack.c: Allow overwriting the version number of the
3869         new symbol.
3870         * pthread_attr_setstacksize.c: Likewise.
3871         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3872         it.
3873         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3874         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3875
3876 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3877
3878         [BZ #3251]
3879         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3880         Patch by Petr Baudis.
3881
3882 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3883
3884         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3885
3886         * tst-cancel2.c (tf): Loop as long as something was written.
3887
3888 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3889
3890         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3891         mutexes wake all mutexes.
3892         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3893         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3894         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3895
3896 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3897
3898         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3899         to guarantee the thread is always canceled.
3900
3901 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3902
3903         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3904         Include stdlib.h.
3905         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3906         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3907         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3909         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3910
3911 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3912
3913         [BZ #3123]
3914         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3915         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3916         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3918         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3919         * Makefile (tests): Add tst-cond22.
3920         * tst-cond22.c: New file.
3921
3922 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3923
3924         [BZ #3124]
3925         * descr.h (struct pthread): Add parent_cancelhandling.
3926         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3927         cancelhandling value to child.
3928         * pthread_create.c (start_thread): If parent thread was canceled
3929         reset the SIGCANCEL mask.
3930         * Makefile (tests): Add tst-cancel25.
3931         * tst-cancel25.c: New file.
3932
3933 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3934             Ulrich Drepper  <drepper@redhat.com>
3935
3936         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3937         counterp if it is already zero.
3938         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3939
3940 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3941             Roland McGrath  <roland@redhat.com>
3942
3943         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3944         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3945         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3946         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3947         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3948         lll_robust_mutex_timedlock, lll_mutex_unlock,
3949         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3950         Add _L_*_ symbols around the subsection.
3951         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3952         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3953
3954 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3955             Roland McGrath  <roland@redhat.com>
3956
3957         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3958         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3959         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3960         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3961         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3962         lll_robust_mutex_timedlock, lll_mutex_unlock,
3963         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3964         Add _L_*_ symbols around the subsection.
3965         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3966         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3967
3968 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3969
3970         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3971         change because it can disturb too much existing code.  If real hard
3972         reader preference is needed we'll introduce another type.
3973         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3974         (pthread_rwlock_timedwrlock): Likewise.
3975         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3976         Likewise.
3977
3978 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3979
3980         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3981         reader preference.
3982         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3983         (pthread_rwlock_timedwrlock): Likewise.
3984         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3985         Likewise.
3986
3987 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3988
3989         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3990         Only define ifdef SHARED.
3991
3992 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3993
3994         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3995         (free_stacks): ...here.
3996         (__free_stack_cache): New function.
3997         * pthreadP.h: Declare __free_stack_cache.
3998         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3999         ptr_freeres.
4000         * init.c (pthread_functions): Initialize ptr_freeres.
4001         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4002         New freeres function.
4003
4004 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4005
4006         [BZ #3018]
4007         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4008
4009 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4010
4011         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4012         _XOPEN_REALTIME_THREADS.
4013
4014 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4015
4016         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4017         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4018         HAVE_CLOCK_GETTIME_VSYSCALL.
4019         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4020
4021 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4022
4023         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4024         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4025         * descr.h (struct priority_protection_data): New type.
4026         (struct pthread): Add tpp field.
4027         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4028         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4029         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4030         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4031         TPP mutexes.
4032         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4033         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4034         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4035         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4036         * tpp.c: New file.
4037         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4038         boosted by TPP.
4039         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4040         * pthread_mutexattr_getprioceiling.c
4041         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4042         in the SCHED_FIFO priority range.
4043         * pthread_mutexattr_setprioceiling.c
4044         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4045         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4046         if mutex is not TPP.  Ceiling is now in __data.__lock.
4047         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4048         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4049         is now in __data.__lock.  Add locking.
4050         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4051         * Makefile (libpthread-routines): Add tpp.
4052         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4053         * tst-tpp.h: New file.
4054         * tst-mutexpp1.c: New file.
4055         * tst-mutexpp6.c: New file.
4056         * tst-mutexpp10.c: New file.
4057         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4058         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4059
4060 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4061
4062         [BZ #2843]
4063         * pthread_join.c (pthread_join): Account for self being canceled
4064         when checking for deadlocks.
4065         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4066         (tf1): Don't print anything after pthread_join returns, this would be
4067         another cancellation point.
4068         (tf2): Likewise.
4069         * tst-join6.c: New file.
4070         * Makefile (tests): Add tst-join6.
4071
4072 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4073
4074         [BZ #2892]
4075         * pthread_setspecific.c (__pthread_setspecific): Check
4076         out-of-range index before checking for unused key.
4077
4078         * sysdeps/pthread/gai_misc.h: New file.
4079
4080 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4081
4082         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4083         file.  Don't use sysctl.
4084         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4085         overwrite the file if this is likely not true.
4086
4087 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4088
4089         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4090         * Makefile (tests): Add tst-getpid3.
4091         * tst-getpid3.c: New file.
4092
4093 2006-07-30  Roland McGrath  <roland@redhat.com>
4094
4095         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4096
4097         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4098         (pause_not_cancel): New macro.
4099         (nanosleep_not_cancel): New macro.
4100         (sigsuspend_not_cancel): New macro.
4101         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4102         nanosleep_not_cancel macro from <not-cancel.h>.
4103         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4104         macro from <not-cancel.h>.
4105
4106 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4107             Jakub Jelinek  <jakub@redhat.com>
4108
4109         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4110         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4111         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4112         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4113         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4114         * pthread_mutex_lock.c: Likewise.
4115         * pthread_mutex_timedlock.c: Likewise.
4116         * pthread_mutex_trylock.c: Likewise.
4117         * pthread_mutex_unlock.c: Likewise.
4118         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4119         all mutexes.
4120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4122         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4123         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4124         pthread-pi-defines.sym.
4125         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4126         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4127         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4128         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4129         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4130         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4131         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4132         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4133         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4134         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4135         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4136         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4137         * tst-mutex2.c: Likewise.
4138         * tst-mutex3.c: Likewise.
4139         * tst-mutex4.c: Likewise.
4140         * tst-mutex5.c: Likewise.
4141         * tst-mutex6.c: Likewise.
4142         * tst-mutex7.c: Likewise.
4143         * tst-mutex7a.c: Likewise.
4144         * tst-mutex8.c: Likewise.
4145         * tst-mutex9.c: Likewise.
4146         * tst-robust1.c: Likewise.
4147         * tst-robust7.c: Likewise.
4148         * tst-robust8.c: Likewise.
4149         * tst-mutexpi1.c: New file.
4150         * tst-mutexpi2.c: New file.
4151         * tst-mutexpi3.c: New file.
4152         * tst-mutexpi4.c: New file.
4153         * tst-mutexpi5.c: New file.
4154         * tst-mutexpi6.c: New file.
4155         * tst-mutexpi7.c: New file.
4156         * tst-mutexpi7a.c: New file.
4157         * tst-mutexpi8.c: New file.
4158         * tst-mutexpi9.c: New file.
4159         * tst-robust1.c: New file.
4160         * tst-robust2.c: New file.
4161         * tst-robust3.c: New file.
4162         * tst-robust4.c: New file.
4163         * tst-robust5.c: New file.
4164         * tst-robust6.c: New file.
4165         * tst-robust7.c: New file.
4166         * tst-robust8.c: New file.
4167         * Makefile (tests): Add the new tests.
4168
4169         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4170         * pthread_mutex_destroy.c: Remove unneeded label.
4171
4172 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4173
4174         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4175         computations to compile time.
4176
4177 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4178
4179         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4180
4181 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4182
4183         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4184
4185 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4186
4187         * pthread_key_create.c (__pthread_key_create): Do away with
4188         __pthread_keys_lock.
4189
4190         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4191         (__kernel_cpumask_size): Mark as hidden.
4192         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4193
4194         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4195         * semaphoreP.h (__sem_mappings_lock): Likewise.
4196
4197 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4198
4199         * pthread_atfork.c: Mark __dso_handle as hidden.
4200
4201 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4202
4203         [BZ #2644]
4204         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4205         the reload problem.  Change the one path in pthread_cancel_init
4206         which causes the problem.  Force gcc to reload.  Simplify callers.
4207         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4208         (_Unwind_GetBSP): Undo last patch.
4209
4210 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4211
4212         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4213         function pointer is reloaded after pthread_cancel_init calls.
4214
4215         [BZ #2644]
4216         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4217         pointers are reloaded after pthread_cancel_init calls.
4218
4219 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4220
4221         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4222         __always_inline.
4223
4224 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4225
4226         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4227         Allocate new object which is passed to timer_sigev_thread so that
4228         the timer can be deleted before the new thread is scheduled.
4229
4230 2006-04-26  Roland McGrath  <roland@redhat.com>
4231
4232         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4233
4234 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4235
4236         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4237         suffix for conditional jumps.
4238         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4239         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4240         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4241         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4242         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4243         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4244
4245         * init.c (sigcancel_handler): Compare with correct PID even if the
4246         thread is in the middle of a fork call.
4247         (sighandler_setxid): Likewise.
4248         Reported by Suzuki K P <suzuki@in.ibm.com> .
4249
4250 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4251
4252         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4253
4254 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4255
4256         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4257         fails [Coverity CID 105].
4258
4259 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4260
4261         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4262
4263 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4264
4265         [BZ #2505]
4266         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4267         Define __lll_rel_instr using lwsync.
4268
4269 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4270
4271         * allocatestack.c (allocate_stack): Always initialize robust_head.
4272         * descr.h: Define struct robust_list_head.
4273         (struct pthread): Use robust_list_head in robust mutex list definition.
4274         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4275         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4276         (__pthread_initialize_minimal_internal): Register robust_list with
4277         the kernel.
4278         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4279         Declare __set_robust_list_avail.
4280         * pthread_create.c (start_thread): Register robust_list of new thread.
4281         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4282         waiters.
4283         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4284         number of users, it's unreliable.
4285         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4286         set_robust_list syscall is available.
4287         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4288         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4289         Set robust_head.list_op_pending before trying to lock a robust mutex.
4290         * pthread_mutex_timedlock.c: Likewise.
4291         * pthread_mutex_trylock.c: Likewise.
4292         * pthread_mutex_unlock.c: Likewise for unlocking.
4293         * Makefile (tests): Add tst-robust8.
4294         * tst-robust8.c: New file.
4295
4296 2006-03-08  Andreas Schwab  <schwab@suse.de>
4297
4298         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4299         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4300
4301 2006-03-05  Roland McGrath  <roland@redhat.com>
4302
4303         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4304         and $config_os doesn't match *linux*.
4305
4306 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4307
4308         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4309         Use __syscall_error.
4310         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4311         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4312         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4313         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4314         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4315         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4316
4317 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4318
4319         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4320
4321 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4322
4323         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4324         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4325         mutex.
4326         (__lll_robust_timedlock_wait): Likewise.
4327         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4328         (__lll_robust_lock_wait): Likewise.
4329         (__lll_robust_timedlock_wait): Likewise.
4330         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4331         (__lll_robust_lock_wait): Likewise.
4332         (__lll_robust_timedlock_wait): Likewise.
4333
4334 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4335
4336         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4337         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4338         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4339         lll_robust_mutex_unlock): Define.
4340         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4341
4342 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4343
4344         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4345         instead of <clone.S>.
4346
4347 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4348
4349         * Makefile (libpthread-routines): Add
4350         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4351         and pthread_mutex_[sg]etprioceiling.
4352         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4353         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4354         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4355         pthread_mutex_setprioceiling.
4356         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4357         PTHREAD_PRIO_PROTECT): New enum values.
4358         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4359         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4360         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4361         prototypes.
4362         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4363         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4364         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4365         Define.
4366         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4367         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4368         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4369         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4370         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4371         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4372         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4373         protocol mutexes.
4374         * pthread_mutex_getprioceiling.c: New file.
4375         * pthread_mutex_setprioceiling.c: New file.
4376         * pthread_mutexattr_getprioceiling.c: New file.
4377         * pthread_mutexattr_setprioceiling.c: New file.
4378         * pthread_mutexattr_getprotocol.c: New file.
4379         * pthread_mutexattr_setprotocol.c: New file.
4380
4381 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4382
4383         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4384
4385 2006-02-27  Roland McGrath  <roland@redhat.com>
4386
4387         * sysdeps/pthread/Subdirs: List nptl here too.
4388         * configure (libc_add_on_canonical): New variable.
4389
4390         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4391
4392         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4393         self to get main source tree's file.
4394         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4395         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4396         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4397         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4398         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4400         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4401         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4402         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4403         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4404         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4405         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4406         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4407
4408         * Makefile: Use $(sysdirs) in vpath directive.
4409
4410         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4411         (CPPFLAGS-timer_routines.c): Likewise.
4412
4413         * Makeconfig (includes): Variable removed.
4414
4415 2006-02-26  Roland McGrath  <roland@redhat.com>
4416
4417         * sysdeps/generic/pt-raise.c: Moved to ...
4418         * pt-raise.c: ... here.
4419         * sysdeps/generic/lowlevellock.h: Moved to ...
4420         * lowlevellock.h: ... here.
4421
4422 2006-02-23  Roland McGrath  <roland@redhat.com>
4423
4424         * descr.h (struct pthread): Add final member `end_padding'.
4425         (PTHREAD_STRUCT_END_PADDING): Use it.
4426
4427 2006-02-20  Roland McGrath  <roland@redhat.com>
4428
4429         * sysdeps/mips: Directory removed, saved in ports repository.
4430         * sysdeps/unix/sysv/linux/mips: Likewise.
4431
4432 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4433
4434         * tst-robust1.c: Add second mutex to check that the mutex list is
4435         handled correctly.
4436
4437 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4438
4439         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4440         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4441         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4442         lll_robust_mutex_unlock): New macros.
4443         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4444         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4445         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4446         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4447         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4448
4449 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4450
4451         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4452         definitions.
4453         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4454
4455 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4456
4457         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4458         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4459         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4460         (lll_robust_mutex_unlock): Likewise.
4461
4462 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4463
4464         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4465         Set robust_list.__next rather than robust_list.
4466         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4467         (__pthread_list_t): New typedef.
4468         (pthread_mutex_t): Replace __next and __prev fields with __list.
4469         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4470         (__pthread_list_t): New typedef.
4471         (pthread_mutex_t): Replace __next and __prev fields with __list.
4472         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4473         (__pthread_list_t, __pthread_slist_t): New typedefs.
4474         (pthread_mutex_t): Replace __next and __prev fields with __list.
4475         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4476         (__pthread_list_t, __pthread_slist_t): New typedefs.
4477         (pthread_mutex_t): Replace __next and __prev fields with __list.
4478         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4479         (__pthread_list_t, __pthread_slist_t): New typedefs.
4480         (pthread_mutex_t): Replace __next and __prev fields with __list.
4481         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4482         (__pthread_slist_t): New typedef.
4483         (pthread_mutex_t): Replace __next field with __list.
4484
4485 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4486
4487         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4488         PTHREAD_MUTEX_OWNERDEAD.
4489         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4490         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4491         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4492         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4493         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4494         to PTHREAD_MUTEX_INCONSISTENT.
4495         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4496         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4497         * pthread_mutex_trylock.c: Likewise.
4498         * pthread_mutex_timedlock.c: Likewise.
4499         * pthread_mutex_unlock.c: Likewise.
4500         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4501         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4502         lowlevelrobustlock.sym.
4503         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4504         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4505         definitions.
4506         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4507         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4508         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4509         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4510         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4511
4512 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4513
4514         * allocatestack.c (allocate_stack): Initialize robust_list.
4515         * init.c (__pthread_initialize_minimal_internal): Likewise.
4516         * descr.h (struct xid_command): Pretty printing.
4517         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4518         robust_list.  Adjust macros.
4519         * pthread_create.c (start_thread): Adjust robust_list handling.
4520         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4521         but the owner for all robust mutex types.
4522         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4523         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4524         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4525         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4526
4527         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4528         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4529
4530 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4531
4532         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4533         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4534
4535 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4536
4537         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4538         Return status.
4539         (lll_futex_timed_wait): Define.
4540
4541 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4542
4543         * tst-cancel4.c: Test ppoll.
4544
4545 2006-01-18  Andreas Jaeger  <aj@suse.de>
4546
4547         [BZ #2167]
4548         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4549         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4550         by Jim Gifford <patches@jg555.com>.
4551
4552 2006-01-13  Richard Henderson  <rth@redhat.com>
4553
4554         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4555
4556 2006-01-10  Roland McGrath  <roland@redhat.com>
4557
4558         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4559         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4560         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4561         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4562         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4563         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4564         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4565         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4566         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4567         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4568
4569 2006-01-09  Roland McGrath  <roland@redhat.com>
4570
4571         * tst-initializers1-c89.c: New file.
4572         * tst-initializers1-c99.c: New file.
4573         * tst-initializers1-gnu89.c: New file.
4574         * tst-initializers1-gnu99.c: New file.
4575         * Makefile (tests): Add them.
4576         (CFLAGS-tst-initializers1-c89.c): New variable.
4577         (CFLAGS-tst-initializers1-c99.c): New variable.
4578         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4579         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4580
4581         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4582         Use __extension__ on anonymous union definition.
4583         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4584         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4585         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4586         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4587         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4588
4589 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4590
4591         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4592         Don't give the union a name because it changes the mangled name.
4593         Instead name the struct for __data.
4594         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4595         Likewise.
4596         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4597         Likewise.
4598
4599 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4600
4601         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4602         stack bias to mc_ftp field.
4603
4604 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4605
4606         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4607         being too clever and reloading the futex value where it shouldn't.
4608
4609 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4610
4611         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4612         correct type.
4613
4614 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4615
4616         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4617         Add cfi directives.
4618
4619 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4620
4621         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4622         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4623         rename in tcbhead_t.
4624
4625         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4626         Don't give the union a name because it changes the mangled name.
4627         Instead name the struct for __data.
4628         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4629         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4630         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4631         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4632         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4633         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4634
4635 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4636
4637         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4638         Return status.
4639         (lll_futex_timed_wait): Define.
4640         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4641         * sysdeps/pthread/aio_misc.h: New file.
4642
4643 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4644
4645         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4646
4647 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4648
4649         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4650         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4651         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4652
4653 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4654
4655         * tst-cancel24.cc: Use C headers instead of C++ headers.
4656
4657 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4658
4659         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4660         sparc-linux configured glibc.
4661         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4662         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4663         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4664         atomic_compare_and_exchange_val_24_acq instead of
4665         atomic_compare_and_exchange_val_acq.
4666         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4667         instead of atomic_exchange_rel.
4668         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4669         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4670         file.
4671         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4672         file.
4673         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4674         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4675         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4676         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4677         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4678         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4679         New file.
4680         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4681         New file.
4682         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4683         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4684         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4685         file.
4686         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4687         file.
4688         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4689
4690 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4691
4692         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4693         mutex initializers.
4694
4695 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4696
4697         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4698         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4699         THREAD_COPY_POINTER_GUARD): Define.
4700         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4701         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4702
4703 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4704
4705         * version.c: Update copyright year.
4706
4707 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4708
4709         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4710         .eh_frame section, use cfi_* directives.
4711         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4712
4713 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4714
4715         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4716         now.
4717
4718 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4719
4720         * sysdeps/pthread/sigaction.c: Removed.
4721         * sigaction.c: New file.
4722         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4723
4724 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4725
4726         * Makefile (tests): Add tst-signal7.
4727         * tst-signal7.c: New file.
4728
4729 2005-12-27  Roland McGrath  <roland@redhat.com>
4730
4731         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4732         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4733         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4734         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4735         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4736         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4737         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4738         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4739         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4740         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4741         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4742
4743 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4744
4745         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4746         and __prev field to pthread_mutex_t.
4747         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4748         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4749         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4750         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4751         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4752         to pthread_mutex_t.
4753
4754 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4755
4756         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4757         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4758         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4759         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4760         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4761         and PTHREAD_MUTEXATTR_FLAG_BITS.
4762         * descr.h (struct pthread): Add robust_list field and define
4763         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4764         * pthread_mutexattr_getrobust.c: New file.
4765         * pthread_mutexattr_setrobust.c: New file.
4766         * pthread_mutex_consistent.c: New file.
4767         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4768         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4769         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4770         Adjust pthread_mutex_t initializers.
4771         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4772         field to pthread_mutex_t.
4773         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4774         and __prev field to pthread_mutex_t.
4775         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4776         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4777         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4778         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4779         * pthread_mutexattr_gettype.c: Likewise.
4780         * pthread_mutexattr_setpshared.c: Likewise.
4781         * pthread_mutexattr_settype.c: Likewise.
4782         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4783         Initialize mutex kind according to robust flag.
4784         * pthread_mutex_lock.c: Implement local robust mutex.
4785         * pthread_mutex_timedlock.c: Likewise.
4786         * pthread_mutex_trylock.c: Likewise.
4787         * pthread_mutex_unlock.c: Likewise.
4788         * pthread_create.c (start_thread): Mark robust mutexes which remained
4789         locked as dead.
4790         * tst-robust1.c: New file.
4791         * tst-robust2.c: New file.
4792         * tst-robust3.c: New file.
4793         * tst-robust4.c: New file.
4794         * tst-robust5.c: New file.
4795         * tst-robust6.c: New file.
4796         * tst-robust7.c: New file.
4797         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4798         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4799         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4800         tst-robust5, tst-robust6, and tst-robust7.
4801
4802         * tst-typesizes.c: New file.
4803         * Makefile (tests): Add tst-typesizes.
4804
4805         * tst-once3.c: More debug output.
4806
4807 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4808
4809         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4810         missing after last change.
4811
4812         * version.c: Update copyright year.
4813
4814 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4815
4816         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4817         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4818         * pthread_mutex_trylock.c: Likewise.
4819         * pthread_mutex_timedlock.c: Likewise.
4820         * pthread_mutex_unlock.c: Likewise.
4821
4822 2005-12-22  Roland McGrath  <roland@redhat.com>
4823
4824         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4825         so that #include_next's search location is not reset to the -I..
4826         directory where <nptl/...> can be found.
4827
4828 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4829
4830         [BZ #1913]
4831         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4832         Fix unwind info.  Remove useless branch prediction prefix.
4833         * tst-cancel24.cc: New file.
4834         * Makefile: Add rules to build and run tst-cancel24.
4835
4836 2005-12-21  Roland McGrath  <roland@redhat.com>
4837
4838         * libc-cancellation.c: Use <> rather than "" #includes.
4839         * pt-cleanup.c: Likewise.
4840         * pthread_create.c: Likewise.
4841         * pthread_join.c: Likewise.
4842         * pthread_timedjoin.c: Likewise.
4843         * pthread_tryjoin.c: Likewise.
4844         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4845         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4846         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4847         * unwind.c: Likewise.
4848
4849 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4850
4851         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4852         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4853         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4854         THREAD_COPY_POINTER_GUARD): Define.
4855
4856 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4857
4858         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4859         rather than one.
4860         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4861         THREAD_COPY_POINTER_GUARD): Define.
4862         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4863         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4864         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4865         THREAD_COPY_POINTER_GUARD): Define.
4866         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4867         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4868         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4869         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4870         Use PTR_DEMANGLE for B0 if defined.
4871
4872 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4873
4874         * pthread_create.c (__pthread_create_2_1): Use
4875         THREAD_COPY_POINTER_GUARD if available.
4876         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4877         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4878         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4879         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4880         * sysdeps/x86_64/tls.h: Likewise.
4881
4882 2005-12-15  Roland McGrath  <roland@redhat.com>
4883
4884         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4885
4886 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4887
4888         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4889         sysdeps/generic.
4890         * errno-loc.c: New file.
4891
4892 2005-12-12  Roland McGrath  <roland@redhat.com>
4893
4894         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4895         adjustments before choosing stack size.  Update minimum stack size
4896         calculation to match allocate_stack change.
4897
4898 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4899
4900         * allocatestack.c (allocate_stack): Don't demand that there is an
4901         additional full page available on the stack beside guard, TLS, the
4902         minimum stack.
4903
4904 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4905
4906         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4907         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4908
4909         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4910         compiling 32-bit code we must define __cleanup_fct_attribute.
4911
4912 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4913
4914         [BZ #1920]
4915         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4916         __attribute__ instead of __attribute.
4917         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4918         (__cleanup_fct_attribute): Likewise.
4919
4920 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4921
4922         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4923         a write barrier before writing libgcc_s_getcfa.
4924
4925 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4926
4927         * sysdeps/unix/sysv/linux/configure: Removed.
4928
4929 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4930
4931         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4932         optional init_array/fini_array support.
4933
4934 2005-10-24  Roland McGrath  <roland@redhat.com>
4935
4936         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4937         versioned_symbol use.
4938
4939 2005-10-16  Roland McGrath  <roland@redhat.com>
4940
4941         * init.c (__pthread_initialize_minimal_internal): Even when using a
4942         compile-time default stack size, apply the minimum that allocate_stack
4943         will require, and round up to page size.
4944
4945 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4946
4947         * Makefile ($(test-modules)): Remove static pattern rule.
4948
4949 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4950             Ulrich Drepper  <drepper@redhat.com>
4951
4952         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4953         alignment in callback function.
4954         * Makefile: Add rules to build and run tst-align3.
4955         * tst-align3.c: New file.
4956
4957 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4958
4959         * allocatestack.c (setxid_signal_thread): Add
4960         INTERNAL_SYSCALL_DECL (err).
4961
4962 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4963
4964         * allocatestack.c (setxid_signal_thread): Need to use
4965         atomic_compare_and_exchange_bool_acq.
4966
4967 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4968             Jakub Jelinek  <jakub@redhat.com>
4969
4970         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4971         CANCEL_RESTMASK.
4972         (struct pthread): Move specific_used field to avoid padding.
4973         Add setxid_futex field.
4974         * init.c (sighandler_setxid): Reset setxid flag and release the
4975         setxid futex.
4976         * allocatestack.c (setxid_signal_thread): New function.  Broken
4977         out of the bodies of the two loops in __nptl_setxid.  For undetached
4978         threads check whether they are exiting and if yes, don't send a signal.
4979         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4980         * pthread_create.c (start_thread): For undetached threads, check
4981         whether setxid bit is set.  If yes, wait until signal has been
4982         processed.
4983
4984         * allocatestack.c (STACK_VARIABLES): Initialize them.
4985         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4986
4987 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4988
4989         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4990         waiters, awake all waiters on the associated mutex.
4991
4992 2005-09-22  Roland McGrath  <roland@redhat.com>
4993
4994         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4995         ../sysdeps/x86_64/hp-timing.h).
4996
4997 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4998
4999         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5000         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5001         (lll_futex_wake_unlock): Define.
5002         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5003         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5004         (lll_futex_wake_unlock): Define.
5005         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5006         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5007         (lll_futex_wake_unlock): Define.
5008         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5009         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5010         (lll_futex_wake_unlock): Define.
5011         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5012         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5013         (lll_futex_wake_unlock): Define.
5014         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5015         lll_futex_wake_unlock.
5016         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5017         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5018         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5019         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5020         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5021         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5022
5023 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5024
5025         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5026         Fix typo in register name.
5027
5028 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5029
5030         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5031         Use __sigfillset.  Document that sigfillset does the right thing wrt
5032         to SIGSETXID.
5033
5034 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5035
5036         [BZ #1102]
5037         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5038         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5039         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5040         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5041         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5042         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5043         in the structure.
5044         * Makefile (tests): Add tst-initializers1.
5045         (CFLAGS-tst-initializers1.c): Set.
5046         * tst-initializers1.c: New test.
5047
5048 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5049
5050         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5051         Make sure __flags are located at offset 48 from the start of the
5052         structure.
5053
5054 2005-07-02  Roland McGrath  <roland@redhat.com>
5055
5056         * Makeconfig: Comment fix.
5057
5058 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5059
5060         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5061         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5062         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5063         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5064         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5065         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5066         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5067         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5068         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5069         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5070
5071 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5072
5073         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5074         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5075         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5076         fields.
5077         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5078         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5079         field.  Put in sysinfo field unconditionally.
5080         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5081         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5082         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5083         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5084         fields.
5085         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5086         * pthread_create.c (__pthread_create_2_1): Use
5087         THREAD_COPY_STACK_GUARD macro.
5088         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5089         tests.
5090         * tst-stackguard1.c: New file.
5091         * tst-stackguard1-static.c: New file.
5092
5093 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5094
5095         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5096         Invoke CGOTSETUP and CGOTRESTORE.
5097         (CGOTSETUP, CGOTRESTORE): Define.
5098
5099 2005-05-29  Richard Henderson  <rth@redhat.com>
5100
5101         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5102         (tf_write, tf_writev): Use it.
5103         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5104         the system minimum.
5105
5106 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5107
5108         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5109         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5110         __librt_*_asynccancel@local.
5111
5112 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5113
5114         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5115         all occurrences of JUMPTARGET.  Instead append @local to labels.
5116
5117 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5118
5119         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5120         size/alignment of struct pthread rather than tcbhead_t.
5121         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5122         Likewise.
5123         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5124         Likewise.
5125         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5126         Likewise.
5127
5128 2005-05-19  Richard Henderson  <rth@redhat.com>
5129
5130         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5131         __sync_val_compare_and_swap, not explicit _si variant.
5132         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5133
5134 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5135
5136         [BZ #915]
5137         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5138
5139 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5140
5141         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5142         .eh_frame section, use cfi_* directives.
5143
5144 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5145
5146         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5147         of "" includes.
5148
5149 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5150
5151         [BZ #1075]
5152         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5153         aio_write blocks.
5154
5155 2005-04-27  Roland McGrath  <roland@redhat.com>
5156
5157         * Makefile (tests): Remove tst-clock2.
5158
5159         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5160         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5161         translating to the kernel clockid_t for our own process/thread clock.
5162
5163         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5164
5165 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5166
5167         * old_pthread_cond_init.c: Include <errno.h>.
5168         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5169         process shared or uses clock other than CLOCK_REALTIME.
5170         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5171
5172 2005-04-13  David S. Miller  <davem@davemloft.net>
5173
5174         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5175         * sysdeps/sparc/sparc64/clone.S: New file.
5176
5177 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5178
5179         [BZ #1102]
5180         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5181         __inline instead of inline.
5182         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5183
5184 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5185
5186         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5187         functionally equivalent, but shorter instructions.
5188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5189         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5190         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5191         Likewise.
5192         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5193         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5194         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5195         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5197         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5198         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5199         Likewise.
5200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5201         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5203         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5204         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5205
5206 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5207
5208         * sysdeps/mips/Makefile: New file.
5209         * sysdeps/mips/nptl-sysdep.S: New file.
5210         * sysdeps/mips/tcb-offsets.sym: New file.
5211         * sysdeps/mips/pthread_spin_lock.S: New file.
5212         * sysdeps/mips/pthread_spin_trylock.S: New file.
5213         * sysdeps/mips/pthreaddef.h: New file.
5214         * sysdeps/mips/tls.h: New file.
5215         * sysdeps/mips/jmpbuf-unwind.h: New file.
5216         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5217         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5218         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5219         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5220         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5221         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5222         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5223         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5224         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5225         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5226
5227 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5228
5229         [BZ #1112]
5230         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5231         variable to scerr.
5232
5233 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5234
5235         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5236
5237 2005-02-25  Roland McGrath  <roland@redhat.com>
5238
5239         * alloca_cutoff.c: Correct license text.
5240         * tst-unload.c: Likewise.
5241         * sysdeps/pthread/allocalim.h: Likewise.
5242         * sysdeps/pthread/pt-initfini.c: Likewise.
5243         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5244         * sysdeps/pthread/bits/sigthread.h: Likewise.
5245         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5246         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5247
5248 2005-02-16  Roland McGrath  <roland@redhat.com>
5249
5250         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5251         Use unsigned int * for ptr_nthreads.
5252
5253 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5254
5255         [BZ #721]
5256         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5257         gcc4.
5258
5259 2005-02-07  Richard Henderson  <rth@redhat.com>
5260
5261         [BZ #787]
5262         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5263         argument.
5264
5265 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5266
5267         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5268         order of arguments in invocation of atomic_add_zero.
5269
5270 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5271
5272         [BZ #737]
5273         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5274         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5275         at least gotntpoff relocation and addition.
5276         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5277         Likewise.
5278         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5279         Likewise.
5280         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5281         Likewise.
5282
5283 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5284
5285         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5286         entry for static tls deallocation fix.
5287         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5288         also contains information whether the memory pointed to is static
5289         TLS or not.
5290         * sysdeps/i386/tls.h: Likewise.
5291         * sysdeps/ia64/tls.h: Likewise.
5292         * sysdeps/powerpc/tls.h: Likewise.
5293         * sysdeps/s390/tls.h: Likewise.
5294         * sysdeps/sh/tls.h: Likewise.
5295         * sysdeps/sparc/tls.h: Likewise.
5296         * sysdeps/x86_64/tls.h: Likewise.
5297
5298 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5299
5300         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5301
5302 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5303
5304         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5305         %esp.
5306         * Makefile (tests): Add tst-align2.
5307         * tst-align2.c: New test.
5308         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5309         -mpreferred-stack-boundary=4.
5310
5311 2004-12-18  Roland McGrath  <roland@redhat.com>
5312
5313         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5314         New file removed withdrawn for the moment.
5315
5316 2004-12-17  Richard Henderson  <rth@redhat.com>
5317
5318         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5319         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5320
5321 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5322
5323         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5324         Increased PTHREAD_STACK_MIN.
5325
5326         * tst-context1.c (stacks): Use bigger stack size.
5327
5328 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5329
5330         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5331         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5332
5333 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5334
5335         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5336         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5337         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5338
5339 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5340
5341         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5342
5343 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5344
5345         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5346         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5347
5348         * tst-getpid1.c: If child crashes, report this first.  Print which
5349         signal.
5350
5351 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5352
5353         * init.c (__pthread_initialize_minimal_internal): Also unblock
5354         SIGSETXID.
5355
5356 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5357
5358         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5359         _POSIX_THREAD_CPUTIME): Define to 0.
5360         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5361         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5362         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5363         __timer_signal_thread_tclk): Remove.
5364         (init_module): Remove their initialization.
5365         (thread_cleanup): Remove their cleanup assertions.
5366         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5367         __timer_signal_thread_tclk): Remove.
5368         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5369         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5370         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5371
5372 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5373
5374         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5375         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5376
5377         * Makefile (tests): Add tst-getpid2.
5378         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5379         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5380         * tst-getpid2.c: New test.
5381
5382 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5383
5384         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5385
5386 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5387
5388         * Makefile (tests): Add tst-getpid1.
5389         * tst-getpid1.c: New file.
5390         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5391         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5392
5393 2004-12-02  Roland McGrath  <roland@redhat.com>
5394
5395         * Makefile (libpthread-nonshared): Variable removed.
5396         ($(objpfx)libpthread_nonshared.a): Target removed.
5397         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5398         These are now handled by generic magic from
5399         libpthread-static-only-routines being set.
5400
5401 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5402
5403         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5404         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5405         _POSIX_THREAD_PRIO_PROTECT): Define.
5406         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5407         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5408         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5409
5410 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5411
5412         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5413         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5414         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5415         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5416         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5417         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5418         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5419
5420 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5421
5422         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5423
5424         * Makefile (libpthread-routines): Add pthread_setschedprio.
5425         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5426         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5427         * pthread_setschedprio.c: New file.
5428
5429 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5430
5431         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5432         * pthread_cancel.c (pthread_create): Likewise.
5433
5434         * Makefile (libpthread-routines): Add vars.
5435         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5436         * init.c (__default_stacksize, __is_smp): Remove.
5437         * vars.c: New file.
5438         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5439         and define a wrapper macro.
5440         (PTHREAD_STATIC_FN_REQUIRE): Define.
5441         * allocatestack.c (__find_thread_by_id): Undefine.
5442         * pthread_create (__pthread_keys): Remove.
5443         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5444         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5445         PTHREAD_STATIC_FN_REQUIRE.
5446
5447 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5448
5449         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5450         parameter to REGISTER macro.
5451
5452 2004-11-17  Roland McGrath  <roland@redhat.com>
5453
5454         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5455         Make sure SIGCANCEL is blocked as well.
5456
5457 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5458
5459         * sysdeps/pthread/setxid.h: New file.
5460         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5461         (struct xid_command): Add forward decl.
5462         (struct pthread_functions): Change return type of __nptl_setxid hook
5463         to int.
5464         * pthreadP.h (__nptl_setxid): Change return type to int.
5465         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5466         calling thread, return its return value and set errno on failure.
5467         * descr.h (struct xid_command): Change id type to long array.
5468
5469         * Makefile: Add rules to build and test tst-setuid1 and
5470         tst-setuid1-static.
5471         * tst-setuid1.c: New test.
5472         * tst-setuid1-static.c: New test.
5473
5474 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5475
5476         * Makefile (tests): Add tst-exit3.
5477         * tst-exit3.c: New test.
5478
5479 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5480
5481         * Makefile (tests): Add tst-exit2.
5482         * tst-exit2.c: New file.
5483
5484 2004-11-09  Roland McGrath  <roland@redhat.com>
5485
5486         [BZ #530]
5487         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5488         here, before calling clone.
5489         * pthread_create.c (start_thread): Don't do it here.
5490
5491 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5492
5493         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5494
5495 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5496
5497         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5498         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5499         assembler warning.
5500
5501 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5502
5503         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5504         if sched_priority is not between minprio and maxprio.
5505
5506 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5507
5508         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5509         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5510
5511         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5512         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5513
5514 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5515
5516         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5517         not-cancelable I/O functions.
5518
5519 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5520
5521         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5522         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5523         make sure 2 is stored in the futex and we looked at the old value.
5524         Fix a few other problems to return the correct value.
5525
5526 2004-10-14  Richard Henderson  <rth@redhat.com>
5527
5528         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5529         make gcc4 happy.
5530
5531 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5532
5533         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5534         of pthread-functions.h and pthreaddef.h.
5535         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5536
5537         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5538         Change __data.__nwaiters from int to unsigned int.
5539
5540         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5541         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5542
5543         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5544         before return type.
5545
5546         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5547         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5548
5549 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5550
5551         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5552         test fails, remove message queue.
5553         (tf_msgsnd): Likewise.
5554
5555 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5556
5557         * tst-clock1.c: Change #ifdef to #if defined.
5558         * tst-clock2.c: Likewise.
5559         * tst-cond11.c: Likewise.
5560
5561         * sysdeps/pthread/timer_create.c (timer_create): Use
5562         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5563         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5564         THREAD_CPUTIME.
5565
5566 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5567
5568         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5569         _POSIX_THREAD_CPUTIME): Define to 0.
5570
5571 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5572
5573         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5574         and _POSIX_THREAD_CPUTIME to zero.
5575         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5576         * tst-barrier2.c: Fix testing for POSIX feature.
5577         * tst-clock1.c: Likewise.
5578         * tst-clock2.c: Likewise.
5579         * tst-cond11.c: Likewise.
5580         * tst-cond4.c: Likewise.
5581         * tst-cond6.c: Likewise.
5582         * tst-flock2.c: Likewise.
5583         * tst-mutex4.c: Likewise.
5584         * tst-mutex9.c: Likewise.
5585         * tst-rwlock12.c: Likewise.
5586         * tst-rwlock4.c: Likewise.
5587         * tst-signal1.c: Likewise.
5588         * tst-spin2.c: Likewise.
5589         * sysdeps/pthread/posix-timer.h: Likewise.
5590         * sysdeps/pthread/timer_create.c: Likewise.
5591         * sysdeps/pthread/timer_routines.c: Likewise.
5592
5593 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5594
5595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5596         (__lll_mutex_timedlock_wait): Address futex correctly.
5597
5598         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5599         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5600         make sure 2 is stored in the futex and we looked at the old value.
5601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5602         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5603         which might very well made the code not working at all before.
5604         [BZ #417]
5605
5606 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5607
5608         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5609         allow SIGSETXID to be sent.
5610         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5611         for SIGSETXID to be defined.
5612         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5613         SIGSETXID cannot be blocked.
5614
5615         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5616         Add __extension__ to long long types.
5617         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5618         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5619         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5620         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5621         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5622         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5623         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5624
5625 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5626
5627         * descr.h (struct pthread): Add stopped_start field.
5628         * sysdeps/pthread/createthread.c (create_thread): Set
5629         start_stopped flag in descriptor for new thread appropriately.
5630         * pthread_create.c (start_thread): Only take lock to be stopped on
5631         startup if stopped_start flag says so.
5632
5633 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5634
5635         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5636         is created detached and if yes, do not try to free the stack in case
5637         the thread creation failed.
5638         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5639         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5640         case there has been no error.  [BZ #405]
5641
5642         * pthread_create.c (start_thread): Don't wait for scheduler data
5643         etc to be set at the beginning of the function.  The cancellation
5644         infrastructure must have been set up.  And enable async
5645         cancellation before potentially going to sleep.  [BZ #401]
5646
5647 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5648
5649         * Versions: Remove exports for pthread_set*id_np functions.
5650         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5651         for now.
5652         * Makefile: Don't build pthread_set*id code for now.
5653
5654 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5655
5656         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5657         internal use.
5658         * allocatestack.c (__nptl_setxid): New function.
5659         * descr.h (struct xid_command): Define type.
5660         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5661         (sighandler_setxid): New function.
5662         (__pthread_initialize_minimal): Register sighandler_setxid for
5663         SIGCANCEL.
5664         * pt-allocrtsig.c: Update comment.
5665         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5666         Declare __nptl_setxid.
5667         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5668         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5669         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5670         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5671         and pthread_setresuid_np.
5672         * pthread_setgid_np.c: New file.
5673         * pthread_setuid_np.c: New file.
5674         * pthread_setegid_np.c: New file.
5675         * pthread_seteuid_np.c: New file.
5676         * pthread_setregid_np.c: New file.
5677         * pthread_setreuid_np.c: New file.
5678         * pthread_setresgid_np.c: New file.
5679         * pthread_setresuid_np.c: New file.
5680         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5681         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5682         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5683         and pthread_setresuid_np.
5684         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5685         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5686         pthread_setregid, and pthread_setresgid.
5687
5688 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5689
5690         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5691         ENOMEM when out of memory.
5692
5693 2004-09-10  Roland McGrath  <roland@redhat.com>
5694
5695         [BZ #379]
5696         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5697         code, since we don't try to use the broken CLONE_STOPPED any more.
5698         * pthread_create.c (start_thread): Likewise.
5699
5700 2004-09-15  Richard Henderson  <rth@redhat.com>
5701
5702         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5703
5704 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5705
5706         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5707         (__libc_unwind_longjmp): Delete macro and declare as function.
5708         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5709         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5710         nptl directory.
5711         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5712         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5713         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5714
5715 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5716
5717         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5718         for __USE_XOPEN2K.
5719         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5720         types also for __USE_XOPEN2K.
5721         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5722         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5723         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5724         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5725         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5726         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5727         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5728         [BZ #320]
5729
5730 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5731
5732         * sysdeps/pthread/pthread.h
5733         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5734         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5735         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5736         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5737         [BZ #375]
5738
5739 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5740
5741         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5742         PSEUDO to be used with . prefix.
5743
5744         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5745         Use atomic_increment instead of atomic_exchange_and_add.
5746         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5747         Likewise.
5748         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5749         Likewise.
5750         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5751         Likewise.
5752
5753         * allocatestack.c (allocate_stack): Use atomic_increment_val
5754         instead of atomic_exchange_and_add.
5755         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5756         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5757         Likewise.
5758         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5759         Likewise.
5760
5761         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5762         the initialization function might throw.
5763
5764 2005-09-05  Richard Henderson  <rth@redhat.com>
5765
5766         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5767         Move definition inside libpthread, libc, librt check.  Provide
5768         definition for rtld.
5769
5770 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5771
5772         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5773         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5774         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5775         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5776         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5777         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5778         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5779         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5780         * unwind.c: Use it.
5781
5782         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5783         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5784         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5785         Likewise.
5786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5787         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5788         this is the last waiter, signal pthread_cond_destroy caller and
5789         avoid using the pthread_cond_t structure after unlock.
5790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5791         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5792         Read clock type from the least significant bits of __nwaiters instead
5793         of __clock.
5794         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5795         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5796
5797 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5798
5799         [BZ #342]
5800         * Makefile (tests): Add tst-cond20 and tst-cond21.
5801         * tst-cond20.c: New test.
5802         * tst-cond21.c: New test.
5803         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5804         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5805         it unsigned int.
5806         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5807         Likewise.
5808         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5809         (pthread_cond_t): Likewise.
5810         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5811         Likewise.
5812         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5813         Likewise.
5814         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5815         Likewise.
5816         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5817         (cond_nwaiters): New.
5818         (clock_bits): New.
5819         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5820         if there are waiters not signalled yet.
5821         Wait until all already signalled waiters wake up.
5822         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5823         __nwaiters.  If pthread_cond_destroy has been called and this is the
5824         last waiter, signal pthread_cond_destroy caller and avoid using
5825         the pthread_cond_t structure after unlock.
5826         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5827         decrement it when leaving.  If pthread_cond_destroy has been called
5828         and this is the last waiter, signal pthread_cond_destroy caller.
5829         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5830         Likewise.  Read clock type from the least significant bits of
5831         __nwaiters instead of __clock.
5832         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5833         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5834         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5835         clock type just from the last COND_CLOCK_BITS bits of value.
5836         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5837         instead of __clock, just from second bit of condattr's value.
5838
5839 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5840
5841         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5842         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5843         != 64.
5844         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5845
5846 2004-08-15  Roland McGrath  <roland@frob.com>
5847
5848         * pthread_atfork.c: Update copyright terms including special exception
5849         for these trivial files, which are statically linked into executables
5850         that use dynamic linking for the significant library code.
5851
5852 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5853
5854         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5855         pthread_rwlock_rdlock.
5856         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5857         Decrease __nr_readers_queued after reacquiring lock.
5858         * sysdeps/pthread/pthread_rwlock_timedrdlock
5859         (pthread_rwlock_timedrdlock): Likewise.
5860         Reported by Bob Cook <bobcook47@hotmail.com>.
5861
5862 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5863
5864         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5865         before pthread_barrier_wait.
5866
5867 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5868
5869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5870         Remove unnecessary exception handling data.
5871
5872 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5873
5874         [BZ #284]
5875         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5876         instead of clockid_t.
5877
5878 2004-07-21  Roland McGrath  <roland@redhat.com>
5879
5880         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5881
5882 2004-07-19  Roland McGrath  <roland@redhat.com>
5883
5884         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5885
5886 2004-07-02  Roland McGrath  <roland@redhat.com>
5887
5888         * configure: Don't exit.
5889
5890 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5891
5892         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5893         (__pthread_cond_timedwait): Check for invalid nanosecond in
5894         timeout value.
5895
5896 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5897
5898         * Makefile: Add rules to build and run tst-fini1.
5899         * tst-fini1.c: New file.
5900         * tst-fini1mod.c: New file.
5901
5902 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5903
5904         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5905         if no cancellation support is needed.
5906         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5907         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5908         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5910         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5911         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5912         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5913         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5914         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5915
5916         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5917         only if not already defined.
5918
5919 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5920
5921         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5922         constraint "m" instead of "0" for futex.
5923
5924         * shlib-versions: Add powerpc64-.*-linux.*.
5925
5926 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5927
5928         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5929         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5930         for valid tv_nsec.
5931         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5932         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5933         bits.
5934
5935 2004-06-29  Roland McGrath  <roland@redhat.com>
5936
5937         * Banner: NPTL no longer has its own version number.
5938         * Makefile (nptl-version): Variable removed.
5939         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5940         using $(version), the glibc version number.
5941
5942 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5943
5944         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5945         Fix branch offset for a PLT entry.
5946         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5947         Likewise.
5948         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5949         Likewise.
5950         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5951         Likewise.
5952         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5953         Likewise.
5954
5955 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5956
5957         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5958         unconditionally.
5959
5960 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5961
5962         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5963         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5964         instead of tv_sec.
5965         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5966         (pthread_rwlock_timedrdlock): Likewise.
5967
5968 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5969
5970         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5971         Set __r7 to val, not mutex.
5972
5973 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5974
5975         * Makefile: Add rules to build tst-rwlock14.
5976         * tst-rwlock14.c: New file.
5977
5978 2004-06-24  Boris Hu  <boris.hu@intel.com>
5979
5980         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5981         check.
5982         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5983
5984 2004-06-19  Andreas Jaeger  <aj@suse.de>
5985
5986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5987         assembler in last patch.
5988
5989 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5990
5991         * sysdeps/pthread/pthread_cond_timedwait.c
5992         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5994         (__pthread_cond_timedwait): Check for invalid nanosecond in
5995         timeout value.
5996         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5997         * tst-cond19.c: New file.
5998         * Makefile: Add rules to build and run tst-cond19.
5999
6000 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6001
6002         * tst-context1.c (GUARD_PATTERN): Defined.
6003         (tst_context_t): Define struct containing ucontext_t & guard words.
6004         (ctx): Declare as an array of tst_context_t.
6005         (fct): Verify uc_link & guard words are still valid.
6006         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6007
6008 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6009
6010         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6011         Add __data.__futex field, reshuffle __data.__clock.
6012         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6013         (__pthread_cond_signal): Increment __futex at the same time as
6014         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6015         address of low 32-bits of __wakeup_seq to futex syscall.
6016         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6017         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6018         releasing internal lock to FUTEX_WAIT.
6019         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6020         (__pthread_cond_timedwait): Likewise.
6021         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6022         (FUTEX_CMP_REQUEUE): Define.
6023         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6024         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6025         Pass __futex value from before the unlock and __futex address instead
6026         of address of low 32-bits of __wakeup_seq to futex syscall.
6027         Fallback to FUTEX_WAKE all on any errors.
6028
6029 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6030
6031         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6032         comment typo.
6033         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6034         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6035         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6036         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6037         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6038
6039 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6040
6041         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6042         Add memory clobber to inline assembly.
6043         (__lll_mutex_trylock): Likewise.
6044         (__lll_mutex_cond_trylock): Likewise.
6045
6046 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6047
6048         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6049         Pass val argument as 6th system call argument in %r7.
6050
6051 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6052
6053         * Makefile (tests): Add tst-cond16.
6054         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6055         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6056         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6057         Add __data.__futex field, reshuffle __data.__clock.
6058         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6059         (__pthread_cond_signal): Increment __futex at the same time as
6060         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6061         address of low 32-bits of __wakeup_seq to futex syscall.
6062         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6063         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6064         releasing internal lock to FUTEX_WAIT.
6065         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6066         (__pthread_cond_timedwait): Likewise.
6067         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6068         (FUTEX_CMP_REQUEUE): Define.
6069         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6070         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6071         Pass __futex value from before the unlock and __futex address instead
6072         of address of low 32-bits of __wakeup_seq to futex syscall.
6073         Fallback to FUTEX_WAKE all on any errors.
6074         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6075         Define.
6076         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6077         internally.  Return non-zero if error, zero if success.
6078         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6079         Add __data.__futex field, reshuffle __data.__clock.
6080         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6081         Define.
6082         (lll_futex_requeue): Add val argument, return 1 unconditionally
6083         for the time being.
6084         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6085         Add __data.__futex field, reshuffle __data.__clock.
6086         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6087         Define.
6088         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6089         internally.  Return non-zero if error, zero if success.
6090         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6091         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6092         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6093         Define.
6094         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6095         internally.  Return non-zero if error, zero if success.
6096         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6097         Add __data.__futex field, reshuffle __data.__clock.
6098         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6099         Define.
6100         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6101         internally.  Return non-zero if error, zero if success.
6102         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6103         Add __data.__futex field, reshuffle __data.__clock.
6104         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6105         Add __data.__futex field, reshuffle __data.__clock.
6106         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6107         Increment __futex at the same time as __wakeup_seq or __total_seq.
6108         Pass address of __futex instead of address of low 32-bits of
6109         __wakeup_seq to futex syscall.
6110         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6111         Pass __futex value from before releasing internal lock
6112         to FUTEX_WAIT.
6113         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6114         Likewise.  Avoid unnecessary shadowing of variables.
6115         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6116         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6117         unlock and __futex address instead of address of low 32-bits of
6118         __wakeup_seq to futex_requeue macro, adjust for new return value
6119         meaning.
6120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6121         (__pthread_cond_signal): Increment __futex at the same time as
6122         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6123         address of low 32-bits of __wakeup_seq to futex syscall.
6124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6125         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6126         releasing internal lock to FUTEX_WAIT.
6127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6128         (__pthread_cond_timedwait): Likewise.
6129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6130         (FUTEX_CMP_REQUEUE): Define.
6131         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6132         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6133         Pass __futex value from before the unlock and __futex address instead
6134         of address of low 32-bits of __wakeup_seq to futex syscall.
6135         Fallback to FUTEX_WAKE all on any errors.
6136
6137 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6138
6139         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6140         Add nop to align the end of critical section.
6141         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6142
6143 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6144
6145         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6146         Add __broadcast_seq field.
6147         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6148         all waiters as woken with woken_seq and bump broadcast counter.
6149         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6150         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6151         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6152         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6153
6154 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6155
6156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6157         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6158         Reported by Kaz Kojima.
6159
6160 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6161
6162         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6163
6164 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6165
6166         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6167         __broadcast_seq with bc_seq after acquiring internal lock instead of
6168         before it.
6169
6170 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6171
6172         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6173         compilation.
6174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6175         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6176         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6177         (pthread_cond_t): Add __data.__broadcast_seq field.
6178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6179         (FRAME_SIZE): Define.
6180         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6181         Comment typo fixes.
6182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6183         Define.
6184         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6185         typo fixes.
6186         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6187         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6188         fixes.
6189
6190 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6191
6192         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6193         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6194         Add __broadcast_seq field.
6195         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6196         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6197         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6198         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6199         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6201         all waiters as woken with woken_seq and bump broadcast counter.
6202         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6204         __broadcast_seq field.
6205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6206         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6207         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6208         * pthread_cond_init.c: Initialize __broadcast_seq field.
6209         * Makefile (tests): Add tst-cond17 and tst-cond18.
6210         Add .NOTPARALLEL goal.
6211         * tst-cond16.c: New file.  From Jakub.
6212         * tst-cond17.c: New file.  From Jakub.
6213         * tst-cond18.c: New file.  From Jakub.
6214
6215 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6216
6217         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6218         unwind info.
6219
6220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6221         Parametrize frame size.  Correct some unwind info.
6222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6223
6224 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6225
6226         * tst-stack3.c: Note testing functionality beyond POSIX.
6227
6228 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6229
6230         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6231         Change conditional from ifdef to if.
6232
6233 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6234
6235         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6236         SYSDEP_CANCEL_ERROR): Define.
6237         (PSEUDO): Use it.
6238
6239 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6240
6241         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6242
6243 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6244
6245         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6246
6247 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6248
6249         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6250         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6251         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6252         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6253
6254 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6255
6256         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6257         thread has all signals blocked.
6258
6259 2004-04-18  Andreas Jaeger  <aj@suse.de>
6260
6261         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6262         (SEM_VALUE_MAX): Add missing brace.
6263
6264 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6265
6266         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6267         in rt subdir.
6268         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6269         * sysdeps/pthread/tst-mqueue8x.c: New test.
6270         * tst-cancel4.c: Update comment about message queues.
6271
6272         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6273         return it_value { 0, 0 }.
6274         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6275         like SIGEV_SIGNAL.
6276         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6277         assertion for SIGEV_NONE.
6278         (thread_attr_compare): Compare all attributes, not just a partial
6279         subset.
6280
6281 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6282
6283         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6284
6285 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6286
6287         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6288         Just use a plain number.
6289         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6290         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6291         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6292         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6293         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6294         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6295         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6296
6297 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6298
6299         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6300         frame info.
6301         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6302
6303 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6304
6305         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6306         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6307         of calling sigwaitinfo.
6308
6309 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6310
6311         * allocatestack.c (allocate_stack): Set reported_guardsize
6312         unconditionally.
6313         * pthread_getattr_np.c (pthread_getattr_np): Use
6314         reported_guardsize instead of guardsize.
6315         * descr.h (struct pthread): Add reported_guardsize field.
6316
6317 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6318
6319         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6320
6321 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6322
6323         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6324
6325 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6326
6327         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6328         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6329         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6330         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6331         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6332         Define.
6333         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6334         (_POSIX_MESSAGE_PASSING): Define.
6335         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6336         (_POSIX_MESSAGE_PASSING): Define.
6337         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6338         (_POSIX_MESSAGE_PASSING): Define.
6339
6340 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6341
6342         * tst-context1.c (fct): Check whether correct stack is used.
6343
6344 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6345
6346         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6347         matching constraints for asm mem parameters.
6348
6349         * tst-clock2.c (tf): Don't define unless needed.
6350
6351 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6352
6353         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6354         $(gnulib).
6355
6356 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6357
6358         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6359         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6360         * pthreadP.h: Declare __nptl_deallocate_tsd.
6361         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6362         Adjust caller.
6363
6364         * Makefile (tests): Add tst-tsd5.
6365         * tst-tsd5.c: New file.
6366
6367 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6368
6369         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6370         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6371         is SHLIB_COMPAT check.
6372         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6373         (__pthread_attr_getaffinity_old): Likewise.
6374         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6375         (__pthread_getaffinity_old): Likewise.
6376         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6377         (__pthread_setaffinity_old): Likewise.
6378
6379 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6380
6381         * allocatestack.c (_make_stacks_executable): Call
6382         _dl_make_stack_executable first.
6383
6384 2004-03-24  Roland McGrath  <roland@redhat.com>
6385
6386         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6387         constraint instead of "0".
6388
6389 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6390
6391         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6392         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6393
6394         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6395         code to avoid warning.
6396
6397 2004-03-24  Andreas Jaeger  <aj@suse.de>
6398
6399         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6400         (__pthread_attr_setaffinity_old): Remove const.
6401
6402 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6403
6404         * sysdeps/unix/sysv/linux/smp.h: New file.
6405         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6406         * init.c: Define __is_smp.
6407         (__pthread_initialize_minimal_internal): Call is_smp_system to
6408         initialize __is_smp.
6409         * pthreadP.h: Declare __is_smp.
6410         Define MAX_ADAPTIVE_COUNT is necessary.
6411         * pthread_mutex_init.c: Add comment regarding __spins field.
6412         * pthread_mutex_lock.c: Implement adaptive mutex type.
6413         * pthread_mutex_timedlock.c: Likewise.
6414         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6415         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6416         Add __spins field.
6417         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6418         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6419         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6420         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6421         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6422         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6423         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6424         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6425         lll_mutex_cond_trylock.
6426         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6427         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6428         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6429         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6430         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6431         Define BUSY_WAIT_NOP.
6432         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6433         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6434
6435         * tst-mutex5.c: Add support for testing adaptive mutexes.
6436         * tst-mutex7.c: Likewise.
6437         * tst-mutex5a.c: New file.
6438         * tst-mutex7a.c: New file.
6439         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6440
6441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6442         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6443         vgettimeofday call might destroy the content.
6444
6445         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6446         @pause in the loop.
6447
6448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6449         No need to restrict type of ret.  Make it int.  Add comment.
6450
6451         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6452         Remove unnecessary setne instruction.
6453
6454 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6455
6456         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6457         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6458         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6459         If realloc fails, break out of the loop.
6460
6461 2004-03-20  Andreas Jaeger  <aj@suse.de>
6462
6463         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6464         (__pthread_setaffinity_old): Fix interface.
6465         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6466         (__pthread_getaffinity_old): Likewise.
6467
6468         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6469         (__pthread_setaffinity_new): Remove duplicate declaration.
6470
6471 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6472
6473         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6474         the return value to a safe register.
6475         (CDISABLE): Set the function argument correctly.
6476
6477 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6478
6479         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6480         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6481         Rewrite so that only one locked memory operation per round is needed.
6482         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6483         (pthread_barrier_wait): After wakeup, release lock only when the
6484         last thread stopped using the barrier object.
6485         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6486         (__pthread_cond_wait): Don't store mutex address if the current
6487         value is ~0l.  Add correct cleanup support and unwind info.
6488         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6489         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6490         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6491         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6492         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6493         Add correct cleanup support and unwind info.
6494         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6495         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6496         information for syscall wrappers.
6497
6498 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6499
6500         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6501         cpusetsize field, remove next.
6502         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6503         parameter for size of the CPU set.
6504         (pthread_setaffinity_np): Likewise.
6505         (pthread_attr_getaffinity_np): Likewise.
6506         (pthread_attr_setaffinity_np): Likewise.
6507         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6508         interface change, keep compatibility code.
6509         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6510         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6511         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6512         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6513         __pthread_getaffinity_np.
6514         * Versions: Add version for changed interfaces.
6515         * tst-attr3.c: Adjust test for interface change.
6516         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6517         increasing buffer sizes.
6518         * pthread_attr_destroy.c: Remove unused list handling.
6519         * pthread_attr_init.c: Likewise.
6520
6521 2004-03-17  Roland McGrath  <roland@redhat.com>
6522
6523         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6524         first argument to clock_getres so we ever enable kernel timers.
6525
6526 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6527
6528         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6529
6530 2004-03-12  Richard Henderson  <rth@redhat.com>
6531
6532         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6533         oldvalue from CENABLE to CDISABLE.
6534
6535 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6536
6537         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6538         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6539         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6540         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6541
6542 2004-03-11  Richard Henderson  <rth@redhat.com>
6543
6544         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6545         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6546         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6547
6548 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6549
6550         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6551         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6552         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6553
6554 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6555
6556         * forward.c (__pthread_cond_broadcast_2_0,
6557         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6558         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6559         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6560
6561 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6562
6563         * sysdeps/sh/tcb-offsets.sym: Add PID.
6564         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6565         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6566
6567 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6568
6569         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6570         include <sysdep-cancel.h>, vfork is no cancellation point.
6571         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6572         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6573         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6574
6575 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6576
6577         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6578         libc_hidden_def.
6579         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6580         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6581         Likewise.
6582         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6583         Likewise.
6584         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6585         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6586         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6587         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6588         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6589
6590         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6591         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6592         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6593         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6594         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6595         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6596
6597         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6598         a local register for saving old PID.  Negate PID in parent upon exit.
6599
6600         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6601         tcb-offsets.h.
6602         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6603         before syscall, set to the old value in the parent afterwards.
6604         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6605         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6606         tcb-offsets.h.
6607         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6608         before syscall, set to the old value in the parent afterwards.
6609         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6610         * sysdeps/s390/tcb-offsets.sym: Add PID.
6611
6612         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6613         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6614         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6615         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6616         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6617         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6618
6619 2004-03-10  Andreas Schwab  <schwab@suse.de>
6620
6621         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6622         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6623         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6624
6625 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6626
6627         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6628         * tst-cancel21.c (do_one_test): Likewise.
6629         Reported by Gordon Jin <gordon.jin@intel.com>.
6630
6631 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6632
6633         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6634         if non-zero and set to INT_MIN if zero.
6635         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6636         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6637         (SAVE_PID, RESTORE_PID): Define.
6638         (__vfork): Use it.
6639         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6640         Use relative path to avoid including NPTL i386/vfork.S.
6641         (SAVE_PID, RESTORE_PID): Define.
6642         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6643         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6644         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6645         tst-vfork2x.
6646         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6647         * tst-vfork1.c: New test.
6648         * tst-vfork2.c: New test.
6649         * tst-vfork1x.c: New test.
6650         * tst-vfork2x.c: New test.
6651
6652 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6653
6654         * sysdeps/i386/tcb-offsets.sym: Add PID.
6655         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6656         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6657         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6658
6659 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6660
6661         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6662
6663 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6664
6665         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6666         _rtld_global_ro.
6667
6668 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6669
6670         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6671         _rtld_global_ro.
6672
6673         * tst-once4.c: Remove unnecessary macro definition.
6674
6675         * tst-mutex7.c (do_test): Limit thread stack size.
6676         * tst-once2.c (do_test): Likewise.
6677         * tst-tls3.c (do_test): Likewise.
6678         * tst-tls1.c (do_test): Likewise.
6679         * tst-signal3.c (do_test): Likewise.
6680         * tst-kill6.c (do_test): Likewise.
6681         * tst-key4.c (do_test): Likewise.
6682         * tst-join4.c (do_test): Likewise.
6683         * tst-fork1.c (do_test): Likewise.
6684         * tst-context1.c (do_test): Likewise.
6685         * tst-cond2.c (do_test): Likewise.
6686         * tst-cond10.c (do_test): Likewise.
6687         * tst-clock2.c (do_test): Likewise.
6688         * tst-cancel10.c (do_test): Likewise.
6689         * tst-basic2.c (do_test): Likewise.
6690         * tst-barrier4.c (do_test): Likewise.
6691
6692 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6693
6694         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6695
6696 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6697
6698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6699         (__pthread_cond_timedwait): Optimize wakeup test.
6700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6701         (__pthread_cond_wait): Likewise.
6702         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6703         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6704         Likewise.
6705
6706 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6707
6708         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6709         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6710         the atomic instruction needed.
6711         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6712         (__lll_mutex_lock_wait): Likewise.
6713
6714 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6715
6716         * Makefile (tests): Add tst-cond14 and tst-cond15.
6717         * tst-cond14.c: New file.
6718         * tst-cond15.c: New file.
6719
6720 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6721
6722         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6723         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6724         needs to be implemented differently to be useful.
6725
6726 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6727
6728         * pthread_attr_setschedparam.c: Don't test priority against limits
6729         here.  Set ATTR_FLAG_SCHED_SET flag.
6730         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6731         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6732         from parent thread to child.  If attribute is used and scheduling
6733         parameters are not inherited, copy parameters from attribute or
6734         compute them.  Check priority value.
6735         * pthread_getschedparam.c: If the parameters aren't known yet get
6736         them from the kernel.
6737         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6738         ATTR_FLAG_POLICY_SET flag for thread.
6739         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6740         and ATTR_FLAG_POLICY_SET.
6741
6742         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6743
6744         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6745         fail if stack address hasn't been set.  Just return 0.
6746
6747 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6748
6749         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6750         libpthread for the files in this list.
6751         (CFLAGS-tst-unload): Removed.
6752         * tst-unload.c (do_test): Don't use complete path for
6753         LIBPHREAD_SO.
6754
6755         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6756         tst-_res1mod2.
6757
6758 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6759
6760         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6761         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6762         operation per round is needed.
6763         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6764         (__lll_mutex_lock_wait): Likewise.
6765
6766 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6767
6768         * tst-cancel9.c (cleanup): Don't print to stderr.
6769
6770 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6771
6772         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6773
6774 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6775
6776         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6777         (__syscall_error_handler2): Call CDISABLE.
6778         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6779         (__syscall_error_handler2): Call CDISABLE.
6780
6781         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6782         Release lock before the loop, don't reacquire it.
6783
6784         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6785
6786 2004-02-19  Andreas Schwab  <schwab@suse.de>
6787
6788         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6789         Fix last change.
6790
6791 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6792
6793         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6794         (pthread_barrier_wait): After wakeup, release lock only when the
6795         last thread stopped using the barrier object.
6796         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6797         (pthread_barrier_wait): Likewise.
6798         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6799         Likewise.
6800         * Makefile (tests): Add tst-barrier4.
6801         * tst-barrier4.c: New file.
6802
6803         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6804         (__pthread_cond_timedwait): Perform timeout test while holding
6805         internal lock to prevent wakeup race.
6806         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6807         * sysdeps/pthread/pthread_cond_timedwait.c
6808         (__pthread_cond_timedwait): Likewise.
6809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6810         (__pthread_cond_timedwait): Likewise.
6811
6812 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6813
6814         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6815         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6816         * Makefile (tests): Add tst-rwlock13.
6817         * tst-rwlock13.c: New test.
6818
6819 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6820
6821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6822         (__condvar_tw_cleanup): Little optimization.
6823         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6824
6825 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6826
6827         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6828         libpthread as "lib" parameter to SHLIB_COMPAT.
6829         (__novmx_siglongjmp): Fix typo in function name.
6830         (__novmx_longjmp): Fix typo in function name.
6831
6832 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6833
6834         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6835         __builtin_expect.
6836
6837         * sysdeps/generic/pt-longjmp.c: Moved to...
6838         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6839
6840 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6841
6842         * Makefile (libpthread-routines): Add pt-cleanup.
6843         * pt-longjmp.c: Removed.
6844         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6845         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6846         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6847         Version longjmp, siglongjmp for GLIBC_2.3.4.
6848         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6849
6850 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6851
6852         * sysdeps/pthread/pthread_cond_timedwait.c
6853         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6854         Reuse code.  Add __builtin_expects.
6855
6856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6857         (__pthread_cond_timedwait): Get internal lock in case timeout has
6858         passed before the futex syscall.
6859         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6860
6861 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6862
6863         * allocatestack.c: Pretty printing.
6864
6865         * sysdeps/pthread/createthread.c (create_thread): Don't add
6866         CLONE_DETACHED bit if it is not necessary.
6867
6868 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6869
6870         * pthread_getattr_np.c: Include ldsodefs.h.
6871
6872 2004-01-16  Richard Henderson  <rth@redhat.com>
6873
6874         * allocatestack.c: Don't declare __libc_stack_end.
6875         * init.c (__pthread_initialize_minimal_internal): Likewise.
6876         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6877
6878 2004-01-15  Richard Henderson  <rth@redhat.com>
6879
6880         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6881         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6882         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6883         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6884         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6885         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6886         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6887         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6888
6889 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6890
6891         * init.c (pthread_functions): Make array const.
6892
6893 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6894
6895         * allocatestack.c (__make_stacks_executable): Change interface.
6896         Check parameters.  Pass parameter on to libc counterpart.
6897         * pthreadP.h: Change declaration.
6898
6899 2004-01-13  Richard Henderson  <rth@redhat.com>
6900
6901         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6902         prototype form.
6903         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6904         Likewise.
6905
6906         * sysdeps/alpha/Makefile: New file.
6907         * sysdeps/alpha/tcb-offsets.sym: New file.
6908         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6909         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6910
6911         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6912         on powerpc version.
6913
6914 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6915
6916         * Makefile (tests): Add tst-backtrace1.
6917         * tst-backtrace1.c: New test.
6918
6919 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6920
6921         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6922         register as second parameter to the REGISTER macro.
6923         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6924         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6925         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6926         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6927         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6928         of thread register as second parameter to REGISTER macro in 64 case.
6929
6930 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6931
6932         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6933         (CFLAGS-getpid.o): Defined.
6934         (CFLAGS-getpid.os): Defined.
6935
6936 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6937
6938         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6939         returned for main thread does not overlap with any other VMA.
6940         Patch by Jakub Jelinek.
6941
6942 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6943
6944         * tst-raise1.c: Include stdio.h.
6945
6946 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6947
6948         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6949         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6950         If pid is 0, set it to selftid.
6951         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6952         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6953         != 0, return self->tid without doing a syscall.
6954         * descr.h (struct pthread): Move pid field after tid.
6955
6956         * Makefile (tests): Add tst-raise1.
6957         * tst-raise1.c: New file.
6958
6959 2003-12-23  Roland McGrath  <roland@redhat.com>
6960
6961         * tst-oddstacklimit.c: New file.
6962         * Makefile (tests): Add it.
6963         (tst-oddstacklimit-ENV): New variable.
6964
6965         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6966         value up to page size for __default_stacksize.
6967
6968 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6969
6970         * Makefile (tests): Add tst-eintr5.
6971         * tst-eintr5.c: New file.
6972
6973         * eintr.c (eintr_source): Prevent sending signal to self.
6974
6975         * tst-eintr2.c (tf1): Improve error message.
6976
6977 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6978
6979         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6980         * sysdeps/unix/sysv/linux/getpid.c: New file.
6981         * pthread_cancel.c: Add comment explaining use of PID field.
6982         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6983         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6984         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6985         temporarily to signal the field must not be relied on and updated
6986         by getpid().
6987         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6988         temporarily negative.
6989         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6990
6991 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6992
6993         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6994         (eintr_source): If ARG != NULL, use pthread_kill.
6995         * tst-eintr1.c: Adjust for this change.
6996         * tst-eintr2.c: Likewise.
6997         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6998         * tst-eintr3.c: New file.
6999         * tst-eintr4.c: New file.
7000
7001 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7002
7003         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7004         if CANCELSTATE_BITMASK is set.
7005         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7006         Likewise.
7007
7008         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7009         (tests-reverse): Add tst-cancel23.
7010         * tst-cancel22.c: New test.
7011         * tst-cancel23.c: New test.
7012
7013 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7014
7015         * tst-eintr1.c: Better error messages.
7016
7017         * Makefile (tests): Add tst-eintr2.
7018         * tst-eintr2.c: New file.
7019
7020 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7021
7022         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7023         (CFLAGS-tst-cancelx21.c): Set.
7024         * tst-cancel21.c: New test.
7025         * tst-cancelx21.c: New test.
7026
7027         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7028         comparison operand.
7029         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7030         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7031         * pt-longjmp.c: Include jmpbuf-unwind.h.
7032         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7033         _JMPBUF_UNWINDS.  Adjust compared pointers.
7034         * init.c (__pthread_initialize_minimal_internal): Initialize
7035         pd->stackblock_size.
7036         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7037         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7038         * sysdeps/i386/jmpbuf-unwind.h: New file.
7039         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7040         * sysdeps/s390/jmpbuf-unwind.h: New file.
7041         * sysdeps/sh/jmpbuf-unwind.h: New file.
7042         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7043         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7044         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7045         (_JMPBUF_CFA_UNWINDS): Remove.
7046         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7047
7048 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7049
7050         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7051         (CFLAGS-tst-cancelx20.c): Set.
7052         * tst-cancel20.c: New test.
7053         * tst-cancelx20.c: New test.
7054
7055 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7056
7057         * init.c (__pthread_initialize_minimal_internal): Don't treat
7058         architectures with separate register stack special here when
7059         computing default stack size.
7060
7061 2003-12-17  Roland McGrath  <roland@redhat.com>
7062
7063         * Makefile (tst-cancelx7-ARGS): New variable.
7064         Reportd by Greg Schafer <gschafer@zip.com.au>.
7065
7066 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7067
7068         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7069         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7070         (tst-stack3-ENV): Set.
7071         ($(objpfx)tst-stack3-mem): New.
7072         * tst-stack3.c: New test.
7073
7074 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7075
7076         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7077         Add unwind directives.  Drop unused .regstk directive.
7078         (_fini_EPILOG_BEGINS): Add unwind directives.
7079
7080 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7081
7082         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7083         Assume parameter is a pointer.
7084         (lll_futex_wake): Likewise.
7085         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7086         Likewise.
7087         (lll_futex_wake): Likewise.
7088         Reported by Boris Hu.
7089         * sysdeps/unix/sysv/linux/unregister-atfork.c
7090         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7091
7092         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7093
7094 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7095
7096         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7097         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7098         __rtld_lock_initialize for ld.so lock.
7099         Patch in part by Adam Li <adam.li@intel.com>.
7100
7101 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7102
7103         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7104         in $(gnulib).  Also, remove stale comment.
7105
7106 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7107
7108         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7109         advantage of new syscall stub and optimize accordingly.
7110
7111         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7112         from SYS_futex, to match expectations of
7113         sysdep.h:DO_INLINE_SYSCALL.
7114         (lll_futex_clobbers): Remove.
7115         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7116         (lll_futex_wake): Likewise.
7117         (lll_futex_requeue): Likewise.
7118         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7119         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7120         Jelinek).
7121         (__lll_mutex_lock): Likewise.
7122         (__lll_mutex_cond_lock): Likewise.
7123         (__lll_mutex_timed_lock): Likewise.
7124         (__lll_mutex_unlock): Likewise.
7125         (__lll_mutex_unlock_force): Likewise.
7126
7127         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7128         comes before the include of <sysdep.h>.
7129         (THREAD_SELF_SYSINFO): New macro.
7130         (THREAD_SYSINFO): Likewise.
7131         (INIT_SYSINFO): New macro.
7132         (TLS_INIT_TP): Call INIT_SYSINFO.
7133
7134         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7135
7136         * sysdeps/pthread/createthread.c (create_thread): Use
7137         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7138         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7139         THREAD_SELF_SYSINFO instead of open code.
7140         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7141         (THREAD_SYSINFO): Likewise.
7142
7143         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7144
7145         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7146
7147 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7148
7149         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7150         instead of .init.  Patch by David Mosberger.
7151
7152 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7153
7154         * sysdeps/pthread/configure.in: Remove broken declaration in C
7155         cleanup handling check.
7156
7157 2003-11-30  Andreas Jaeger  <aj@suse.de>
7158
7159         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7160         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7161         Likewise.
7162
7163 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7164
7165         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7166         * pthread_attr_destroy.c: Include shlib-compat.h.
7167         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7168         is set in iattr->flags.
7169         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7170
7171 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7172
7173         * Makefile (distribute): Add tst-cleanup4aux.c.
7174
7175         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7176         include.
7177
7178 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7179
7180         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7181         pthread_cond_signal.
7182
7183         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7184         store mutex address if the current value is ~0l.
7185         * sysdeps/pthread/pthread_cond_timedwait.c
7186         (__pthread_cond_timedwait): Likewise.
7187         * sysdeps/pthread/pthread_cond_broadcast.c
7188         (__pthread_cond_broadcast): Don't use requeue for pshared
7189         condvars.
7190
7191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7192         (__pthread_cond_wait): Don't store mutex address if the current
7193         value is ~0l.
7194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7195         (__pthread_cond_timedwait): Likewise.
7196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7197         (__pthread_cond_broadcast): Don't use requeue for pshared
7198         condvars.
7199
7200         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7201         element with ~0l for pshared condvars, with NULL otherwise.
7202
7203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7204         (__pthread_cond_wait): Don't store mutex address if the current
7205         value is ~0l.
7206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7207         (__pthread_cond_timedwait): Likewise.
7208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7209         (__pthread_cond_broadcast): Don't use requeue for pshared
7210         condvars.
7211
7212         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7213         * tst-cond12.c: New file.
7214         * tst-cond13.c: New file.
7215
7216 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7217
7218         * sysdeps/pthread/configure.in: Make missing forced unwind support
7219         fatal.
7220
7221 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7222
7223         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7224
7225 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7226
7227         * Makefile: Add magic to clean up correctly.
7228
7229 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7230
7231         * unwind.c (FRAME_LEFT): Define.
7232         (unwind_stop): Handle old style cleanups here.
7233         (__pthread_unwind): Handle old style cleanups only if
7234         !HAVE_FORCED_UNWIND.
7235         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7236         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7237         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7238         ($(objpfx)tst-cleanupx4): Likewise.
7239         * tst-cleanup4.c: New test.
7240         * tst-cleanup4aux.c: New.
7241         * tst-cleanupx4.c: New test.
7242
7243 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7244
7245         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7246         lll_mutex_*lock macros to skip atomic operations on some archs.
7247
7248 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7249
7250         * sysdeps/pthread/tst-timer.c (main): Initialize
7251         sigev2.sigev_value as well.
7252
7253 2003-10-15  Roland McGrath  <roland@redhat.com>
7254
7255         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7256         is missing.
7257         * sysdeps/pthread/configure: Regenerated.
7258
7259 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7260
7261         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7262         locking macros.  No distinction between normal and mutex locking
7263         anymore.
7264         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7265         Merge bits from lowlevelmutex.S we still need.
7266         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7267         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7268         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7269         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7270         new mutex implementation.
7271         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7272         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7273         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7274         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7276         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7277         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7278         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7279         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7280         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7281         symbol for entry point to avoid cancellation.
7282
7283 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7284
7285         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7286         changes.
7287         (SAVE_OLDTYPE_0): Fix a typo.
7288
7289 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7290
7291         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7292         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7293
7294 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7295
7296         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7297         correct offset.
7298
7299 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7300
7301         * Makefile (tests): Add tst-cancel19.
7302         * tst-cancel19.c: New test.
7303
7304 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7305
7306         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7307         restoring of the old cancellation type.
7308
7309 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7310
7311         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7312
7313 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7314
7315         * sysdeps/pthread/malloc-machine.h: New file
7316
7317 2003-09-24  Roland McGrath  <roland@redhat.com>
7318
7319         * allocatestack.c (__make_stacks_executable): Don't ignore return
7320         value from _dl_make_stack_executable.
7321
7322 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7323
7324         * allocatestack.c (__make_stacks_executable): Also change
7325         permission of the currently unused stacks.
7326
7327         * allocatestack.c (change_stack_perm): Split out from
7328         __make_stacks_executable.
7329         (allocate_stack): If the required permission changed between the time
7330         we started preparing the stack and queueing it, change the permission.
7331         (__make_stacks_executable): Call change_stack_perm.
7332
7333         * Makefile: Build tst-execstack-mod locally.
7334         * tst-execstack-mod.c: New file.
7335
7336 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7337
7338         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7339
7340 2003-09-23  Roland McGrath  <roland@redhat.com>
7341
7342         * tst-execstack.c: New file.
7343         * Makefile (tests): Add it.
7344         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7345         (LDFLAGS-tst-execstack): New variable.
7346
7347         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7348         whether to use PROT_EXEC for stack mmap.
7349         (__make_stacks_executable): New function.
7350         * pthreadP.h: Declare it.
7351         * init.c (__pthread_initialize_minimal_internal): Set
7352         GL(dl_make_stack_executable_hook) to that.
7353
7354 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7355
7356         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7357         recommendation from AMD re avoidance of lock prefix.
7358
7359 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7360
7361         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7362         lll_futex_timed_wait instead of lll_futex_wait.
7363         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7364         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7365         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7366         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7367         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7368         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7369         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7370         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7371         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7372         Completely revamp the locking macros.  No distinction between
7373         normal and mutex locking anymore.
7374         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7375         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7376         __lll_lock_timedwait): Fix prototypes.
7377         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7378         __lll_lock_timedwait): Likewise.
7379         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7380         macros, add __builtin_expect.
7381         (lll_mutex_timedlock): Likewise.  Fix return value.
7382         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7383         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7384         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7385         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7386         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7387         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7388         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7389         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7390
7391 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7392
7393         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7394         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7395         operation if possible.
7396
7397         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7398         like jumping over the lock prefix.
7399
7400 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7401
7402         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7403         locking macros.  No distinction between normal and mutex locking
7404         anymore.
7405         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7407         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7408         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7409         locking.  Merge bits from lowlevelmutex.S we still need.
7410         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7411         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7412         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7413         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7414         * Makefile (routines): Remove libc-lowlevelmutex.
7415         (libpthread-rountines): Remove lowlevelmutex.
7416         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7417         for new mutex implementation.
7418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7419         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7423         Likewise.
7424         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7425         Likewise.
7426         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7427         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7428         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7431         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7433         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7434         Likewise.
7435         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7436         Likewise.
7437         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7438         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7440         Don't use requeue.
7441         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7442         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7443
7444 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7445
7446         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7447         in parameters of asm with output parameters.
7448
7449         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7450         type of DECR parameter to int.
7451         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7452
7453 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7454
7455         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7456         guardsize for each thread.
7457
7458 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7459
7460         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7461         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7462         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7463
7464         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7465         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7466         NULL.
7467         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7468         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7469         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7470         (pthread_getaffinity_np): Add hidden_def.
7471
7472         * Makefile (tests): Add tst-attr3.
7473         * tst-attr3.c: New test.
7474
7475         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7476
7477 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7478
7479         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7480         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7481
7482 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7483
7484         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7485         * tst-align.c: Include tst-stack-align.h.
7486         (tf, do_test): Use TEST_STACK_ALIGN macro.
7487
7488 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7489
7490         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7491         variable.
7492
7493 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7494
7495         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7496         stack-related values for the initial thread.
7497
7498 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7499
7500         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7501
7502 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7503
7504         * pthread_mutex_lock.c: Minor code rearrangements.
7505
7506 2003-09-05  Roland McGrath  <roland@redhat.com>
7507
7508         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7509         Instead, include ../nptl_db/db_info.c to do its magic.
7510         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7511         (__pthread_pthread_key_2ndlevel_size): Likewise.
7512         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7513         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7514         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7515         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7516         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7517         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7518         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7519         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7520         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7521         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7522         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7523         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7524         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7525         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7526         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7527         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7528         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7529
7530 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7531
7532         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7533         of pthread_t to be compatible with LT.
7534         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7535         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7536         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7537         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7538         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7539         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7540         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7541
7542 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7543
7544         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7545
7546 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7547
7548         * unwind-forcedunwind.c: Move to...
7549         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7550         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7551         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7552         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7553         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7554         * unwind.c: Include jmpbuf-unwind.h.
7555         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7556
7557 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7558
7559         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7560         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7561         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7562         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7563         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7564         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7565         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7566         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7567         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7568         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7569         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7570         function.
7571         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7572         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7573         * Makefile (tests): Add tst-stack2.
7574         * tst-stack2.c: New test.
7575         * tst-stack1.c: Include limits.h and sys/param.h.
7576         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7577
7578         * pthread_condattr_setpshared.c: Include errno.h.
7579         (pthread_condattr_setpshared): Return EINVAL if pshared
7580         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7581
7582         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7583         defined symbol for entry point to avoid cancellation.
7584         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7585         Likewise.
7586         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7587         Likewise.
7588         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7589         Likewise.
7590         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7591         Likewise.
7592         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7593         Likewise.
7594         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7595         __close_nocancel, __read_nocancel, __write_nocancel,
7596         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7597         libpthread.so or librt.so, define to corresponding function
7598         without _nocancel suffix.
7599         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7600         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7601         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7602
7603         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7604
7605 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7606
7607         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7608         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7609
7610         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7611         in subsections has a symbol associated with it.
7612
7613         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7614         defined symbol for entry point to avoid cancellation.
7615         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7616
7617 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7618
7619         * Makefile (tests): Add tst-tls5.
7620         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7621         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7622         ($(objpfx)tst-tls5): New.
7623         ($(objpfx)tst-tls6.out): Likewise.
7624         (tests): Depend on $(objpfx)tst-tls6.out.
7625         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7626         (do_test): Check pthread_self () return value alignment.
7627         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7628         (tf): Check pthread_self () return value alignment.
7629         * tst-tls5.c: New test.
7630         * tst-tls5.h: New.
7631         * tst-tls5mod.c: New.
7632         * tst-tls5moda.c: New.
7633         * tst-tls5modb.c: New.
7634         * tst-tls5modc.c: New.
7635         * tst-tls5modd.c: New.
7636         * tst-tls5mode.c: New.
7637         * tst-tls5modf.c: New.
7638         * tst-tls6.sh: New test.
7639
7640         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7641         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7642         * init.c (pthread_functions): Initialize them.
7643         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7644         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7645         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7646         pthread_cond_timedwait@@GLIBC_2.3.2.
7647
7648 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7649
7650         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7651         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7652         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7653         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7654         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7655         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7656
7657         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7658
7659         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7660         _POSIX_THREAD_PRIORITY_SCHEDULING.
7661         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7662
7663 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7664
7665         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7666         nested function, use static inline function from libio.h.
7667         Code by Richard Henderson.
7668
7669         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7670         weak.
7671
7672 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7673
7674         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7675         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7676         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7677         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7678         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7679         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7680         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7681         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7682         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7683         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7684         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7685         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7686         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7687         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7688         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7689         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7690         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7691         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7692         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7693         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7694         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7695         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7696         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7697         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7698         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7699         * sysdeps/sparc/tls.h: New file.
7700         * sysdeps/sparc/tcb-offsets.sym: New file.
7701         * sysdeps/sparc/Makefile: New file.
7702         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7703         * init.c [__sparc__] (__NR_set_tid_address): Define.
7704
7705 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7706
7707         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7708         _IO_release_lock): Define.
7709
7710 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7711
7712         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7713         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7714
7715 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7716
7717         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7718         (__pthread_cleanup_class): Add missing return types of member
7719         functions.
7720
7721 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7722
7723         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7724         (lll_mutex_unlock_force): Add memory barrier between store and futex
7725         syscall.
7726
7727 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7728
7729         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7730         tempmsg in first loop.
7731
7732 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7733
7734         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7735         _POSIX_THREAD_PRIORITY_SCHEDULING.
7736         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7737
7738 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7739
7740         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7741         (__rtld_lock_default_lock_recursive,
7742         __rtld_lock_default_unlock_recursive): Define.
7743         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7744         __rtld_lock_unlock_recursive): Define using
7745         GL(_dl_rtld_*lock_recursive).
7746         * init.c (__pthread_initialize_minimal_internal): Initialize
7747         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7748         Lock GL(_dl_load_lock) the same number of times as
7749         GL(_dl_load_lock) using non-mt implementation was nested.
7750
7751         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7752         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7753
7754 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7755
7756         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7757         PIPE_BUF.
7758
7759 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7760
7761         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7762
7763 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7764
7765         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7766         to first syscall error check.  Move syscall error check for tkill
7767         into __ASSUME_CLONE_STOPPED #ifdef.
7768
7769 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7770
7771         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7772         is not defined, do explicit synchronization.
7773         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7774         is not defined also unlock pd->lock for non-debugging case in case
7775         it is necessary.
7776         * pthread_create.c (start_thread): Always get and release pd->lock
7777         if __ASSUME_CLONE_STOPPED is not defined.
7778         (start_thread_debug): Removed.  Adjust users.
7779         * allocatestack.c (allocate_stack): Always initialize lock if
7780         __ASSUME_CLONE_STOPPED is not defined.
7781         * Makefile (tests): Add tst-sched1.
7782         * tst-sched1.c: New file.
7783
7784         * sysdeps/pthread/createthread.c (do_clone): Only use
7785         sched_setschduler and pass correct parameters.
7786
7787 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7788
7789         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7790         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7791         PTHREAD_STACK_MIN in comments.
7792
7793 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7794
7795         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7796         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7797         argument.
7798         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7799         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7800         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7801         (__pthread_cleanup_upto): Fix prototype.
7802         (_longjmp_unwind): Adjust caller.
7803         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7804         Change second argument to const struct pointer.
7805         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7806         * tst-sem9.c (main): Likewise.
7807         * unwind.c: Include string.h for strlen prototype.
7808
7809 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7810
7811         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7812         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7813         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7814         Define HAVE_CMOV.
7815         Patch by Nicholas Miell <nmiell@attbi.com>.
7816
7817 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7818
7819         * init.c (__pthread_initialize_minimal_internal): Initialize
7820         GL(dl_init_static_tls).
7821         * pthreadP.h (__pthread_init_static_tls): New prototype.
7822         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7823         New functions.
7824         * Makefile (tests): Add tst-tls4.
7825         (modules-names): Add tst-tls4moda and tst-tls4modb.
7826         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7827         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7828         tst-tls4modb.so.
7829         * tst-tls4.c: New file.
7830         * tst-tls4moda.c: New file.
7831         * tst-tls4modb.c: New file.
7832
7833 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7834
7835         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7836         before __timer_dealloc.
7837         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7838         Don't call list_unlink.
7839
7840 2003-07-29  Roland McGrath  <roland@redhat.com>
7841
7842         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7843
7844 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7845
7846         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7847         Don't reuse struct aiocb A if it failed.
7848         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7849         not just one byte, as that does not block.
7850
7851 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7852
7853         * sysdeps/pthread/unwind-resume.c: New file.
7854         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7855         unwind-resume in csu subdir.
7856         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7857         exceptions.
7858         (librt-sysdep_routines, librt-shared-only-routines): Add
7859         rt-unwind-resume.
7860         * sysdeps/pthread/rt-unwind-resume.c: New file.
7861         * unwind-forcedunwind.c: New file.
7862         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7863         (libpthread-shared-only-routines): Likewise.
7864         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7865         * pthreadP.h (pthread_cancel_init): New prototype.
7866         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7867
7868         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7869         attr argument const struct pthread_attr *.
7870
7871         * res.c (__res_state): Return __resp.
7872         * descr.h: Include resolv.h.
7873         (struct pthread): Add res field.
7874         * pthread_create.c: Include resolv.h.
7875         (start_thread): Initialize __resp.
7876         * Makefile (tests): Add tst-_res1.
7877         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7878         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7879         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7880         libpthread.
7881         * tst-_res1.c: New file.
7882         * tst-_res1mod1.c: New file.
7883         * tst-_res1mod2.c: New file.
7884
7885 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7886
7887         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7888
7889         * Makefile: Define various *-no-z-defs variables for test DSOs
7890         which has undefined symbols.
7891
7892 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7893
7894         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7895         Retry if the stwcx fails to store once_control.
7896
7897 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7898
7899         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7900         pthread_attr_setaffinity.
7901         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7902         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7903         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7904         * pthread_attr_destroy.c: Free cpuset element if allocated.
7905         * pthread_create.c: Pass iattr as additional parameter to
7906         create_thread.
7907         * sysdeps/pthread/createthread.c: If attribute is provided and
7908         a new thread is created with affinity set or scheduling parameters,
7909         start thread with CLONE_STOPPED.
7910         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7911         pthread_attr_setaffinity.
7912         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7913         cpuset element.
7914
7915 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7916
7917         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7918
7919 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7920
7921         * sysdeps/pthread/configure.in: Require CFI directives also for
7922         ppc and s390.
7923
7924 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7925
7926         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7927         Add cfi directives.
7928
7929 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7930
7931         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7932         CLEANUP_JMP_BUF.
7933         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7934         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7935         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7936         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7937         not self pointer in __writer.  Compare with TID to determine
7938         deadlocks.
7939         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7940         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7941         Likewise.
7942         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7943         Likewise.
7944         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7945         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7946         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7947         macros also when compiling librt.
7948
7949 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7950
7951         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7952         -fasynchronous-unwind-tables.
7953         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7954         (PSEUDO): Add cfi directives.
7955         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7956         Likewise.
7957         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7958         Likewise.
7959
7960 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7961
7962         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7963         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7964         * unwind.c (__pthread_unwind_next): Add hidden_def.
7965         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7966         Likewise.
7967         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7968         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7969         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7970         Likewise.
7971         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7972         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7973         Likewise.
7974         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7975         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7976         __pthread_unregister_cancel and __pthread_unwind_next.
7977
7978 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7979
7980         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7981         different symbol for the cancellation syscall wrapper and
7982         non-cancellation syscall wrapper.
7983         (PSEUDO_END): Define.
7984
7985 2003-07-05  Richard Henderson  <rth@redhat.com>
7986
7987         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7988         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7989         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7990         return actual return value from the syscall, not 0.
7991
7992 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7993
7994         * descr.h (struct pthread): Add pid field.
7995         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7996         (__reclaim_stacks): Likewise.
7997         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7998         also check for PID of the signal source.
7999         (__pthread_initialize_minimal_internal): Also initialize pid field
8000         of initial thread's descriptor.
8001         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8002         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8003         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8004         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8005         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8006
8007 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8008
8009         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8010         Fix use of parameter.
8011         (__libc_cleanup_pop): Likewise.
8012
8013 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8014
8015         * init.c (sigcancel_handler): Change parameters to match handler
8016         for SA_SIGACTION.  Check signal number and code to recognize
8017         invalid invocations.
8018
8019 2003-07-03  Roland McGrath  <roland@redhat.com>
8020
8021         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8022         Apply sizeof (struct pthread) bias to r13 value.
8023
8024 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8025
8026         * sysdeps/pthread/configure.in: Require CFI directives.
8027
8028         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8029         definition.
8030         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8031         libpthread compilation.
8032         * unwind.c (__pthread_unwind): Add hidden_def.
8033         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8034
8035 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8036
8037         * libc-cancellation.c (__libc_cleanup_routine): Define.
8038         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8039         (__pthread_cleanup_pop): Define.
8040
8041 2003-07-01  Richard Henderson  <rth@redhat.com>
8042
8043         * sysdeps/alpha/elf/pt-initfini.c: New file.
8044         * sysdeps/alpha/pthread_spin_lock.S: New file.
8045         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8046         * sysdeps/alpha/pthreaddef.h: New file.
8047         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8048         * sysdeps/alpha/tls.h: New file.
8049         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8050         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8051         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8052         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8053         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8054         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8055         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8056         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8057         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8058         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8059
8060 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8061
8062         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8063         cleanup support and unwind info.
8064
8065 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8066
8067         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8068         Use correct cleanup handler registration.  Add unwind info.
8069         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8070         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8071         * tst-once3.c: Add cleanup handler and check it is called.
8072         * tst-once4.c: Likewise.
8073         * tst-oncex3.c: New file.
8074         * tst-oncex4.c: New file.
8075         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8076
8077 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8078
8079         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8080
8081 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8082
8083         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8084         (tf_msgsnd): Likewise.
8085
8086         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8087         premature returns a bit more.
8088
8089 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8090
8091         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8092         definition to the front.
8093
8094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8095         the cleanup functions to make the names unique.  Fix dwarf opcode
8096         un unwind table.
8097         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8098         functions to make the names unique.  Fix CFA offset for two blocks.
8099
8100 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8101
8102         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8103         missing closing braces.
8104         Patch by Christophe Saout <christophe@saout.de>.
8105
8106 2003-06-24  Roland McGrath  <roland@redhat.com>
8107
8108         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8109
8110 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8111
8112         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8113         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8114
8115         * pthreadP.h: Declare __find_thread_by_id.
8116         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8117         * pthread_clock_gettime.c: Allow using other thread's clock.
8118         * pthread_clock_settime.c: Likewise.
8119         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8120         * Makefile: Add rules to build and run tst-clock2.
8121         * tst-clock2.c: New file.
8122
8123 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8124
8125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8126         to use exception-based cleanup handler.
8127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8128
8129         * tst-cond8.c (ch): Announce that we are done.
8130
8131         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8132
8133         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8134         Also test aio_suspend with timeout value.
8135
8136 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8137
8138         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8139         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8140         attribute_hidden.
8141
8142         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8143         (__pthread_mutex_lock_internal): Likewise.
8144         (__pthread_mutex_unlock_internal): Likewise.
8145         (__pthread_mutex_unlock_usercnt): Declare.
8146         * pthread_mutex_destroy.c: Always fail if used in any way.
8147         * pthread_mutex_init.c: Update comment.
8148         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8149         * pthread_mutex_timedlock.c: Adjust __nusers.
8150         * pthread_mutex_trylock.c: Adjust __nusers.
8151         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8152         and public interfaces are wrapper with pass additional parameter.
8153         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8154         parameter zero.
8155         * tst-mutex8.c: New file.
8156         * Makefile (tests): Add tst-mutex8.
8157         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8158         __pthread_mutex_unlock_usercnt.
8159         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8161         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8162         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8164         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8165         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8166         Add __nusers.
8167         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8168         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8169         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8170         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8171         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8172
8173         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8174         * pthread_mutex_timedlock.c: Likewise.
8175         * pthread_mutex_trylock.c: Adjust __nusers.
8176         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8177         * tst-mutex9.c: New file.
8178         * Makefile (tests): Add tst-mutex9.
8179         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8180         * sysdeps/ia64/tls.h: Likewise.
8181         * sysdeps/powerpc/tls.h: Likewise.
8182         * sysdeps/s390/tls.h: Likewise.
8183         * sysdeps/sh/tls.h: Likewise.
8184         * sysdeps/x86_64/tls.h: Likewise.
8185         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8186         Change type of __owner.
8187         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8188         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8189         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8190         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8192
8193 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8194
8195         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8196         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8197
8198         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8199         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8200         instead of nr to lll_futex_wake.  Only set errno and return -1
8201         if err < 0.
8202
8203         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8204         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8205         return actual return value from the syscall, not 0.
8206
8207 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8208
8209         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8210         find a random value.
8211         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8212         errno==EIDRM.
8213
8214         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8215         compat_timer_settime.
8216         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8217         compat_timer_gettime.
8218         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8219         compat_timer_getoverrun.
8220         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8221         compat_timer_delete.
8222
8223         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8224         error-checking mutex detect busy mutexes.
8225
8226 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8227
8228         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8229         Add ax to clobber list.
8230         (lll_mutex_cond_lock): Likewise.
8231         (lll_mutex_unlock): Likewise.
8232         (lll_lock): Likewise.
8233         (lll_unlock): Likewise.
8234
8235         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8236         * tst-cancel18.c: New file.
8237         * tst-cancelx18.c: New file.
8238
8239         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8240         and tcdrain.
8241
8242         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8243         * tst-cancel17.c: New file.
8244         * tst-cancelx17.c: New file.
8245
8246         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8247         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8248         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8249
8250         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8251
8252 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8253
8254         * sysdeps/pthread/createthread.c (create_thread): Set
8255         header.multiple_threads unconditionally.
8256         * allocatestack.c (allocate_stack): Likewise.
8257         * descr.h (struct pthread): Add header.multiple_threads
8258         unconditionally.
8259         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8260         Define for librt.  #error if neither libpthread, libc nor librt.
8261         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8262         Likewise.
8263         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8264         CDISABLE): Likewise.
8265         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8266         CDISABLE): Likewise.
8267         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8268         CDISABLE): Likewise.
8269         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8270         CDISABLE): Likewise.  Access header.multiple_threads outside of
8271         libc and libpthread.
8272         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8273         Likewise.
8274         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8275         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8276
8277 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8278
8279         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8280         Also test early cancellation before the thread reaches the cancellation
8281         point.
8282
8283         * Makefile: Compile forward.c with exceptions.
8284
8285         * sysdeps/unix/sysv/linux/sleep.c: New file.
8286
8287 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8288
8289         * Makefile: Add CFLAGS definition to compile function wrappers
8290         duplicated from libc with exceptions.
8291         * tst-cancel4.c: Also check cancellation handlers.
8292
8293         * Makefile: Add rules to build and run tst-cancel16 and
8294         tst-cancelx16.  Add missing CFLAGS definitions.
8295         * tst-cancel16.c: New file.
8296         * tst-cancelx16.c: New file.
8297
8298 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8299
8300         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8301         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8302         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8303         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8304
8305         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8306         (LIBC_CANCEL_RESET): Likewise.
8307         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8308         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8309         librt-cancellation.
8310         (CFLAGS-libcrt-cancellation.c): Define.
8311         * sysdeps/pthread/librt-cancellation.c: New file.
8312         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8313         macros also when compiling librt.
8314         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8315         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8316         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8317         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8318         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8319         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8320         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8321
8322         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8323         compat_timer_create.
8324
8325 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8326
8327         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8328
8329         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8330         __register_atfork.
8331         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8332         Add libc_hidden_def.
8333
8334 2003-06-13  Roland McGrath  <roland@redhat.com>
8335
8336         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8337         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8338
8339 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8340
8341         * allocatestack.c (queue_stack): Always inline.
8342         * ptreadhP.h (__do_cancel): Likewise.
8343
8344 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8345
8346         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8347         a typo.
8348
8349 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8350
8351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8352         (__pthread_cond_signal): Remove incorrect second addition for
8353         cond_lock!=0.
8354
8355 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8356
8357         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8358         (__pthread_cond_signal): Use correct futex pointer in
8359         __lll_mutex_lock_wait call.
8360
8361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8362         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8363
8364 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8365
8366         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8367         cancelable.
8368         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8369         Likewise.
8370
8371         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8372         hand-written CFI generation code.  Since ENTRY/END also initiated
8373         CFI frames this caused two CFI sets to be generated.
8374
8375 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8376
8377         * cleanup_routine.c: New file.
8378         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8379         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8380         cleanup handling.
8381         * Makefile (libpthread-routines): Add cleanup_routine.
8382         Add more CFLAGS variables to compile with exceptions.  Add comments
8383         why which file needs unwind tables.
8384         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8385         tests.
8386         * tst-cancelx1.c: New file.
8387         * tst-cancelx2.c: New file.
8388         * tst-cancelx3.c: New file.
8389         * tst-cancelx4.c: New file.
8390         * tst-cancelx5.c: New file.
8391         * tst-cancelx6.c: New file.
8392         * tst-cancelx7.c: New file.
8393         * tst-cancelx8.c: New file.
8394         * tst-cancelx9.c: New file.
8395         * tst-cancelx10.c: New file.
8396         * tst-cancelx11.c: New file.
8397         * tst-cancelx12.c: New file.
8398         * tst-cancelx13.c: New file.
8399         * tst-cancelx14.c: New file.
8400         * tst-cancelx15.c: New file.
8401         * tst-cleanupx0.c: New file.
8402         * tst-cleanupx0.expect: New file.
8403         * tst-cleanupx1.c: New file.
8404         * tst-cleanupx2.c: New file.
8405         * tst-cleanupx3.c: New file.
8406
8407         * tst-cleanup0.c: Make standard compliant.
8408         * tst-cleanup1.c: Likewise.
8409
8410         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8411         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8412         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8413         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8414         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8415         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8416         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8417         CLEANUP_JMP_BUF.
8418         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8419         * tst-cancel12.c: New file.
8420         * tst-cancel13.c: New file.
8421         * tst-cancel14.c: New file.
8422         * tst-cancel15.c: New file.
8423         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8424         and tst-cancel15.
8425
8426         * tst-cancel1.c: Add some comments.
8427
8428         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8429         timeout correctly.
8430
8431 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8432
8433         * Makefile (CFLAGS-pthread_cancel.c): Define.
8434
8435 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8436
8437         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8438         Change type of __writer element to int.
8439         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8440         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8441         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8442         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8443         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8444         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8445         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8446         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8447         Compare with TID to determine deadlocks.
8448         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8449         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8450         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8451         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8453         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8454         Likewise.
8455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8456         Likewise.
8457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8459         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8460         Likewise.
8461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8462         Likewise.
8463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8464         * Makefile (tests): Add tst-rwlock12.
8465         * tst-rwlock12.c: New file.
8466
8467 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8468
8469         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8470         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8471         Remove bogus hidden_proto.
8472         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8473         Likewise.
8474         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8475         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8476         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8477         ___lll_mutex_timedlock): Likewise.
8478
8479 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8480
8481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8482         (__pthread_cond_signal): Add some code to eventually handle
8483         cond_lock!=0.
8484
8485 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8486
8487         * Makefile (tests): Add tst-exec4.
8488         (tst-exec4-ARGS): Define.
8489         * tst-exec4.c: New file.
8490
8491 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8492
8493         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8494         Also fail if tv_nsec < 0.
8495         (__lll_timedwait_tid): Likewise.
8496         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8497         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8498         Likewise.
8499         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8500         Likewise.
8501         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8502         Likewise.
8503         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8504         Likewise.
8505         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8506         Likewise.
8507         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8508         Likewise.
8509
8510         * Makefile (tests): Add tst-sem8 and tst-sem9.
8511         * tst-sem8.c: New file.
8512         * tst-sem9.c: New file.
8513         * sem_open.c: Fix creation of in_use record if the file exists but
8514         no internal record.
8515
8516         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8517         definitions.
8518
8519         * sysdeps/pthread/timer_create.c (timer_create): In case
8520         evp==NULL, assign timer ID to sival_ptr.
8521
8522         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8523         struct pthread_unwind_buf *.
8524         (struct pthread): Likewise for cleanup_jmp_buf element.
8525
8526         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8527         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8528         * unwind.c (__pthread_unwind_next): Likewise.
8529
8530 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8531
8532         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8533         (lll_futex_timed_wait): Use int for futex value parameter.
8534         (lll_futex_wake): Likewise.
8535         (lll_futex_requeue): Likewise.
8536
8537         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8538         Replace one memory operation with one register operation.
8539
8540         * tst-join4.c (do_test): Fix error message.
8541
8542         * tst-rwlock6.c (do_test): Use correct format specifier.
8543
8544         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8545         (__lll_mutex_lock_wait): Replace one memory operation with one
8546         register operation.
8547         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8548         (__lll_mutex_lock_wait): Likewise.
8549
8550         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8551         (__lll_mutex_cond_lock): Add one to value parameter of
8552         __lll_lock_wait to reflect reality in the futex syscall.
8553         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8554         (lll_mutex_cond_lock): Likewise.
8555
8556 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8557
8558         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8559         New function.
8560         (lll_mutex_cond_lock): Define.
8561
8562 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8563
8564         * Makefile (tests): Add tst-signal6.
8565         * tst-signal6.c: New file.
8566
8567         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8568         (__lll_mutex_unlock_force): New function
8569         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8570
8571         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8572         (__lll_mutex_unlock_force): New function.
8573         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8574
8575         * tst-rwlock7.c (do_test): Use correct format specifier.
8576
8577         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8578         Find break parameter in correct asm argument.
8579
8580 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8581
8582         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8583         Remove out4.
8584         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8585         error occured.
8586         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8587         Add __mutex.
8588         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8589         lll_futex_requeue, lll_mutex_unlock_force): Define.
8590
8591 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8592
8593         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8594         (pthread_cond_t): Add __mutex.
8595         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8596         lll_futex_requeue, lll_mutex_unlock_force): Define.
8597
8598 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8599
8600         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8601         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8602         Add __mutex field.
8603         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8604         Define.
8605         (lll_futex_wait, lll_futex_wake): Define.
8606         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8607         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8608         FUTEX_REQUEUE instead of FUTEX_WAIT.
8609         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8610         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8611         mutex which was used in condvar structure.  Call
8612         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8613         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8614
8615         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8616         include tcb-offsets.h.  Read wakeup value in locked region.
8617         Use the value of gbr register as THREAD_ID.
8618         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8619         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8620         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8621
8622         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8623         macros.
8624
8625 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8626
8627         * sysdeps/pthread/pthread_cond_broadcast.c
8628         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8629
8630 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8631
8632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8633         typo in register name.
8634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8635         correctly.  Actually use requeue.  Little optimization.
8636         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8637         mutex address early.  Handle cancellation state as 32-bit value.
8638         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8639         Remove unnecessary label.
8640
8641 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8642
8643         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8644         instead of FUTEX_WAIT.
8645         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8646         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8650         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8651         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8652         of __pthread_mutex_lock_internal.
8653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8654         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8655         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8656         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8659         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8660         Add pthread_mutex_cond_lock.
8661         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8662         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8663         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8664         lll_mutex_cond_lock.
8665         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8666         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8667         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8668         Add __mutex field.
8669         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8670         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8671
8672         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8673         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8674
8675         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8676         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8677         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8678         macro don't define aliases.
8679
8680         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8681         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8682         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8683         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8686         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8689
8690 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8691
8692         * sem_open.c: Fix one endless loop.  Implement correct semantics
8693         wrt opening the same semaphore more then once.
8694         * sem_close.c: Adjust for sem_open change.
8695         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8696         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8697         * Makefile (tests): Add tst-sem7.
8698         * tst-sem7.c: New file.
8699
8700 2003-05-16  Roland McGrath  <roland@redhat.com>
8701
8702         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8703         uninitialized variable braino.
8704
8705 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8706
8707         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8708         test for syscall availability.
8709
8710         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8711         __no_posix_timers to -1 if the syscalls don't exist.
8712
8713         * pthread_join.c (pthread_join): Set tid field of the joined
8714         thread to -1.  This isn't necessary but helps to recognize some
8715         error conditions with almost no cost.
8716
8717         * allocatestack.c (FREE_P): Also negative values indicate an
8718         unused stack.
8719
8720         * unwind.c: Include <unistd.h>.
8721
8722 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8723
8724         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8725
8726 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8727
8728         * Makefile (crti-objs, crtn-objs): New variables.
8729         (omit-deps, extra-objs): Add crtn.
8730         ($(objpfx)libpthread.so): Depend on both crti and crtn
8731         and links to them in multidir.
8732         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8733
8734 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8735
8736         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8737         (lll_mutex_unlock): Use atomic_exchange_rel.
8738
8739 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8740
8741         * cond-perf.c (cons): Add missing locking around setting of alldone.
8742
8743 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8744
8745         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8746         related macros.
8747         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8748
8749 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8750
8751         * tst-sem6.c: New file.
8752         * Makefile (tests): Add tst-sem6.
8753
8754         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8755         Use atomic_exchange_rel instead of atomic_exchange.
8756         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8757         Likewise.
8758
8759         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8760         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8761         vsyscall is possible.
8762
8763         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8764         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8765         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8766         pthread_setaffinity_np.
8767         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8768         and pthread_setaffinity_np.
8769         * Makefile (libpthread-routines): Add pthread_getaffinity and
8770         pthread_setaffinity.
8771
8772         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8773         use it in case mmap to allocate the stack fails.
8774         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8775         ARCH_MAP_FLAGS here.
8776         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8777         ARCH_RETRY_MMAP.
8778
8779 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8780
8781         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8782         handler implementation.  It is now lockless in fork().
8783         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8784         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8785         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8786         declare the __fork_*_lists.
8787         (struct fork_handler): Include pointers to all three functions.
8788         Add next, refcntr and need_signal elements.
8789         (__fork_handlers): New declaration.
8790         (__register_atfork_malloc): Remove declaration.
8791         (HAVE_register_atfork_malloc): Remove definition.
8792         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8793         __pthread_child_handler variable.
8794         (__libc_pthread_init): Use __register_atfork instead of explicitly
8795         adding to the list.
8796         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8797         and lll_futex_wake.
8798         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8799
8800         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8801         function must never be reached.
8802
8803         * cond-perf.c: New file.
8804
8805 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8806
8807         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8808
8809 2003-05-04  Roland McGrath  <roland@redhat.com>
8810
8811         * Makefile ($(objpfx)../libc.so): New target.
8812
8813 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8814
8815         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8816         (pthread_condattr_t): Size is only an int, don't use long for
8817         alignment.
8818         (pthread_mutexattr_t): Likewise.
8819         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8820         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8821         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8822
8823 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8824
8825         * sysdeps/i386/tls.h: Define THREAD_ID.
8826         * sysdeps/ia64/tls.h: Likewise.
8827         * sysdeps/powerpc/tls.h: Likewise.
8828         * sysdeps/s390/tls.h: Likewise.
8829         * sysdeps/sh/tls.h: Likewise.
8830         * sysdeps/x86_64/tls.h: Likewise.
8831         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8832         record ownership.
8833         * pthread_mutex_timedlock.c: Likewise.
8834         * pthread_mutex_trylock.c: Likewise.
8835         * pthread_mutex_unlock.c: Likewise.
8836         * pthread_rwlock_trywrlock.c: Likewise.
8837         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8838         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8839         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8840         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8841
8842         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8843         flag.
8844
8845 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8846
8847         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8848         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8849         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8850         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8851         Make __align long long instead of long.
8852         (pthread_rwlock_t): Formatting.
8853         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8854         (pthread_rwlock_t): Formatting.
8855         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8856         (pthread_cond_t): Make __align long long instead of long.
8857         (pthread_rwlock_t): Move __flags field to the same position as in
8858         linuxthreads.
8859
8860 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8861
8862         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8863         * tst-rwlock7.c (do_test): Likewise.
8864
8865 2003-04-26  Roland McGrath  <roland@redhat.com>
8866
8867         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8868
8869 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8870
8871         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8872         sizeof (struct pthread).
8873         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8874         1 struct pthread.
8875         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8876         to 0.
8877         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8878         struct pthread.
8879         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8880         to 32-bit bytes.
8881         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8882         tcbp.
8883         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8884         unneccessarily.
8885         (NO_TLS_OFFSET): Define.
8886         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8887         add TLS_TCB_SIZE unnecessarily.
8888
8889 2003-04-22  Roland McGrath  <roland@redhat.com>
8890
8891         * Makeconfig (shared-thread-library): Reverse link order to work
8892         around linker bug.
8893
8894 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8895
8896         * semaphore.h: Fix typo in comment.
8897
8898 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8899
8900         * sysdeps/pthread/sigfillset.c: New file.
8901
8902         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8903         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8904         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8905         * sysdeps/pthread/sigaction.c: Likewise.
8906         * sysdeps/pthread/sigprocmask.c: New file.
8907         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8908         __SIGRTMIN+1.
8909         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8910         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8911         in this case.
8912
8913 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8914
8915         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8916         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8917
8918         * sysdeps/unix/sysv/linux/unregister-atfork.c
8919         (__unregister_atfork): Don't free memory not allocated dynamically.
8920
8921         * semaphore.h: Remove __THROW marker from cancellation points.
8922         * nptl/sysdeps/pthread/pthread.h: Likewise.
8923
8924 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8925
8926         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8927         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8928         __THROW.
8929
8930 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8931
8932         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8933
8934 2003-04-15  Roland McGrath  <roland@redhat.com>
8935
8936         * forward.c (__pthread_unwind): Tweak to avoid warning.
8937
8938 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8939
8940         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8941
8942 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8943
8944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8945         overflow CFA advance instructions.
8946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8947
8948 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8949
8950         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8951         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8952         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8953         defined.
8954
8955         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8956         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8957         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8958         DW_CFA_advance_loc for .Laddl-.Lsubl.
8959
8960 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8961
8962         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8963         position-independent unwind data for static libraries.
8964         Add missing unwind info.  Add comments.
8965
8966         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8968         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8970
8971 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8972
8973         * Makefile: Make sure all cancellation points are compiled with
8974         exception and asynchronous unwind tables.
8975
8976         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8977         which mishandles loading of global object addresses in PIC.
8978         (THREAD_SETMEM_NC): Likewise.
8979
8980 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8981
8982         * pthread.h: Define new data structure for cleanup buffer.  Declare
8983         new cleanup handler interfaces.
8984         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8985         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8986         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8987         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8988         it.  Declare old cleanup handler installation functions.
8989         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8990         handling.
8991         * cleanup_defer.c: Likewise.
8992         * cleanup_compat.c: New file.  Old cleanup code.
8993         * cleanup_def_compat.c: New file.  Old cleanup code.
8994         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8995         if own thread descriptor.
8996         * unwind.c: New file.
8997         * forward.c: Add __pthread_unwind.
8998         * init.c (pthread_functions): Add __pthread_unwind.
8999         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9000         Add ptr___pthread_unwind.
9001         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9002         and unwind function.
9003         * Makefile (libpthread-routines): Add cleanup_compat,
9004         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9005         table generation if necessary.
9006         * version.c: Record whether unwind support is compiled in.
9007         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9008         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9009         handler interfaces.
9010         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9011         complication to generate unwind information for syscall wrappers.
9012         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9013         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9014         __cleanup_fct_attribute.
9015
9016         * Makefile: Add rules to build and run tst-cleanup0.
9017         * tst-cleanup0.c: New file.
9018         * tst-cleanup0.expect: New file.
9019
9020         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9021         caller.  Optimize to avoid often unecessary local variable.
9022
9023 2003-04-11  Roland McGrath  <roland@redhat.com>
9024
9025         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9026         sets variable `multidir'; include that.
9027         (generated): Add it.
9028         ($(objpfx)$(multidir)/crti.o): New target.
9029         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9030
9031 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9032
9033         * tst-attr2.c (do_test): Add cast to avoid warning.
9034         * tst-mutex4.c (do_test): Likewise.
9035
9036 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9037
9038         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9039         in child.
9040
9041 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9042
9043         * Makefile (tests): Add tst-detach1.
9044         * tst-detach1.c: New file.
9045
9046 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9047
9048         * sysdeps/pthread/pthread.h: Remove duplicate
9049         pthread_cleanup_{push,pop} definitions.
9050
9051         * tst-barrier2.c: Eliminate warnings.
9052         * tst-cancel4.c: Likewise.
9053         * tst-cond4.c: Likewise.
9054         * tst-cond6.c: Likewise.
9055         * tst-detach1.c: Likewise.
9056         * tst-rwlock4.c: Likewise.
9057         * tst-rwlock6.c: Likewise.
9058         * tst-rwlock7.c: Likewise.
9059         * tst-sem3.c: Likewise.
9060         * tst-spin2.c: Likewise.
9061         * tst-umask1.c: Likewise.
9062
9063 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9064
9065         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9066
9067 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9068
9069         * descr.h (struct pthread): Move cancelhandling member to the front.
9070
9071 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9072
9073         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9074         malloc_parent, and malloc_child statically.
9075         (__register_atfork_malloc): New function.
9076         (free_mem): Don't free any of the malloc_* variables on the list.
9077         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9078         Define HAVE_register_atfork_malloc.
9079
9080 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9081
9082         * sysdeps/pthread/createthread.c (create_thread): Add some more
9083         comments explaining when to set multiple_threads and when not.
9084
9085         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9086         THREAD_ATOMIC_BIT_SET if not already defined.
9087         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9088         THREAD_ATOMIC_BIT_SET:
9089         * sysdeps/x86_64/tls.h: Likewise.
9090         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9091         THREAD_ATOMIC_CMPXCHG_VAL.
9092         (_pthread_cleanup_pop_restore): Likewise.
9093         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9094         (__pthread_enable_asynccancel_2): Likewise.
9095         (__pthread_disable_asynccancel): Likewise.
9096         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9097         (__libc_disable_asynccancel): Likewise.
9098         * init.c (sigcancel_handler): Likewise.
9099         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9100         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9101
9102 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9103
9104         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9105         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9106         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9107         * Makefile (tests): Add tst-cancel11.
9108         * tst-cancel11.c: New file.
9109
9110 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9111
9112         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9113         round, not the first.  Use specific_used flag instead of local
9114         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9115         (__free_tcb): Don't call deallocate_tsd here.
9116         (start_thread): Call deallocate_tsd here.
9117         * pthread_setspecific.c: Set specific_used flag really only when
9118         needed.
9119         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9120         * tst-tsd3.c: New file.
9121         * tst-tsd4.c: New file.
9122
9123 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9124
9125         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9126         Use atomic_exchange_and_add instead of __lll_add.
9127         (__lll_mutex_timedlock): Likewise.
9128         Patch by Ian Wienand.
9129
9130 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9131
9132         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9133         (SINGLE_THREAD_P): Fix typo.
9134         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9135
9136 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9137
9138         * Makefile (tests): Add tst-align.
9139         * tst-align.c: New file.
9140         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9141
9142         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9143         function correctly.
9144
9145         * tst-tsd2.c: Add casts to avoid warnings.
9146
9147 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9148
9149         * descr.h (struct pthread): Move most often used elements to the front.
9150
9151 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9152
9153         * Makefile (libpthread-routines): Add pthread_atfork.
9154         (libpthread-static-only-routines): Add pthread_atfork.
9155
9156 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9157
9158         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9159         of TLS_DTV_AT_TP.
9160         (INSTALL_DTV): Add parens.
9161         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9162         Use passed descr instead of THREAD_SELF.
9163         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9164         (__lll_mutex_timedlock_wait): Correct expected value after
9165         spurious wakeup.
9166         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9167         Release lock before waking up the waiters.
9168         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9169         criteria.  Reorderstruct passed to cleanup handler.  Fix
9170         handling of cancellation and failung pthread_mutex_unlock call.
9171         Use __pthread_enable_asynccancel_2 instead of
9172         __pthread_enable_asynccancel.
9173         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9174         Return result of lock re-get if it fails.
9175         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9176         for __pthread_cleanup_push.
9177         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9178         completely broken rwlock implementation.
9179         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9180         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9184         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9185         versioned_symbol macro.
9186         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9187         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9188
9189 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9190
9191         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9192         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9193         and __helper_tid.
9194         (struct timer): Remove th and bar field.
9195         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9196         debugging code.  Create only one helper thread.
9197         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9198         helper thread.
9199         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9200         Renamed.  Define statically.  Use thread info from siginfo.
9201         (__helper_once): New variable.
9202         (__helper_tid): New variable.
9203         (__reset_helper_control): New function.
9204         (__start_helper_thread): New function.
9205
9206         * pthread_create.c (start_thread): Don't use setjmp inside
9207         __builtin_expect to work around gcc bug.
9208
9209         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9210         timer_delete syscall fails, but not with ENOSYS, set
9211         __no_posix_timers.
9212
9213         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9214         (timer_settime): Fix typo.
9215         * sysdeps/unix/sysv/linux/timer_getoverr.c
9216         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9217
9218 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9219
9220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9221         offset of cleanupbuf.__prev.
9222
9223 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9224
9225         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9226         of included file.
9227
9228 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9229
9230         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9231         NULL provide default definition to syscall.
9232
9233 2003-03-25  Roland McGrath  <roland@redhat.com>
9234
9235         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9236         (timer_id2ptr): Fix typo.
9237
9238 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9239
9240         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9241         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9242         * sysdeps/ia64/pthreaddef.h: Likewise.
9243         * sysdeps/powerpc/pthreaddef.h: Likewise.
9244         * sysdeps/s390/pthreaddef.h: Likewise.
9245         * sysdeps/sh/pthreaddef.h: Likewise.
9246         * sysdeps/x86_64/pthreaddef.h: Likewise.
9247         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9248         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9249         being changed.
9250         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9251         SIGTIMER is not unblocked.
9252         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9253         RT signal taken.
9254         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9255         be send.
9256         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9257         pass pointer through as ID.
9258         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9259         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9260         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9261         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9262         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9263         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9264         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9265         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9266         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9267         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9268         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9269         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9270         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9271         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9272         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9273         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9274         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9275         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9277         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9278         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9279         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9280         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9281         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9282         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9283         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9284         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9285         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9286         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9287         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9288         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9289         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9290         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9291
9292         * pthreadP.h: Remove FRAME_LEFT definition.
9293         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9294         already left frame.  Programs which have this problem are not POSIX
9295         compliant.
9296         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9297
9298 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9299
9300         * sysdeps/pthread/tst-timer.c: Check return values of the
9301         functions we test.
9302
9303 2003-03-23  Roland McGrath  <roland@redhat.com>
9304
9305         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9306         * tst-tls3mod.c: Likewise.
9307         * tst-tls1.c: Likewise.
9308         * tst-tls2.c: Likewise.
9309
9310         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9311         undefined behavior.
9312
9313         * tst-join5.c (tf1, tf2): Add a cast.
9314
9315         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9316
9317         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9318         Don't test anything.
9319         * tst-cond4.c: Likewise.
9320         * tst-cond6.c: Likewise.
9321         * tst-flock2.c: Likewise.
9322         * tst-mutex4.c: Likewise.
9323         * tst-rwlock4.c: Likewise.
9324         * tst-signal1.c: Likewise.
9325         * tst-spin2.c: Likewise.
9326         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9327
9328         * tst-mutex4.c: Use test-skeleton.c.
9329         * tst-spin2.c: Likewise.
9330         * tst-sysconf.c: Likewise.
9331         * tst-barrier2.c: Likewise.
9332         * tst-cond4.c: Likewise.
9333         * tst-cond6.c: Likewise.
9334         * tst-rwlock4.c: Likewise.
9335         * tst-unload.c: Likewise.
9336         * tst-flock2.c (do_test): Use return instead of exit.
9337
9338 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9339
9340         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9341
9342 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9343
9344         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9345         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9346         instead of __lll_compare_and_swap.
9347         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9348         Likewise.
9349         Removed definition if __lll_compare_and_swap.
9350
9351         * cancellation.c: Adjust for new form of compare&exchange macros.
9352         * cleanup_defer.c: Likewise.
9353         * init.c: Likewise.
9354         * libc-cancellation.c: Likewise.
9355         * old_pthread_cond_broadcast.c: Likewise.
9356         * old_pthread_cond_signal.c: Likewise.
9357         * old_pthread_cond_timedwait.c: Likewise.
9358         * old_pthread_cond_wait.c: Likewise.
9359         * pthread_cancel.c: Likewise.
9360         * pthread_create.c: Likewise.
9361         * pthread_detach.c: Likewise.
9362         * pthread_join.c: Likewise.
9363         * pthread_key_delete.c: Likewise.
9364         * pthread_setcancelstate.c: Likewise.
9365         * pthread_setcanceltype.c: Likewise.
9366         * pthread_timedjoin.c: Likewise.
9367         * pthread_tryjoin.c: Likewise.
9368         * sysdeps/pthread/createthread.c: Likewise.
9369
9370 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9371
9372         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9373         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9374         definitions.  Replace uses with calls to atomic_* functions.
9375         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9376         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9377         __lll_test_and_set calls with atomic_exchange_and_add and
9378         atomic_exchange calls respectively.
9379         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9380         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9381         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9382         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9383         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9384         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9385         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9386
9387         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9388         returns the old value.
9389
9390 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9391
9392         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9393         int for variable OLDVAL and correct inline assembler contraint.
9394         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9395         type int for variable OLD.
9396
9397         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9398         only for s390-32.
9399         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9400         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9401         instead of multiple_threads field in the TCB.
9402
9403 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9404
9405         * sysdeps/i386/i686/bits/atomic.h: Removed.
9406         * sysdeps/i386/i586/bits/atomic.h: Removed.
9407         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9408         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9409         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9410         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9411         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9412         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9413         * atomic.h: Removed.  Moved to glibc.
9414
9415         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9416         support for clock selection.
9417
9418         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9419         signalling waiters.
9420
9421 2003-03-18  Roland McGrath  <roland@redhat.com>
9422
9423         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9424         Add __lll_rel_instr first.  Add memory clobber.
9425         (lll_mutex_unlock): Use __lll_test_and_set.
9426         From Paul Mackerras <paulus@samba.org>.
9427
9428         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9429         unconditionally.
9430         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9431         (SINGLE_THREAD_P):  Add `header.' prefix.
9432         From Paul Mackerras <paulus@samba.org>.
9433
9434         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9435         pthread_timedjoin_np to ...
9436         (libpthread: GLIBC_2.3.3): ... here.
9437         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9438
9439         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9440         Avoid shadowing VAL variable.
9441
9442         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9443         New macro.
9444
9445 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9446
9447         * Makefile (tests): Add tst-cond11.
9448         * tst-cond11.c: New file.
9449
9450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9451         struct passed to cleanup handler to eliminate one more
9452         instruction.
9453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9454
9455         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9456         (pthrad_cond_t): Replace __unused field with __clock.
9457
9458         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9459         waken all waiters in cleanup handler.
9460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9462
9463         * pthread_condattr_getclock.c: New file.
9464         * pthread_condattr_setclock.c: New file.
9465         * sysdeps/pthread/pthread.h: Declare these new functions.
9466         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9467         * Makefile (libpthread-routines): Add the new functions.
9468         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9469         Renamed field to value.  Document use of the bits.
9470         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9471         change.
9472         * pthread_condattr_setpshared.c: Likewise.
9473         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9474         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9475         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9476         Add __clock field.
9477         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9478         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9479         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9480         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9482         Implement clock selection.
9483         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9484         * pthread-errnos.sym: Add ENOSYS.
9485         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9486         _POSIX_CLOCK_SELECTION.
9487         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9488
9489         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9490         invalid .size directive.
9491
9492 2003-03-17  Roland McGrath  <roland@redhat.com>
9493
9494         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9495         Formatting tweaks.
9496
9497 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9498
9499         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9500         Use __lll_add instead of spelling it out.  Use protected symbol names.
9501         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9502         Use __lll_add.
9503         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9504         Renamed from lll_compare_and_swap.  Use new name where necessary.
9505         (__lll_add): Defined.
9506         (__lll_dec_if_positive): Defined.
9507         (__lll_test_and_set): Defined.
9508         * sysdeps/ia64/pthread_spin_init.c: Removed.
9509         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9510         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9511         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9512         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9513         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9514         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9515         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9516         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9517         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9518         __sync_lock_release_si.
9519         Patch by Jakub Jelinek.
9520
9521         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9522         Fix timeout handling.
9523         (__lll_timedwait_tid): Likewise.
9524         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9525         Patch by Jakub Jelinek.
9526
9527         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9528
9529 2003-03-17  Roland McGrath  <roland@redhat.com>
9530
9531         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9532         * sysdeps/pthread/pthread_spin_init.c: New file.
9533         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9534         * sysdeps/powerpc/Makefile: New file.
9535         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9536         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9537         * sysdeps/powerpc/pthreaddef.h: New file.
9538         * sysdeps/powerpc/tcb-offsets.sym: New file.
9539         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9540         * sysdeps/powerpc/tls.h: New file.
9541         * sysdeps/powerpc/bits/atomic.h: New file.
9542         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9543         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9544         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9545
9546         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9547         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9548         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9549         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9550         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9551         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9552         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9553         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9554         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9555         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9556         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9557         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9558         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9559         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9560         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9561
9562         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9563         not gettimeofday.
9564         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9565         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9566         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9567         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9568         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9569
9570 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9571
9572         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9573         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9576         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9577
9578 2003-03-16  Roland McGrath  <roland@redhat.com>
9579
9580         * tst-fork4.c: Include <string.h>.
9581         * tst-signal2.c: Likewise.
9582         * tst-mutex5.c (do_test): exit -> return.
9583         * tst-mutex2.c: Include <stdlib.h>.
9584
9585 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9586
9587         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9588         (__lll_mutex_timedlock_wait): Correct expected value after
9589         spurious wakeup.  Otherwise we would never wait again.
9590
9591         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9592         zone versus inline asm stupidity.  Use correct instructions.
9593
9594         * tst-rwlock6.c: Add some more status output.
9595
9596 2003-03-15  Roland McGrath  <roland@redhat.com>
9597
9598         * sysdeps/pthread/configure.in: New file.
9599         * sysdeps/pthread/configure: New file (generated).
9600
9601 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9602
9603         * allocatestack.c (allocate_stack): Store the exact stack size of
9604         user allocated stacks.
9605
9606 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9607
9608         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9609         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9610         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9611         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9612         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9613         Use `header.' prefix.
9614         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9615
9616 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9617
9618         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9619         __builtin_frame_address, use stack pointer.
9620
9621         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9622         instead of __builtin_frame_pointer.
9623
9624 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9625
9626         * tst-basic1.c (do_test): Add cast to avoid warning.
9627         * tst-basic2.c (do_test): Likewise.
9628
9629         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9630         amount of stack correction.
9631
9632         * tst-fork4.c: Use test-skeleton.c.
9633
9634 2003-03-14  Roland McGrath  <roland@redhat.com>
9635
9636         * init.c: Fix typo "#eli" for "#else".
9637
9638 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9639
9640         * allocatestack.c (__stack_user): Use hidden_data_def.
9641         * pthread_create.c (__pthread_keys): Likewise.
9642
9643         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9644
9645 2003-03-14  Roland McGrath  <roland@redhat.com>
9646
9647         * tst-fork4.c: New file.
9648         * Makefile (tests): Add it.
9649
9650         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9651         we always define the padding space.
9652         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9653         stopped supporting its own extensions fully.
9654         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9655         struct also called `header', so `header.multiple_threads' is the field
9656         name to use on all machines.
9657         * allocatestack.c (allocate_stack): Use `header.' prefix.
9658         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9659         * pthread_create.c (__pthread_create_2_1): Likewise.
9660         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9661         (THREAD_SELF): Likewise.
9662         * sysdeps/x86_64/tls.h: Likewise.
9663         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9664         (SINGLE_THREAD_P): Likewise.
9665         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9666         (SINGLE_THREAD_P): Likewise.
9667         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9668         (SINGLE_THREAD_P): Likewise.
9669
9670         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9671         value directly.
9672
9673 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9674
9675         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9676         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9677
9678         * pthread_create.c (start_thread): setjmp is expected to return 0.
9679
9680         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9681         (THREAD_GETMEM_NC): Likewise.
9682
9683 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9684
9685         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9686         and the size of the stack which must be allocated is a multiple,
9687         allocate one more page.
9688         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9689         MULTI_PAGE_ALIASING.
9690
9691 2003-03-13  Roland McGrath  <roland@redhat.com>
9692
9693         * pthread_create.c (start_thread): Set EXITING_BIT after the
9694         event-reporting (and destructors), not before.
9695
9696 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9697
9698         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9699         lll_futex_wake): Declare register variables as long int instead of
9700         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9701         Make syscall arguments clobbered by the syscall.
9702         (lll_futex_wait): Define using lll_futex_timed_wait.
9703
9704         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9705         to void *.
9706
9707         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9708         PPID if [! NDEBUG].
9709
9710         * allocatestack.c (nptl_ncreated): Only declare if
9711         COLORING_INCREMENT != 0.
9712
9713         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9714         (__libc_enable_asynccancel_2): Remove prototype.
9715
9716         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9717         ctid to match kernel.
9718
9719 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9720
9721         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9722         libc_multiple_threads.
9723         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9724         __libc_multiple_threads to...
9725         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9726
9727         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9728         versioning.
9729         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9730         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9731
9732         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9733         (__pthread_once_internal): Define.
9734
9735         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9736         macros instead of .symver directly.
9737         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9738         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9739
9740         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9741         * sysdeps/x86_64/tcb-offsets.sym: New file.
9742         * sysdeps/x86_64/Makefile: New file.
9743
9744         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9745         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9746         to access own pthread_t in TCB.
9747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9748         Likewise.
9749         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9750         Likewise.
9751         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9752
9753 2003-03-12  Roland McGrath  <roland@redhat.com>
9754
9755         * pthread-errnos.sym: New file.
9756         * Makefile (gen-as-const-headers): New variable, list that file.
9757         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9758         header <pthread-errnos.h> instead of defining errno values here.
9759         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9760         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9761         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9762         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9763         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9764         Likewise.
9765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9766         Likewise.
9767         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9769         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9770         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9771         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9772         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9773         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9774         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9775         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9776         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9777         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9778         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9779         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9780         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9781         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9782         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9784         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9785         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9786         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9787         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9788         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9789         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9790         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9791         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9792         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9793         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9794
9795         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9796         CLONE_CHILD_SETTID worked.
9797
9798 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9799
9800         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9801         file.
9802         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9803         file.
9804
9805         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9806         (pthread_cond_t): Add padding.
9807
9808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9809         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9810         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9811
9812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9813         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9815         (__pthread_rwlock_timedrdlock): Likewise.
9816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9817         (__pthread_rwlock_wrlock): Likewise.
9818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9819         (__pthread_rwlock_rdlock): Likewise.
9820
9821         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9822
9823         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9824         result of lock re-get if it fails.
9825
9826 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9827
9828         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9829         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9830         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9831         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9833         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9834         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9835         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9836         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9837         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9838
9839         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9840         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9841
9842         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9843         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9844         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9845         (create_thread): Likewise.
9846         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9847         * init.c (__pthread_initialize_minimal_internal): Initialize
9848         __libc_multiple_threads_ptr if necessary.
9849         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9850         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9851         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9852         __libc_multiple_threads.
9853         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9854         necessary.
9855
9856         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9857         (THREAD_SETMEM_NC): Likewise.
9858
9859         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9860         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9861         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9862         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9863
9864         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9865         Eliminate one entire instruction.
9866
9867         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9868         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9870         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9871         instead of __pthread_enable_asynccancel.
9872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9873         (__pthread_cond_wait): Likewise.
9874         * sysdeps/pthread/pthread_cond_timedwait.c
9875         (__pthread_cond_timedwait): Likewise.
9876         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9877
9878         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9879         (__condvar_cleanup): Wake up all waiters in case we got signaled
9880         after being woken up but before disabling asynchronous
9881         cancellation.
9882         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9884         (__condvar_cleanup): Likewise.
9885
9886         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9887         Make it an error if architecture has no #if case.  Add x86-64.
9888
9889         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9890         pt-initfini.s generation.
9891
9892         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9893         (TLS_INIT_TP): Fix typo.
9894
9895 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9896
9897         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9898         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9899
9900         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9901         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9902         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9903         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9904         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9905         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9906         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9907         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9908
9909 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9910
9911         * sysdeps/pthread/pthread_cond_timedwait.c
9912         (__pthread_cond_timedwait): Return the result of the final
9913         locking.  If it succeeds, the regular function return value.
9914
9915         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9916         Return result of the final locking.
9917         * version.c (__nptl_main): Work around problems with the strange
9918         INTERNAL_SYSCALL macro on ppc32.
9919         * init.c (__pthread_initialize_minimal_internal): Unblock
9920         SIGCANCEL in case the parent blocked it.
9921         Reported by Paul Mackerras <paulus@samba.org>.
9922
9923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9924         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9925         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9926
9927 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9928
9929         * sysdeps/pthread/pthread_cond_timedwait.c
9930         (__pthread_cond_timedwait): Unlock and fail if
9931         __pthread_mutex_unlock_internal failed.
9932
9933         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9934         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9935         Use ARCH_CLONE.
9936         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9937         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9938         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9939         ALLOCATE_STACK): New macros.
9940         (TLS_TPADJ): New macro.
9941         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9942         (allocate_stack): Handle TLS_DTV_AT_TP and
9943         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9944         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9945         Don't set PD->self.
9946         * init.c [__ia64__] (__NR_set_tid_address): Define.
9947
9948         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9949         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9950         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9951         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9952         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9953         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9954         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9955         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9956         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9957         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9958         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9959         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9960         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9961         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9962         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9963         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9964         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9965         * sysdeps/ia64/bits/atomic.h: New file.
9966         * sysdeps/ia64/Makefile: New file.
9967         * sysdeps/ia64/pthread_spin_init.c: New file.
9968         * sysdeps/ia64/pthread_spin_lock.c: New file.
9969         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9970         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9971         * sysdeps/ia64/pthreaddef.h: New file.
9972         * sysdeps/ia64/tcb-offsets.sym: New file.
9973         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9974         * sysdeps/ia64/tls.h: New file.
9975
9976         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9977         to syscall instead of no arguments.
9978
9979 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9980
9981         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9982         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9983         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9984         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9985
9986         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9987         unused code.
9988
9989         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9990
9991         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9992         lowlevelbarrier.sym.
9993         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9994         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9995         Include lowlevelbarrier.h and don't define offsets locally.
9996         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9997
9998         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9999         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10000         (__lll_mutex_timedlock_wait): Likewise.
10001         (lll_mutex_lock): Adjust asm for that.
10002         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10003         (lll_lock): Adjust asm for operand order change.
10004         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10005         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10006
10007         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10008         Reverse order of parameters.
10009         (__lll_timedwait_tid): Remove regparms attribute.
10010         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10011         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10012
10013         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10014         (__lll_timedwait_tid): Remove one unnecessary instruction.
10015
10016         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10017         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10018         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10019         lowlevelmutex.S.
10020
10021         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10022         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10023         for NOT_IN_libc.
10024         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10025         lowlevellock.S.
10026
10027         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10028         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10029         for libc.so.
10030         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10031         define LOCK here (if UP is not defined).  The actual code is in
10032         lowlevelmutex.S.
10033
10034         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10035         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10036         __lll_timedwait_tid for libc.so.
10037         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10038         define LOCK here (if UP is not defined).  The actual code is in
10039         lowlevellock.S.
10040
10041         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10042         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10043         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10044         instead of lowlevelsem.h.
10045         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10046         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10047         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10048
10049         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10050         lowlevelrwlock.sym.
10051         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10052         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10053         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10054
10055         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10056         register loading.
10057         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10058         last changed.  D'oh.
10059
10060         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10061
10062         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10063         of __libc_locking_needed.
10064         (lll_trylock): Initialize %eax to zero.
10065
10066         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10067         pthread_cond_t definition.
10068
10069 2003-03-10  Roland McGrath  <roland@redhat.com>
10070
10071         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10072         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10073         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10074         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10075         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10076
10077         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10078         Instead of setting PD->multiple_threads, set globals
10079         __pthread_multiple_threads and __libc_multiple_threads.
10080         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10081         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10082         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10083
10084         * descr.h (struct pthread): Conditionalize first member on
10085         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10086         containing an anonymous tcbhead_t.  Move `list' member out.
10087         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10088         * allocatestack.c: Remove use of `header.data.' prefix.
10089         * pthread_create.c: Likewise.
10090         * init.c (__pthread_initialize_minimal_internal): Likewise.
10091         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10092         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10093         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10094         * sysdeps/x86_64/tls.h: Likewise.
10095         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10096         (SINGLE_THREAD_P): Likewise.
10097         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10098         (SINGLE_THREAD_P): Likewise.
10099         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10100         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10101
10102 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10103
10104         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10105
10106         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10107         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10108
10109         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10110         leftovers from the ia32 code.
10111
10112         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10113         memory load.
10114         (clear_once_control): Don't load %esi.
10115
10116         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10117         handling.
10118
10119         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10120
10121         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10122         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10123
10124         * Makefile (tests): Add tst-cond10.
10125         * tst-cond10.c: New file.
10126
10127 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10128
10129         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10130         * tst-signal3.c (do_test): Likewise.
10131         * tst-sem5.c (do_test): Likewise.
10132         * tst-kill6.c (do_test): Likewise.
10133         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10134
10135         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10136         of inc/dec.
10137         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10138         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10139         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10140         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10141         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10142         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10143         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10144         Likewise.
10145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10146         Likewise.
10147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10148         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10152         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10153         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10154         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10155
10156         * allocatestack.c (allocate_stack): If mprotect() fails free the
10157         TLS memory.
10158
10159 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10160
10161         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10162
10163         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10164         lll_wake_tid.  This was used only to work around kernel limits in
10165         the early days.
10166         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10167         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10168         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10169         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10170
10171         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10172         (__pthread_initialize_minimal_internal): Change initialization of
10173         __static_tls_align_m1 appropriately.
10174         * pthreadP.h (__static_tls_align_m1): Renamed from
10175         __static_tls_align.
10176         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10177         instead of __static_tls_align-1.
10178
10179 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10180
10181         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10182
10183         * pthread_create.c: Define __pthread_keys using nocommon
10184         attribute, not by placing it explicitly in bss.
10185         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10186
10187         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10188         Use it in mmap call to allocate stacks.
10189
10190         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10191
10192         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10193         result of the thread function.
10194
10195 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10196
10197         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10198         version is just fine.
10199
10200         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10201         (__pthread_child_handler): Renamed from pthread_child_handler,
10202         exported, and marked hidden.  Change all users.
10203         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10204         free __pthread_child_handler from child list.
10205
10206 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10207
10208         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10209
10210         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10211         Fix handling of cancellation and failing pthread_mutex_unlock call.
10212         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10213         (__pthread_cond_wait): Likewise.
10214
10215         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10216         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10217         lll_futex_timed_wait call.
10218         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10219         (pthread_rwlock_timedwrlock): Likewise.
10220
10221         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10222         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10223         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10224
10225         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10226         check of lll_futex_wake return value.
10227
10228 2003-03-03  Roland McGrath  <roland@redhat.com>
10229
10230         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10231
10232         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10233         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10234         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10235
10236 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10237
10238         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10239         error for CPU clocks.
10240
10241         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10242         _POSIX_MONOTONIC_CLOCK.
10243         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10244
10245         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10246         recent kernels.
10247
10248 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10249
10250         * descr.h (struct pthread): Move cleanup field to the front.
10251
10252 2003-03-01  Roland McGrath  <roland@redhat.com>
10253
10254         * sem_open.c (sem_open): Braino fix.
10255
10256 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10257
10258         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10259         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10260         __pthread_cleanup_pop functionality.
10261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10262
10263         * descr.h (struct pthread): Move tid field to the front now that
10264         it is often used.
10265
10266         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10267         (__lll_mutex_timedlock_wait): Remove.
10268         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10269         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10270         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10271         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10272         (lll_unlock_wake_cb): Don't save and restore %esi.
10273         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10274         %esi.
10275         (__lll_timedwait_tid): Add alignment.
10276         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10277         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10278         %esi.
10279         (__lll_timedwait_tid): Removed.
10280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10281         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10282         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10283         (pthread_barrier_wait): Don't save, load, and restore %esi for
10284         last thread.
10285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10286         (__pthread_cond_signal): Don't save, load, and restore %esi.
10287         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10288         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10289         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10290         Don't save, load, and restore %esi.
10291
10292 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10293
10294         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10295         Release lock before waking up the waiters.
10296
10297         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10298
10299         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10300         (reader_thread): Likewise.
10301
10302         * sysdeps/pthread/pthread_rwlock_unlock.c
10303         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10304         to wake up readers if there are none.
10305
10306         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10307         Release internal lock before wake threads.
10308
10309 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10310
10311         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10312         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10313         predefined.
10314         * tst-rwlock9.c: Likewise.
10315         * tst-rwlock10.c: New file.
10316         * tst-rwlock11.c: New file.
10317
10318         * Makefile (tests): Add tst-dlsym1.
10319         * tst-dlsym1.c: New file.
10320
10321         * init.c (__pthread_initialize_minimal_internal): Set
10322         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10323         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10324
10325 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10326
10327         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10328
10329         * tst-cond2.c: Fix sychronization with child.
10330
10331         * tst-rwlock8.c (reader_thread): Remove unused variable.
10332
10333         * Makefile: Add rules to build and run tst-tls3.
10334         * tst-tls3.c: New file.
10335         * tst-tls3mod.c: New file.
10336
10337         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10338         * tst-rwlock8.c: New file.
10339         * tst-rwlock9.c: New file.
10340         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10341         complete broken rwlock implementation.
10342         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10343         Likewise.
10344         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10345         Likewise.
10346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10348         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10349         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10350         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10351         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10352         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10353
10354 2003-02-23  Roland McGrath  <roland@redhat.com>
10355
10356         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10357
10358 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10359
10360         * Makefile (tests): Add tst-context1.
10361         * tst-context1.c: New file.
10362
10363         * Makefile (tests): Add tst-tls1 and tst-tls2.
10364         * tst-tls1.c: New file.
10365         * tst-tls2.c: New file.
10366
10367         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10368         for failed cmpxchg.
10369
10370         * pthread_create.c (start_thread): Set EXITING_BIT early.
10371
10372         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10373         (THREAD_GETMEM_NC): Likewise.
10374
10375 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10376
10377         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10378         off 3 more bytes by using offset-less instructions when possible.
10379
10380         * Makefile: Add dependency for $(objpfx)version.d.
10381
10382         * eintr.c (eintr_source): Add unnecessary return but the compiler
10383         insists.
10384
10385         * tst-kill3.c: Include <unistd.h>.
10386
10387 2003-02-21  Roland McGrath  <roland@redhat.com>
10388
10389         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10390
10391 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10392
10393         * Makefile (tests): Add tst-eintr1.
10394         (distribute): Add eintr.c.
10395         * tst-eintr1.c: New file.
10396         * eintr.c: New file.
10397
10398         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10399
10400         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10401         Disallow sending SIGCANCEL.
10402
10403         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10404         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10405         * tst-kill1.c: New file.
10406         * tst-kill2.c: New file.
10407         * tst-kill3.c: New file.
10408         * tst-kill5.c: New file.
10409         * tst-kill6.c: New file.
10410         * tst-basic7.c: Renamed to...
10411         * tst-kill4.c: ...this.
10412
10413 2003-02-21  Roland McGrath  <roland@redhat.com>
10414
10415         * Makefile (install-lib-ldscripts): New variable.
10416
10417 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10418
10419         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10420         * pthread_cancel.c: Use INVALID_TD_P.
10421         * pthread_detach.c: Likewise.
10422         * pthread_getschedparam.c: Likewise.
10423         * pthread_setschedparam.c: Likewise.
10424         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10425         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10426         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10427         * pthread_timedjoin.c: Likewise.
10428
10429         * tst-basic7.c: Include <signal.h>.
10430
10431         * pthread_join.c (pthread_join): Limited checking for invalid
10432         descriptors.
10433         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10434
10435 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10436
10437         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10438         beginning of the loop.  Clear the entire first block of TSD.
10439         * Makefile (tests): Add tst-key4.
10440         * tst-key4.c: New file.
10441
10442 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10443
10444         * Makefile (tests): Add tst-basic7.
10445         * tst-basic7.c: New file.
10446
10447         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10448         Add some more __builtin_expect.
10449
10450         * pthreadP.h: Define dummy version of DEBUGGING_P.
10451
10452 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10453
10454         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10455         _POSIX_THREAD_PRIORITY_SCHEDULING.
10456         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10457         _XOPEN_REALTIME_THREADS.
10458         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10459
10460         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10461         kernel returns EINVAL for PID <= 0, work around it.
10462
10463         * Makefile (tests): Add tst-signal5.
10464         * tst-signal5.c: New file.
10465
10466         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10467         and LOGIN_NAME_MAX.
10468
10469         * tst-cancel1.c (tf): Block all signals.
10470
10471         * Makefile (tests): Add tst-basic6.
10472         * tst-basic6.c: New file.
10473
10474         * tst-basic1.c: Add test for process ID.
10475
10476         * Makefile (tests): Add tst-cancel10.
10477         * tst-cancel10.c: New file.
10478
10479         * Makefile (tests): Add tst-signal4.
10480         * tst-signal4.c: New file.
10481
10482         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10483         __sigismember instead of sigismember.  Add __builtin_expect.
10484
10485 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10486
10487         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10488         pthread_setcancelstate, and pthread_rwlock_setpshared.
10489
10490         * tst-cancel7.c (do_test): Make sure the pid file exists before
10491         canceling the thread.
10492
10493         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10494         pthread_rwlock_timedrdlock tests.
10495         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10496         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10497         Check for invalid tv_nsec field.
10498         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10499         Likewise.
10500
10501         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10502         recursive mutex of overflow.
10503
10504         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10505
10506         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10507         going into an endless loop.
10508         * Makefile (tests): Add tst-cancel9.
10509         * tst-cancel9.c: New file.
10510
10511         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10512
10513 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10514
10515         * tst-mutex5.c (do_test): Add more timedlock tests.
10516
10517         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10518         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10519
10520         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10521         use INLINE_SYSCALL.  Error number is returned, not -1.
10522
10523         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10524         and __deallocate_stack with internal_function.
10525         * pthread_create.c: Adjust definitions appropriately.
10526         * allocatestack.c: Likewise.
10527
10528         * pthread_join.c: Add one more __builtin_expect.
10529         * pthread_timedjoin.c: Likewise.
10530
10531         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10532         not data of sequence number does not match.
10533         Add one __builtin_expect.
10534
10535         * Makefile (tests): Add tst-clock1.
10536         * tst-clock1.c: New file.
10537
10538         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10539         negative arguments.
10540         * Makefile (tests): Add tst-basic5.
10541         * tst-basic5.c: New file.
10542
10543 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10544
10545         * Makefile (tests): Add tst-basic4.
10546         * tst-basic4.c: New file.
10547
10548         * pthreadP.h: Add declaraction for __nptl_nthreads.
10549         * pthread_create.c: Define __nptl_nthreads
10550         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10551         after thread is done.  If then zero, call exit(0).
10552         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10553         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10554         * init.c (pthread_functions): Initialize ptr_nthreads.
10555         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10556         (__reclaim_stacks): Decrement __nptl_nthreads.
10557         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10558         Define.
10559         * Makefile (tests): Add tst-basic3.
10560         * tst-basic3.c: New file.
10561
10562         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10563         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10564         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10565         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10566         if asynchronous canceling is enabled.
10567         * pthread_join.c (pthread_join): When recognizing circular joins,
10568         take into account the other thread might be already canceled.
10569         * Makefile (tests): Add tst-join5.
10570         * tst-join5.c: New file.
10571
10572         * Makefile (tests): Add tst-join4.
10573         * tst-join4.c: New file.
10574
10575 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10576
10577         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10578
10579 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10580
10581         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10582         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10583         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10584         warning.
10585         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10586         to avoid warning.
10587         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10588         error if lll_futex_wake failed.
10589
10590 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10591
10592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10593         handling of cancellation and failung pthread_mutex_unlock call.
10594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10595         * Makefile (tests): Add tst-cond8 and tst-cond9.
10596         * tst-cond8.c: New file.
10597         * tst-cond9.c: New file.
10598
10599         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10600
10601         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10602         non-standard initializers with __USE_GNU.
10603
10604         * Makefile (tests): Add tst-cleanup3.
10605         * tst-cleanup3.c: New file.
10606
10607 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10608
10609         * Makefile (tests): Add tst-attr1 and tst-attr2.
10610         * tst-attr1.c: New file.
10611         * tst-attr2.c: New file.
10612
10613         * Makefile: Add rules to build and run tst-atfork2 test.
10614         * tst-atfork2.c: New file.
10615         * tst-atfork2mod.c: New file.
10616
10617         * sysdeps/unix/sysv/linux/unregister-atfork.c
10618         (__unregister_atfork): Free the memory allocated for the handlers
10619         after removing them from the lists.
10620
10621         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10622         cleanup function.
10623
10624         * tst-atfork1.c (do_test): Wait for the child we forked.
10625         Report error in child.
10626
10627         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10628
10629         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10630
10631 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10632
10633         * Makefile (tests): Add tst-cancel8.
10634         * tst-cancel8.c: New file.
10635
10636         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10637         clearing of control variable.
10638         * Makefile (tests): Add tst-once3 and tst-once4.
10639         * tst-once3.c: New file.
10640         * tst-once4.c: New file.
10641
10642 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10643
10644         * sysdeps/sh/Makefile: New file.
10645         * sysdeps/sh/bits/atomic.h: New file.
10646         * sysdeps/sh/pthread_spin_init.c: New file.
10647         * sysdeps/sh/pthread_spin_lock.c: New file.
10648         * sysdeps/sh/pthread_spin_trylock.S: New file.
10649         * sysdeps/sh/pthread_spin_unlock.S: New file.
10650         * sysdeps/sh/pthreaddef.h: New file.
10651         * sysdeps/sh/tcb-offsets.sym: New file.
10652         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10653         * sysdeps/sh/tls.h: New file.
10654         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10655         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10656         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10657         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10658         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10659         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10660         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10661         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10662         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10663         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10664         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10665         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10666         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10667         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10668         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10669         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10670         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10671         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10672         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10673         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10674         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10675         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10676         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10679         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10680         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10681         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10682         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10683         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10684
10685 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10686
10687         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10688         according to POSIX.
10689
10690         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10691
10692 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10693
10694         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10695         (TLS_GET_FS): New #define.
10696         (TLS_SET_FS): New #define.
10697         Correct value of __NR_set_thread_area.
10698
10699         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10700
10701 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10702
10703         * Makefile (tests): Add tst-popen1.
10704         * tst-popen1.c: New file.
10705
10706         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10707         but inactive generalization.
10708         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10710         Minor optimization, remove one instruction.
10711         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10712
10713 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10714
10715         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10716
10717 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10718
10719         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10720         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10721         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10722         * sysdeps/pthread/pthread_cond_signal.c: New file.
10723         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10724         * sysdeps/pthread/pthread_cond_wait.c: New file.
10725         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10726         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10727         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10728         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10729         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10730         * sysdeps/s390/Makefile: New file.
10731         * sysdeps/s390/bits/atomic.h: New file.
10732         * sysdeps/s390/pthread_spin_init.c: New file.
10733         * sysdeps/s390/pthread_spin_lock.c: New file.
10734         * sysdeps/s390/pthread_spin_trylock.c: New file.
10735         * sysdeps/s390/pthread_spin_unlock.c: New file.
10736         * sysdeps/s390/pthreaddef.h: New file.
10737         * sysdeps/s390/tcb-offsets.sym: New file.
10738         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10739         * sysdeps/s390/tls.h: New file.
10740         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10741         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10742         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10743         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10744         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10745         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10746         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10747         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10748         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10749         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10750         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10751         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10752         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10753         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10754         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10755         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10756         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10757         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10758         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10759         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10760         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10761         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10762         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10763
10764 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10765
10766         * atomic.h: Add a couple more default implementations.
10767         (atomic_compare_and_exchange_acq): Use
10768         __arch_compare_and_exchange_32_acq in return value definition.  It
10769         always exists.
10770         (atomic_bit_set): Renamed from atomic_set_bit.
10771         Add missing atomic_ prefixes.
10772
10773         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10774         thread library is available, use correct value to mark initialized
10775         once variable.
10776
10777 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10778
10779         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10780         __sysconf to determine pagesize.
10781
10782         * pthread_create.c: Include <atomic.h>.
10783         * allocatestack.c (allocate_stack): Implement coloring of the
10784         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10785         size minus one.  Adjust users.
10786         * sysdeps/i386/i686/Makefile: New file.
10787
10788 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10789
10790         * allocatestack.c: Improve comment throughout the file.
10791
10792         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10793         (__lll_lock_wait): Add branch prediction.
10794         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10795         (__lll_lock_wait): Likewise.
10796         (lll_unlock_wake_cb): Removed.
10797
10798 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10799
10800         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10801         _POSIX_THREAD_PRIORITY_SCHEDULING.
10802
10803 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10804
10805         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10806         Fix return type of ptr___pthread_getspecific.
10807
10808 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10809
10810         * Makefile (tests): Add tst-umask1.
10811         (tst-umask1-ARGS): Define.
10812         * tst-umask1.c: New file.
10813
10814 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10815
10816         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10817         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10818         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10819         pthread_rwlock_unlock.
10820         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10821         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10822         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10823         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10824         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10825         New file.
10826         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10828         New file.
10829         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10830         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10831         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10832         New file.
10833         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10834         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10835         New file.
10836         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10837         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10838         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10839         New file.
10840         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10841         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10842         New file.
10843         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10844
10845         * Makefile (libpthread-routines): Remove lowlevelcond and
10846         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10847         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10848         and pthread_cond_broadcast.
10849         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10850         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10851         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10852         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10853         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10854         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10855         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10856         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10857         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10858         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10862         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10863         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10864         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10865         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10866         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10867         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10868         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10869         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10870         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10871         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10872         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10873         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10874         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10875         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10876         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10877         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10878         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10879         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10880
10881         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10882         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10883         of the code is moved to ...
10884         * sysdeps/pthread/createthread.c: ...here.  New file.
10885
10886 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10887
10888         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10889         (__new_sem_post): Clear %eax before returning.
10890         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10891
10892         * Makefile (tests): Add tst-cleanup2.
10893         * tst-cleanup2.c: New file.
10894
10895         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10896         Interpret first parameter correctly.
10897
10898 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10899
10900         * Makefile (headers): Add bits/semaphore.h.
10901
10902 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10903
10904         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10905         if not SHARED.
10906
10907 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10908
10909         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10910         must be used and mapping failed.
10911         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10912
10913         * Makefile (CFLAGS-pthread_self.os): Define this, not
10914         CFLAGS-pthread_self.c.
10915
10916 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10917
10918         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10919         lll_unlock_wake_cb.
10920
10921         * Makefile (libpthread-routines): Add version.  Add rules to build
10922         version.os and banner.h.
10923         * version.c: New file.
10924
10925 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10926
10927         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10928         the alias unconditional.
10929         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10930
10931 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10932
10933         * Makefile (CFLAGS-pthread_self.c): New definition.
10934
10935 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10936
10937         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10938         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10939         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10940         * init.c (__pthread_initialize_minimal_internal): Likewise.
10941
10942 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10943
10944         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10945
10946         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10947         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10948         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10949         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10950         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10951         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10952
10953 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10954
10955         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10956         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10957         * tst-cancel-wrappers.sh: Remove all exceptions.
10958
10959 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10960
10961         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10962         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10963
10964         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10965         Use __libc_pthread_functions array if SHARED.
10966
10967         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10968         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10969
10970         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10971         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10972         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10973         __libc_ptf_call instead of __libc_maybe_call.
10974         (PTF): New #define.
10975         (__libc_cleanup_region_start): Wrap function name with PTF call.
10976         (__libc_cleanup_region_end): Likewise.
10977         (__libc_cleanup_end): Likewise.
10978
10979         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10980         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10981         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10982         * pthreadP.h: Add prototypes.
10983
10984         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10985         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10986         __pthread_rwlock_unlock aliases.
10987         * pthreadP.h: Add prototypes for new aliases.
10988
10989         * pthreadP.h (struct pthead_functions): Moved to...
10990         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10991         * init.c (pthread_functions): Add initializers for new elements.
10992
10993         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10994         __pthread_cleanup_pop_restore aliases.
10995         * pthreadP.h: Add prototypes.
10996
10997         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10998         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10999         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11000         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11001         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11002         * pthreadP.h: Adjust prototypes and callers.
11003
11004 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11005
11006         * Makefile (tests): Add tst-cancel7.
11007         (tst-cancel7-ARGS): New variable.
11008         * tst-cancel7.c: New file.
11009
11010         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11011         around gcc defficiencies.
11012         * old_pthread_cond_signal.c: Likewise.
11013         * old_pthread_cond_timedwait.c: Likewise.
11014         * old_pthread_cond_wait.c: Likewise.
11015
11016         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11017
11018 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11019
11020         * Makefile (tests): Add tst-cond7.
11021         * tst-cond7.c: New file.
11022
11023         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11024         (condvar_cleanup): Get condvar address from the right place.
11025
11026         * atomic.h: Correct definitions of atomic_full_barrier,
11027         atomic_read_barrier, atomic_write_barrier.
11028
11029         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11030         race-free.
11031         * old_pthread_cond_signal.c: Likewise.
11032         * old_pthread_cond_timedwait.c: Likewise.
11033         * old_pthread_cond_wait.c: Likewise.
11034
11035 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11036
11037         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11038
11039 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11040
11041         * pthreadP.h (pthread_cond_2_0_t): New type.
11042         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11043         Use new type for the 2.0 condvar function prototypes.
11044         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11045         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11046         parameter.
11047         * old_pthread_cond_destroy.c: Likewise.
11048         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11049         * old_pthread_cond_signal.c: Likewise.
11050         * old_pthread_cond_timedwait.c: Likewise.
11051         * old_pthread_cond_wait.c: Likewise.
11052
11053         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11054         (__pthread_cond_wait): Don't save cancellation mode and seq value
11055         in same location.
11056
11057         * herrno.c (__h_errno_location): Don't define as weak.
11058
11059 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11060
11061         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11062         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11063         and pthread_cond_wait.
11064         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11065         Renamed to...
11066         (__pthread_cond_broadcast_2_0): ... this.
11067         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11068         Renamed to...
11069         (__pthread_cond_destroy_2_0): ... this.
11070         * old_pthread_cond_init.c (__old_pthread_cond_init):
11071         Renamed to...
11072         (__pthread_cond_init_2_0): ... this.
11073         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11074         Renamed to...
11075         (__pthread_cond_signal_2_0): ... this.
11076         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11077         Renamed to...
11078         (__pthread_cond_wait_2_0): ... this.
11079         * pthread_cond_destroy.c: Include shlib-compat.h.
11080         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11081         * pthread_cond_init.c: Include shlib-compat.h.
11082         (pthread_cond_init): Change strong_alias into versioned_symbol.
11083         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11084         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11085         fields.
11086         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11087         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11088         __pthread_cond_wait_2_0): New prototypes.
11089         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11090         __old_pthread_cond_init, __old_pthread_cond_signal,
11091         __old_pthread_cond_wait): Removed.
11092         * init.c: Include shlib-compat.h.
11093         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11094         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11095         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11096         ptr___pthread_cond_*_2_0 fields.
11097         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11098         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11099
11100         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11101         LIBC_SIGACTION was not yet defined.
11102         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11103         [!defined LIBC_SIGACTION] (__sigaction): New function and
11104         libc_hidden_weak.
11105         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11106         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11107
11108 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11109
11110         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11111
11112 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11113
11114         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11115         New, larger type definition.
11116         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11117         implementation.
11118         * Versions [libpthread]: Add definitions for new pthread_cond_*
11119         interfaces for version GLIBC_2.3.2.
11120         * pthread_cond_init.c: Update initialization for new type definition.
11121         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11122         pthread_cond_timedwait, pthread_cond_signal, and
11123         pthread_cond_broadcast.  Add old_pthread_cond_init,
11124         old_pthread_cond_destroy, old_pthread_cond_wait,
11125         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11126         old_pthread_cond_broadcast.
11127         * old_pthread_cond_broadcast.c: New file.
11128         * old_pthread_cond_destroy.c: New file.
11129         * old_pthread_cond_init.c: New file.
11130         * old_pthread_cond_signal.c: New file.
11131         * old_pthread_cond_timedwait.c: New file.
11132         * old_pthread_cond_wait.c: New file.
11133         * pthreadP.h: Add prototypes for the compatibility interfaces.
11134
11135         * pthread_cond_destroy.c: Don't include <errno.h>.
11136
11137 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11138
11139         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11140         unnecessary zero offset when addressing MUTEX.
11141
11142 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11143
11144         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11145         __register_atfork.
11146         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11147         for __register_atfork.
11148
11149 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11150
11151         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11152         instead of ASSEMBLER test macro.
11153
11154         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11155         __libc_current_sigrtmax): Add libc_hidden_def.
11156
11157         * sysdeps/pthread/list.h: Remove assert.h include.
11158
11159 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11160
11161         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11162         __pthread_initialize_minimal_internal not
11163         __pthread_initialize_minimal.
11164
11165 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11166
11167         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11168         __pthread_initialize_minimal as hidden.
11169
11170         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11171         constructor.
11172
11173 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11174
11175         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11176         $(common-objpfx)format.lds, include that into the output script.
11177         Fix comment.
11178         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11179
11180 2002-12-28  Andreas Jaeger  <aj@suse.de>
11181
11182         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11183         nsec resolution changes.
11184         (xstat64_conv): Likewise.
11185         (xstat32_conv): Likewise.
11186         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11187         struct kernel_stat.
11188         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11189         structs stat and stat64.
11190         * time/time.h (__timespec_defined): Define for __USE_MISC.
11191         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11192
11193 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11194
11195         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11196         argument.
11197         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11198         (pthread_exit): Use strong_alias to avoid warnings.
11199         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11200         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11201         ptr___pthread_attr_init_2_*.
11202         * init.c (pthread_functions): Adjust.
11203
11204 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11205
11206         * forward.c: Make all functions available by default again.  It
11207         caused too much trouble.
11208
11209         * pt-siglongjmp.c: Removed.
11210
11211 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11212
11213         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11214         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11215         * sysdeps/i386/Makefile: New file.
11216         * sysdeps/i386/tcb-offsets.sym: New file.
11217         * sysdeps/pthread/tcb-offsets.h: New file.
11218         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11219         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11220
11221         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11222         __register_atfork...
11223         (GLIBC_2.3.2): ...here.
11224
11225 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11226
11227         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11228         pthread_attr_setstackaddr with __attribute_deprecated__.
11229
11230 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11231
11232         * pt-system.c (system): Remove cancellation handling.
11233         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11234         cancellation routines.
11235
11236 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11237
11238         * descr.h: Include <dl-sysdep.h>.
11239         (struct pthread): Move header.data.list to the back of the struct.
11240         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11241         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11242         (SYSINFO_OFFSEET): Likewise.
11243
11244 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11245
11246         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11247         Define.
11248         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11249         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11250         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11251         (USE_DL_SYSINFO): Undef.
11252
11253 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11254
11255         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11256         $(common-objpfx)libc.so.
11257         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11258         it is bigger than pipe buffer size even on arches with bigger
11259         page size.
11260         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11261
11262 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11263
11264         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11265         correct errno access for case that USE___THREAD is not defined.
11266
11267 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11268
11269         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11270         Patch by Marijn Ros <marijn@mad.scientist.com>.
11271
11272 2002-12-22  Roland McGrath  <roland@redhat.com>
11273
11274         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11275
11276 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11277
11278         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11279
11280 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11281
11282         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11283         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11284         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11285
11286         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11287         of int $0x80.
11288         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11289         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11291         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11292         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11293         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11294         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11295         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11296
11297         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11298         sysenter.
11299         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11300
11301         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11302
11303         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11304         in new TCB.
11305         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11306         that sysinfo is properly initialized.
11307         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11308         to 1 only for ld.so.
11309
11310         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11311         RTLD_CORRECT_DYNAMIC_WEAK.
11312
11313 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11314
11315         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11316         Use return 0 as 6th argument to FORWARD4.
11317         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11318
11319 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11320
11321         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11322         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11323         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11324         (INIT_SYSINFO): New #define.
11325         (TLS_TP_INIT): Use INIT_SYSINFO.
11326         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11327         At test to make sure SYSINFO_OFFSET value is correct.
11328         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11329
11330 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11331
11332         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11333         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11334         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11335         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11336         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11337         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11338         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11339
11340 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11341
11342         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11343         macro instead of using int $0x80 directly.
11344
11345         * sysdeps/pthread/bits/stdio-lock.h: New file.
11346         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11347         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11348         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11349         * Makefile (routines): Add libc-lowlevelmutex.
11350
11351         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11352         __i686.get_pc_thunk.dx.
11353
11354 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11355
11356         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11357         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11358         ($(objpfx)tst-cancel-wrappers.out): New rule.
11359         * tst-cancel-wrappers.sh: New test.
11360         * tst-locale1.c: Include signal.h.
11361         (uselocale): Test static linking of __libc_current_sigrt*.
11362
11363 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11364
11365         * Makefile (tests): Add tst-cancel6.
11366         * tst-cancel6.c: New file
11367
11368 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11369
11370         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11371         Define meaningfully for assembler as well.
11372         * pthreadP.h (struct pthread_functions): Remove
11373         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11374         and ptr_pthread_attr_init_2_1 fields.
11375         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11376         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11377         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11378         (FORWARD3): Define using FORWARD4.
11379         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11380         versions.
11381         * pt-system.c: Remove duplicate stdlib.h include.
11382
11383 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11384
11385         * sem_init.c: Define sem_init@GLIBC_2.0.
11386         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11387         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11388
11389         * flockfile.c: Moved to...
11390         * sysdeps/pthread/flockfile.c: ...here.  New file.
11391         * funlockfile.c: Moved to...
11392         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11393         * ftrylockfile.c: Moved to...
11394         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11395
11396 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11397
11398         * libc-cancellation.c: Guard both function with
11399         #if !defined NOT_IN_libc.
11400         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11401         automatically provided pthread wrappers.
11402         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11403         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11404         nor in libpthread.
11405         * pt-open.c: Removed.
11406         * pt-fcntl.c: Removed.
11407         * pt-fsync.c: Removed.
11408         * pt-lseek.c: Removed.
11409         * pt-msgrcv.c: Removed.
11410         * pt-msgsnd.c: Removed.
11411         * pt-msync.c: Removed.
11412         * pt-nanosleep.c: Removed.
11413         * pt-open64.c: Removed.
11414         * pt-pause.c: Removed.
11415         * pt-pread.c: Removed.
11416         * pt-pread64.c: Removed.
11417         * pt-pwrite.c: Removed.
11418         * pt-pwrite64.c: Removed.
11419         * pt-read.c: Removed.
11420         * pt-recv.c: Removed.
11421         * pt-recvfrom.c: Removed.
11422         * pt-recvmsg.c: Removed.
11423         * pt-send.c: Removed.
11424         * pt-sendto.c: Removed.
11425         * pt-sigtimedwait.c: Removed.
11426         * pt-sigwait.c: Removed.
11427         * pt-wait.c: Removed.
11428         * pt-waitpid.c: Removed.
11429         * pt-write.c: Removed.
11430         * pt-accept.c: Removed.
11431         * pt-close.c: Removed.
11432         * pt-connect.c: Removed.
11433         * pt-lseek64.c: Removed.
11434         * pt-sendmsg.c: Removed.
11435         * pt-tcdrain.c: Removed.
11436
11437 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11438
11439         * init.c (__pthread_initialize_minimal_internal): Renamed from
11440         __pthread_initialize_minimal.  Make old name an alias.  This
11441         converts a normal relocation into a relative relocation.
11442
11443         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11444
11445         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11446         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11447         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11448         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11449         pt-sigwaitinfo, pt-waitid, and pt-writev.
11450         * pt-creat.c: Removed.
11451         * pt-poll.c: Removed.
11452         * pt-pselect.c: Removed.
11453         * pt-readv.c: Removed.
11454         * pt-select.c: Removed.
11455         * pt-sigpause.c: Removed.
11456         * pt-sigsuspend.c: Removed.
11457         * pt-sigwaitinfo.c: Removed.
11458         * pt-waitid.c: Removed.
11459         * pt-writev.c: Removed.
11460
11461         * init.c (pthread_functions): New variable.
11462         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11463         (or NULL) to __libc_pthread_init.
11464         * forward.c: Rewrite to use __libc:pthread_functions array to get
11465         function addresses.
11466         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11467         prototype.
11468         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11469         Take new parameter.  Copy content of variable pointed to by it
11470         to __libc_pthread_init.
11471
11472         * pthreadP.h (struct pthread_functions): New type.
11473         (__libc_pthread_init): Declare.
11474
11475         * pthread_attr_destroy.c: Add namespace protected alias.
11476         * pthread_attr_getdetachstate.c: Likewise.
11477         * pthread_attr_getinheritsched.c: Likewise.
11478         * pthread_attr_getschedparam.c: Likewise.
11479         * pthread_attr_getschedpolicy.c: Likewise.
11480         * pthread_attr_getscope.c: Likewise.
11481         * pthread_attr_setdetachstate.c: Likewise.
11482         * pthread_attr_setinheritsched.c: Likewise.
11483         * pthread_attr_setschedparam.c: Likewise.
11484         * pthread_attr_setschedpolicy.c: Likewise.
11485         * pthread_attr_setscope.c: Likewise.
11486         * pthread_cond_broadcast.c: Likewise.
11487         * pthread_cond_destroy.c: Likewise.
11488         * pthread_cond_init.c: Likewise.
11489         * pthread_cond_signal.c: Likewise.
11490         * pthread_cond_wait.c: Likewise.
11491         * pthread_condattr_destroy.c: Likewise.
11492         * pthread_condattr_init.c: Likewise.
11493         * pthread_equal.c: Likewise.
11494         * pthread_exit.c: Likewise.
11495         * pthread_getschedparam.c: Likewise.
11496         * pthread_self.c: Likewise.
11497         * pthread_setcancelstate.c: Likewise.
11498         * pthread_setschedparam.c: Likewise.
11499         * pthread_mutex_destroy.c: Likewise.
11500         * pthread_mutex_init.c: Likewise.
11501         * pthreadP.h: Add prototypes for the aliases.
11502
11503         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11504         multiple_threads member in correct TCB to 1.
11505
11506         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11507         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11508         member of thread decriptor, otherwise return unconditionally 1.
11509
11510 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11511
11512         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11513         regular Linux version.  Remove file.
11514         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11515         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11516         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11517         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11518         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11519         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11520         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11521         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11522         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11523         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11524         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11525         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11526         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11527         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11528         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11529         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11530         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11531         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11532         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11533         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11534         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11535         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11536         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11537         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11538         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11539         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11540         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11541         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11542         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11543         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11544
11545 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11546
11547         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11548         * sysdeps/unix/sysv/linux/open.c: Removed.
11549         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11550         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11551         * sysdeps/unix/sysv/linux/msync.c: Removed.
11552         * sysdeps/unix/sysv/linux/read.c: Removed.
11553         * sysdeps/unix/sysv/linux/close.c: Removed.
11554         * sysdeps/unix/sysv/linux/creat.c: Removed.
11555         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11556         * sysdeps/unix/sysv/linux/pause.c: Removed.
11557         * sysdeps/unix/sysv/linux/select.c: Removed.
11558         * sysdeps/unix/sysv/linux/write.c: Removed.
11559
11560 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11561
11562         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11563         element in TCB to see whether locking is needed.
11564
11565         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11566         MULTIPLE_THREADS_OFFSET value is correct.
11567
11568         * sysdeps/unix/sysv/linux/close.c: New file.
11569         * sysdeps/unix/sysv/linux/connect.S: New file.
11570         * sysdeps/unix/sysv/linux/creat.c: New file.
11571         * sysdeps/unix/sysv/linux/fsync.c: New file.
11572         * sysdeps/unix/sysv/linux/llseek.c: New file.
11573         * sysdeps/unix/sysv/linux/lseek.c: New file.
11574         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11575         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11576         * sysdeps/unix/sysv/linux/msync.c: New file.
11577         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11578         * sysdeps/unix/sysv/linux/open.c: New file.
11579         * sysdeps/unix/sysv/linux/open64.c: New file.
11580         * sysdeps/unix/sysv/linux/pause.c: New file.
11581         * sysdeps/unix/sysv/linux/poll.c: New file.
11582         * sysdeps/unix/sysv/linux/pread.c: New file.
11583         * sysdeps/unix/sysv/linux/pread64.c: New file.
11584         * sysdeps/unix/sysv/linux/pselect.c: New file.
11585         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11586         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11587         * sysdeps/unix/sysv/linux/readv.c: New file.
11588         * sysdeps/unix/sysv/linux/recv.S: New file.
11589         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11590         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11591         * sysdeps/unix/sysv/linux/select.c: New file.
11592         * sysdeps/unix/sysv/linux/send.S: New file.
11593         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11594         * sysdeps/unix/sysv/linux/sendto.S: New file.
11595         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11596         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11597         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11598         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11599         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11600         * sysdeps/unix/sysv/linux/system.c: New file.
11601         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11602         * sysdeps/unix/sysv/linux/wait.c: New file.
11603         * sysdeps/unix/sysv/linux/waitid.c: New file.
11604         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11605         * sysdeps/unix/sysv/linux/writev.c: New file.
11606         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11607
11608         * pt-readv.c: Fix comment.
11609
11610 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11611
11612         * tst-cleanup1.c: Include stdlib.h.
11613
11614         * tst-cancel5.c: New test.
11615         * Makefile (tests): Add tst-cancel5.
11616         (tst-cancel5): Link against libc.so libpthread.so in that order.
11617
11618 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11619
11620         * forward.c (test_loaded): Prevent recursive calls.
11621
11622         * Makefile (routines): Add libc-cancellation.
11623         * libc-cancellation.c: New file.
11624         * descr.h (struct pthread): Add multiple_threads field.
11625         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11626         new thread descriptor to 1.
11627         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11628         Initialize multiple_thread field after successful thread creation.
11629         * cancellation.c (__do_cancel): Move to pthreadP.h.
11630         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11631         (__pthread_disable_asynccancel): Add internal_function attribute.
11632         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11633         * pthread_setcancelstate.c: Likewise.
11634         * pthread_setcanceltype.c: Likewise.
11635         * pthread_exit.c: Likewise.
11636         * pthreadP.h (CANCELLATION_P): Likewise.
11637         (__do_cancel): Define as static inline.
11638         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11639         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11640         declarations.
11641         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11642         fields.  Define MULTIPLE_THREADS_OFFSET.
11643         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11644         declaration.
11645         * sysdeps/unix/sysv/linux/accept.S: New file.
11646         * sysdeps/unix/sysv/linux/read.c: New file.
11647         * sysdeps/unix/sysv/linux/write.c: New file.
11648         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11649         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11650         initialization of __libc_locking_needed.
11651         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11652         __libc_locking_needed, use multiple_threads field in TCB.
11653         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11654
11655 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11656
11657         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11658         version.
11659         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11660
11661         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11662         access to __libc_locking_needed for PIC.
11663
11664 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11665
11666         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11667         declare for libc.so.
11668         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11669         expression.
11670         (__libc_lock_lock): Put into statement expression.
11671         (__libc_lock_unlock): Remove trailing semicolon.
11672         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11673
11674 2002-12-12  Roland McGrath  <roland@redhat.com>
11675
11676         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11677         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11678
11679 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11680
11681         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11682         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11683         Initialize __libc_locking_needed.
11684         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11685         instead of __register_pthread_fork_handler.
11686         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11687         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11688         fork-gen with libc_pthread_init.
11689         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11690         of __register_pthread_fork_handler.
11691         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11692         of __register_pthread_fork_handler.
11693         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11694         __libc_locking_needed to determine whether lock prefix can be avoided.
11695         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11696
11697 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11698
11699         * Makefile (tests): Add tst-cleanup1.
11700         * tst-cleanup1.c: New file.
11701         * cancellation.c (__cleanup_thread): Removed.
11702         (__do_cancel): Remove call to __cleanup_thread.
11703         * pthreadP.h: Remove __cleanup_thread prorotype.
11704
11705         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11706         Remember function and argument even if cancellation handler
11707         function is not available.
11708         (__libc_cleanup_region_end): Execute registered function directly if
11709         pthread functions are not available.
11710         (__libc_cleanup_end): Likewise.
11711
11712         * init.c (__pthread_initialize_minimal): Fix initialization in
11713         static lib by preventing gcc from being too clever.
11714
11715 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11716
11717         * init.c (__pthread_initialize_minimal): Remove unneccesary
11718         sigaddset call.
11719
11720         * Makefile (tests): We can run tst-locale2 now.
11721
11722 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11723
11724         * Versions: Remove duplicated sigwait entry.
11725
11726 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11727
11728         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11729         inside libpthread.
11730
11731         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11732
11733         * pthreadP.h: Declare __pthread_enable_asynccancel and
11734         __pthread_disable_asynccancel.
11735         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11736         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11737         * cancellation.c (__pthread_enable_asynccancel): New function.
11738         (__pthread_disable_asynccancel): New function.
11739         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11740         * pt-close.c: Likewise.
11741         * pt-connect.c: Likewise.
11742         * pt-creat.c: Likewise.
11743         * pt-fcntl.c: Likewise.
11744         * pt-fsync.c: Likewise.
11745         * pt-lseek.c: Likewise.
11746         * pt-lseek64.c: Likewise.
11747         * pt-msgrcv.c: Likewise.
11748         * pt-msgsnd.c: Likewise.
11749         * pt-msync.c: Likewise.
11750         * pt-nanosleep.c: Likewise.
11751         * pt-open.c: Likewise.
11752         * pt-open64.c: Likewise.
11753         * pt-pause.c: Likewise.
11754         * pt-poll.c: Likewise.
11755         * pt-pread.c: Likewise.
11756         * pt-pread64.c: Likewise.
11757         * pt-pselect.c: Likewise.
11758         * pt-pwrite.c: Likewise.
11759         * pt-pwrite64.c: Likewise.
11760         * pt-read.c: Likewise.
11761         * pt-readv.c: Likewise.
11762         * pt-recv.c: Likewise.
11763         * pt-recvfrom.c: Likewise.
11764         * pt-recvmsg.c: Likewise.
11765         * pt-select.c: Likewise.
11766         * pt-send.c: Likewise.
11767         * pt-sendmsg.c: Likewise.
11768         * pt-sendto.c: Likewise.
11769         * pt-sigpause.c: Likewise.
11770         * pt-sigsuspend.c: Likewise.
11771         * pt-sigtimedwait.c: Likewise.
11772         * pt-sigwait.c: Likewise.
11773         * pt-sigwaitinfo.c: Likewise.
11774         * pt-system.c: Likewise.
11775         * pt-tcdrain.c: Likewise.
11776         * pt-wait.c: Likewise.
11777         * pt-waitid.c: Likewise.
11778         * pt-waitpid.c: Likewise.
11779         * pt-write.c: Likewise.
11780         * pt-writev.c: Likewise.
11781         * pthread_join.c: Likewise.
11782         * pthread_timedjoin.c: Likewise.
11783
11784         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11785         (__xpg_sigpause): New function.
11786         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11787
11788 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11789
11790         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11791
11792         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11793         _GI_pthread_cleanup_pop to pthreadP.h.
11794
11795         * ftrylockfile.c: Use _IO_lock_trylock instead of
11796         pthread_mutex_trylock.
11797
11798         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11799         (CANCEL_RESET): Likewise.
11800         (__pthread_setcanceltype_): Declare.
11801         (__pthread_mutex_lock_internal): Declare.
11802         (__pthread_mutex_unlock_internal): Declare.
11803         (__pthread_once_internal): Declare.
11804         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11805         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11806
11807         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11808         and pthread_mutex_unlock.
11809         * pthread_cond_wait.c: Likewise.
11810         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11811         * pthread_mutex_unlock.c: Likewise.
11812
11813         * pthread_setcanceltype.c: Add additional alias
11814         __pthread_setcanceltype.
11815
11816         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11817         * sem_open.c (sem_open): Likewise.
11818         Use __libc_open, __libc_write, and __libc_close instead of
11819         open, write, and close respectively.
11820
11821         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11822         Rewrite as statement expression since it must return a value.
11823
11824         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11825         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11826         __pthread_kill.
11827
11828         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11829         alias __pthread_once_internal.
11830
11831         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11832
11833 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11834
11835         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11836         * tst-stdio1.c: New file.
11837         * tst-stdio2.c: New file.
11838
11839         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11840
11841         * Makefile (tests): Comment out tst-locale2 for now.
11842         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11843
11844         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11845         -D_IO_MTSAFE_IO.
11846         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11847         Use _IO_lock_init instead of explicit assignment.
11848
11849         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11850         Define __libc_lock_* and __libc_lock_recursive macros with
11851         lowlevellock macros, not pthread mutexes.
11852
11853         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11854         of pthread_mutex_lock.
11855         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11856         instead of pthread_mutex_unlock.
11857
11858 2002-12-06  Roland McGrath  <roland@redhat.com>
11859
11860         * allocatestack.c (__stack_user): Use uninitialized defn.
11861         * init.c (__pthread_initialize_minimal): Initialize it here.
11862
11863 2002-12-05  Roland McGrath  <roland@redhat.com>
11864
11865         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11866         string.
11867         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11868
11869         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11870         missing & here too.
11871
11872 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11873
11874         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11875         lowlevellock.
11876         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11877         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11878         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11879         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11880         for __libc_lock_* macros.
11881         * Makefile (routines): Add libc-lowlevellock.
11882
11883 2002-10-09  Roland McGrath  <roland@redhat.com>
11884
11885         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11886         Under [__PIC__], call the function via the pointer fetched for
11887         comparison rather than a call by name that uses the PLT.
11888         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11889         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11890         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11891         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11892         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11893
11894 2002-12-04  Roland McGrath  <roland@redhat.com>
11895
11896         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11897
11898         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11899         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11900
11901         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11902
11903 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11904
11905         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11906         a completely opaque, non-integer type.
11907         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11908
11909 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11910
11911         * sysdeps/i386/tls.h: Include stdlib.h.
11912         * sysdeps/x86_64/tls.h: Likewise.
11913
11914 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11915
11916         * Makefile (tests): Add tst-locale2.
11917         (tests-static): Likewise.
11918         * tst-locale2.c: New file.
11919
11920         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11921         volatile and add memory clobbers to lock operations.
11922
11923 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11924
11925         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11926         * sysdeps/i386/i486/bits/atomic.h: New file.
11927         * sysdeps/i386/i586/bits/atomic.h: New file.
11928         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11929         include i486 version.
11930         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11931         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11932         Patch by Marijn Ros <marijn@mad.scientist.com>.
11933
11934         * allocatestack.c (get_cached_stack): Don't crash if we first
11935         found a stack with a larger size then needed.
11936         Reported by Hui Huang <hui.huang@sun.com>.
11937
11938         * Makefile (tests): Add tst-sysconf.
11939         * tst-sysconf.c: New file.
11940
11941         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11942         PTHREAD_THREADS_MAX.
11943
11944 2002-12-02  Roland McGrath  <roland@redhat.com>
11945
11946         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11947         Declare using hidden_proto instead of attribute_hidden, so there are
11948         non-.hidden static symbols for gdb to find.
11949         (__pthread_keys): Likewise.
11950         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11951         * allocatestack.c (__stack_user): Likewise.
11952         * pthread_create.c (__pthread_keys): Likewise.
11953         (__nptl_threads_events, __nptl_last_event): Make these static instead
11954         of hidden.
11955         * pthread_key_create.c (__pthread_pthread_keys_max,
11956         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11957
11958 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11959
11960         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11961         statically.
11962         * tst-locale1.c: New file.
11963
11964         * pthread_cond_timedwait.c: Include <stdlib.h>.
11965
11966         * Makefile (tests): Add tst-fork2 and tst-fork3.
11967         * tst-fork2.c: New file.
11968         * tst-fork3.c: New file.
11969
11970 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11971
11972         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11973
11974         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11975         require it to 200112L.
11976
11977         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11978         instruction only if HAVE_CMOV is defined.
11979         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11980
11981         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11982
11983         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11984
11985         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11986
11987         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11988
11989 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11990
11991         * sysdeps/x86_64/bits/atomic.h: New file.
11992
11993         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11994         16-bit operations.
11995
11996         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11997         possible since gettid cannot fail.
11998
11999         * sysdeps/x86_64/pthreaddef.h: New file.
12000
12001         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12002
12003         * sysdeps/x86_64/pthread_spin_init.c: New file.
12004         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12005         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12006         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12007
12008         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12009         Add missing lock prefix.  Minute optimization.
12010
12011         * tst-spin2.c (main): Also check successful trylock call.
12012
12013         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12014         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12015
12016         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12017         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12018
12019         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12020         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12021         value in case of an error.  Add support for INTERNAL_SYSCALL.
12022
12023         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12024         value in case of an error.
12025
12026         * sysdeps/x86_64/tls.h: New file.
12027
12028 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12029
12030         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12031         takes the array member name and the index as parameters.
12032         (THREAD_SETMEM_NC): Likewise.
12033         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12034         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12035         interfaces.
12036
12037         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12038         to decide which code to use.
12039         (THREAD_SETMEM_NC): Likewise.
12040
12041         * allocatestack.c (queue_stack): Don't remove stack from list here.
12042         Do it in the caller.  Correct condition to prematurely terminate
12043         loop to free stacks.
12044         (__deallocate_stack): Remove stack from list here.
12045
12046 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12047
12048         * Makefile (tests): Add tst-stack1.
12049         * tst-stack1.c: New file.
12050
12051         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12052         provided stack.
12053
12054         * pthread_attr_getstack.c: Return bottom of the thread area.
12055
12056 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12057
12058         * Makefile (libpthread-routines): Add pt-allocrtsig and
12059         pthread_kill_other_threads.
12060         * pt-allocrtsig.c: New file.
12061         * pthread_kill_other_threads.c: New file.
12062         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12063         all three functions.
12064         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12065         allocrtsig.
12066         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12067         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12068         and __libc_allocate_rtsig_private.
12069         * Versions (libpthread): Export pthread_kill_other_threads_np,
12070         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12071
12072 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12073
12074         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12075         the end of the stack.  Adjust computations.
12076         When mprotect call fails dequeue stack and free it.
12077         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12078         attribute.
12079         * pthread_getattr_np.c: Likewise.
12080
12081         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12082         surprises.
12083
12084 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12085
12086         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12087         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12088
12089 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12090
12091         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12092         * pthread_setspecific.c: Likewise.
12093
12094 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12095
12096         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12097         definitions.  Get them from the official place.
12098         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12099
12100         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12101         Use new CLONE_ flags in clone() calls.
12102
12103         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12104         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12105
12106         * Versions: Add pthread_* functions for libc.
12107         * forward.c: New file.
12108
12109         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12110         errno-loc.
12111         * herrno.c: New file.
12112         * res.c: New file.
12113
12114         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12115         sem_trywait, and sem_timedwait.  Add herrno and res.
12116         * sem_init.c: Don't initialize lock and waiters members.
12117         * sem_open.c: Likewise.
12118         * sem_post.c: Removed.
12119         * sem_wait.c: Removed.
12120         * sem_trywait.c: Removed.
12121         * sem_timedwait.c: Removed.
12122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12123         Includes full implementations of sem_post, sem_wait, sem_trywait,
12124         and sem_timedwait.
12125         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12126         for new implementation.
12127         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12128         and waiters fields.
12129
12130         * tst-sem3.c: Improve error message.
12131         * tst-signal3.c: Likewise.
12132
12133         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12134         to tell the kernel about the termination futex and to initialize tid
12135         member.  Don't initialize main_thread.
12136         * descr.h (struct pthread): Remove main_thread member.
12137         * cancelllation.c (__do_cancel): Remove code handling main thread.
12138         The main thread is not special anymore.
12139
12140         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12141         size of the stacks to stack_cache_actsize.
12142
12143         * pt-readv.c: Add missing "defined".
12144         * pt-sigwait.c: Likewise.
12145         * pt-writev.c: Likewise.
12146
12147 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12148
12149         * Versions: Export __connect from libpthread.
12150         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12151
12152         * Makefile (libpthread-routines): Add pt-raise.
12153         * sysdeps/unix/sysv/linux/raise.c: New file.
12154         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12155         * sysdeps/generic/pt-raise.c: New file.
12156
12157         * pthread_cond_init.c: Initialize all data elements of the condvar
12158         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12159
12160         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12161         * pthread_create.c: Likewise.
12162
12163         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12164         * tst-key1.c: New file.
12165         * tst-key2.c: New file.
12166         * tst-key3.c: New file.
12167
12168         * Versions: Export pthread_detach for version GLIBC_2.0.
12169         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12170
12171 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12172
12173         * pthread_key_create.c: Terminate search after an unused key was found.
12174         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12175
12176         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12177         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12178
12179 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12180
12181         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12182         dynamic lookup for errno in PIC.
12183
12184         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12185         release the stack lock as soon as possible.
12186         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12187         the static TLS block.
12188         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12189
12190         * cancellation.c: Renamed from cancelation.c.
12191         * Makefile: Adjust accordingly.
12192         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12193         * cleanup_defer.c: Use CANCELLATION_P.
12194         * pthread_testcancel.c: Likewise.
12195         * descr.h: Fix spelling in comments.
12196         * init.c: Likewise.
12197         * pthread_getattr_np.c: Likewise.
12198         * pthread_getschedparam.c: Likewise.
12199         * pthread_setschedparam.c: Likewise.
12200         * Versions: Likewise.
12201
12202         * pt-pselect.c: New file.
12203         * Makefile (libpthread-routines): Add pt-pselect.
12204         * Versions: Add pselect.
12205
12206         * tst-cancel4.c: New file.
12207         * Makefile (tests): Add tst-cancel4.
12208
12209 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12210
12211         * pthread_mutex_lock.c: Always record lock ownership.
12212         * pthread_mutex_timedlock.c: Likewise.
12213         * pthread_mutex_trylock.c: Likewise.
12214
12215         * pt-readv.c: New file.
12216         * pt-writev.c: New file.
12217         * pt-creat.c: New file.
12218         * pt-msgrcv.c: New file.
12219         * pt-msgsnd.c: New file.
12220         * pt-poll.c: New file.
12221         * pt-select.c: New file.
12222         * pt-sigpause.c: New file.
12223         * pt-sigsuspend.c: New file.
12224         * pt-sigwait.c: New file.
12225         * pt-sigwaitinfo.c: New file.
12226         * pt-waitid.c: New file.
12227         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12228         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12229         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12230         * Versions: Add all the new functions.
12231
12232         * tst-exit1.c: New file.
12233         * Makefile (tests): Add tst-exit1.
12234
12235         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12236
12237 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12238
12239         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12240
12241         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12242         call.  pthread_join is an official cancellation point.
12243         * pthread_timedjoin.c: Likewise.
12244
12245         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12246         and the condvar's mutex are retrieved.
12247         * pthread_cond_timedwait.c: Likewise.
12248         Reported by dice@saros.East.Sun.COM.
12249
12250 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12251
12252         * pthreadP.h: Cut out all type definitions and move them...
12253         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12254         * pthreadP.h: Include <internaltypes.h>.
12255
12256         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12257         performance tweaks.
12258
12259         * sem_trywait.c: Shuffle #includes around to get right order.
12260         * sem_timedwait.c: Likewise.
12261         * sem_post.c: Likewise.
12262         * sem_wait.c: Likewise.
12263
12264         * nptl 0.3 released.
12265
12266         * Makefile (tests): Add tst-signal3.
12267         * tst-signal3.c: New file.
12268
12269 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12270
12271         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12272         the asms modify the sem object.
12273         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12274
12275         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12276         the actual members.
12277         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12278         * semaphoreP.h: Include pthreadP.h.
12279         * sem_getvalue.c: Adjust to sem_t change.
12280         * sem_init.c: Likewise.
12281         * sem_open.c: Likewise.
12282         * sem_post.c: Likewise.
12283         * sem_timedwait.c: Likewise.
12284         * sem_trywait.c: Likewise.
12285         * sem_wait.c: Likewise.
12286
12287 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12288
12289         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12290         * tst-basic2.c: New file.
12291         * tst-exec1.c: New file.
12292         * tst-exec2.c: New file.
12293         * tst-exec3.c: New file.
12294
12295         * tst-fork1.c: Remove extra */.
12296
12297         * nptl 0.2 released.  The API for IA-32 is complete.