Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO.
[platform/upstream/glibc.git] / nptl / ChangeLog
1 2012-08-15  Roland McGrath  <roland@hack.frob.com>
2
3         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
4         of -D_IO_MTSAFE_IO.
5         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
6
7 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
8
9         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
10         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
11         * pthread_condattr_setclock.c (pthread_condattr_setclock)
12         [!__ASSUME_POSIX_TIMERS]: Likewise.
13         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
14         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
15         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
16         [!__ASSUME_POSIX_TIMERS]: Likewise.
17         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
18         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
19         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
20         code unconditional.
21         [!__NR-timer_create]: Remove conditional code.
22         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
23         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
24         code unconditional.
25         [!__NR_timer_delete]: Remove conditional code.
26         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
27         * sysdeps/unix/sysv/linux/timer_getoverr.c
28         [__NR_timer_getoverrun]: Make code unconditional.
29         [!__NR_timer_getoverrun]: Remove conditional code.
30         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
31         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
32         Make code unconditional.
33         [!__NR_timer_gettime]: Remove conditional code.
34         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
35         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
36         Make code unconditional.
37         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
38         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
39         Make code unconditional.
40         [!__NR_timer_settime]: Remove conditional code.
41         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
42         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
43         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
44         conditional code.
45
46 2012-08-15  Tom de Vries  <vries@codesourcery.com>
47             Maxim Kuvyrkov  <maxim@codesourcery.com>
48
49         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
50         (__libc_lock_trylock): Allow pre-existing definitions.
51
52 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
53
54         * pthread_spin_lock.c: New file.
55         * pthread_spin_trylock.c: New file.
56
57 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
58
59         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
60         code unconditional.
61         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
62         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
63         unconditional.
64         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
65         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
66         Make code unconditional.
67         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
68         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
69         __NR_tgkill]: Make code unconditional.
70         (raise) [__ASSUME_TGKILL]: Likewise.
71         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
72         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
73         [__ASSUME_TGKILL]: Make code unconditional.
74         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
75         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
76         __NR_tgkill]: Make code unconditional.
77         (raise) [__ASSUME_TGKILL]: Likewise.
78         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
79
80 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
81
82         * sysdeps/pthread/createthread.c (create_thread)
83         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
84
85 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
86
87         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
88         code unconditional.
89         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
90
91 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
92
93         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
94         (pagesize): New static variable.
95         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
96         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
97         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
98         halfway up the stack top page.  Verify that the top page was
99         written into.
100         (do_test): Get pagesize using sysconf.
101
102 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
103
104         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
105         label.
106         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
107         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
108         Likewise.
109
110 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
111
112         * tst-pthread-getattr.c: Revert last change.
113
114 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
115
116         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
117         size.
118         (_MIN): New macro.
119         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
120         of MEM to test.
121         (check_stack_top): Read valued written into STACKADDR in
122         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
123
124 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
125
126         * nptl-init.c (sighandler_setxid): Fix the comment that
127         describes it.
128
129 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
130
131         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
132         (__lll_robust_timedlock_wait): Simplify CFI directives.
133
134 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
135
136         [BZ #12416]
137         * Makefile (tests): Add test case.
138         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
139         the __libc_stack_end page from stacksize.  Truncate stacksize to
140         make it page aligned when it is computed from RLIMIT_STACK.
141         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
142         accessible.
143
144 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
145
146         [BZ #14205]
147         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
148         branches.
149
150 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
151             Jakub Jelinek  <jakub@redhat.com>
152
153         [BZ #14188]
154         * sysdeps/pthread/pthread.h
155         [!(defined __GNUC__ && defined __EXCEPTIONS)]
156         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
157         __libc_unlikely instead of __builtin_expect.
158
159 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
160
161         [BZ #14117]
162         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
163         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
164         * sysdeps/unix/sysv/linux/i386/Implies: New file.
165         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
166         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
167         to ...
168         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
169         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
170         to ...
171         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
172
173 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
174
175         [BZ #14132]
176         * nptl-init.c (pthread_functions): Remove use of INTUSE and
177         _internal aliases.
178         (__pthread_initialize_minimal_internal): Likewise.
179         * sem_open.c: Likewise.
180         * sem_unlink.c: Likewise.
181         * pthreadP.h: Replace _internal aliases by hidden_proto
182         declarations.
183         * pthread_getspecific.c: Replace _internal alias by hidden_def.
184         * pthread_key_create.c: Likewise.
185         * pthread_mutex_destroy.c: Likewise.
186         * pthread_mutex_init.c: Likewise.
187         * pthread_mutex_lock.c: Likewise.
188         * pthread_mutex_unlock.c: Likewise.
189         * pthread_once.c: Likewise.
190         * pthread_rwlock_rdlock.c: Likewise.
191         * pthread_rwlock_unlock.c: Likewise.
192         * pthread_rwlock_wrlock.c: Likewise.
193         * pthread_setspecific.c: Likewise.
194         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
195         Likewise.
196         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
197         Likewise.
198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
199         Likewise.
200         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
201         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
202         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
203         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
204         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
205         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
206         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
207         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
208         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
209         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
210         Likewise.
211         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
212         Likewise.
213         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
214         Likewise.
215
216 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
217
218         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
219         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
220
221         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
222         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
223         directives.
224         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
225         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
226         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
227         (pthread_barrier_wait): Likewise.
228         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
229         (__pthread_cond_broadcast): Likewise.
230         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
231         (__pthread_cond_signal): Likewise.
232         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
233         (__pthread_cond_timedwait): Likewise.
234         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
235         Likewise.
236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
237         (__pthread_rwlock_rdlock): Likewise.
238         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
239         (pthread_rwlock_timedrdlock): Likewise.
240         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
241         (pthread_rwlock_timedwrlock): Likewise.
242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
243         (__pthread_rwlock_unlock): Likewise.
244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
245         (__pthread_rwlock_wrlock): Likewise.
246         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
247         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
248         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
249         Likewise.
250         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
251
252 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
253
254         [BZ #12416]
255         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
256         __libc_stack_end rounded to the end of containing page as the
257         real stack end.
258
259 2012-05-25  Rayson Ho  <rho@redhat.com>
260
261         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
262         probes for i386.
263         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
264         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
267         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
271
272 2012-05-25  Rayson Ho  <rho@redhat.com>
273             Roland McGrath  <roland@hack.frob.com>
274
275         * DESIGN-systemtap-probes.txt: New file.
276         * pthread_cond_broadcast.c: SystemTap probes.
277         * pthread_cond_init.c: Likewise.
278         * pthread_cond_signal.c: Likewise.
279         * pthread_cond_wait.c: Likewise.
280         * pthread_cond_destroy.c: Likewise.
281         * pthread_create.c: Likewise.
282         * pthread_join.c: Likewise.
283         * pthread_mutex_destroy.c: Likewise.
284         * pthread_mutex_init.c: Likewise.
285         * pthread_mutex_lock.c: Likewise.
286         * pthread_mutex_timedlock.c: Likewise.
287         * pthread_mutex_unlock.c: Likewise.
288         * pthread_rwlock_destroy.c: Likewise.
289         * pthread_rwlock_rdlock.c: Likewise.
290         * pthread_rwlock_unlock.c: Likewise.
291         * pthread_rwlock_wrlock.c: Likewise.
292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
293         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
294         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
296         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
297         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
299         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
300
301 2012-05-24  Roland McGrath  <roland@hack.frob.com>
302
303         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
304
305 2012-05-17  Andreas Jaeger  <aj@suse.de>
306
307         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
308         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
309         only for older kernels.
310
311 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
312
313         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
314         not define.
315
316 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
317
318         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
319         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
320         (lll_robust_lock): Likewise.
321         (lll_cond_lock): Likewise.
322         (lll_robust_cond_lock): Likewise.
323         (lll_timedlock): Likewise.
324         (lll_robust_timedlock): Likewise.
325         (lll_unlock): Likewise.
326         (lll_robust_unlock): Likewise.
327
328 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
329
330         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
331         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
332
333 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
334
335         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
336         on NWAITERS.
337         (__gcc_personality_v0): Replace 8-byte data alignment with
338         LP_SIZE alignment and .quad with ASM_ADDR.
339
340 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
341
342         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
343         on NWAITERS.
344         (__gcc_personality_v0): Replace 8-byte data alignment with
345         LP_SIZE alignment and .quad with ASM_ADDR.
346
347 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
348
349         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
350         NWAITERS, which is unsigned long int.
351
352 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
353
354         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
355         (__gcc_personality_v0): Replace 8-byte data alignment with
356         LP_SIZE alignment and .quad with ASM_ADDR.
357
358 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
359
360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
361         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
362         __vdso_clock_gettime pointer into RAX_LP.
363         (__gcc_personality_v0): Replace 8-byte data alignment with
364         LP_SIZE alignment and .quad with ASM_ADDR.
365
366 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
367
368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
369         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
370         __vdso_clock_gettime pointer into RAX_LP.
371         (__gcc_personality_v0): Replace 8-byte data alignment with
372         LP_SIZE alignment and .quad with ASM_ADDR.
373
374 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
375
376         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
377         LP_OP(cmp) and R8_LP on dep_mutex pointer.
378
379 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
380
381         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
382         to update pointer in memory.  Load pointer into RDI_LP.
383
384 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
385
386         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
387         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
388         of 8.
389         (LLL_STUB_UNWIND_INFO_END): Likewise.
390         (lll_timedlock): Load timeout pointer into RDX_LP.
391         (lll_robust_timedlock): Likewise.
392
393 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
394             Jakub Jelinek  <jakub@redhat.com>
395
396         [BZ #13613]
397         * Makefile (tests): Add test cases.
398         * descr.h (struct pthread): Add a comment describing multiple_threads.
399         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
400         single-process case.
401         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
402         before setting cancelstate of the thread.
403         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
404         (__libc_multiple_threads): Add explanatory comment.
405         * tst-cancel-self-cancelstate.c: New test case.
406         * tst-cancel-self-canceltype.c: Likewise.
407         * tst-cancel-self-cleanup.c: Supporting file for test cases.
408         * tst-cancel-self-testcancel.c: New test case.
409         * tst-cancel-self.c: Likewise.
410         * vars.c: Expand comment to include single-process case.
411
412 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
413
414         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
415         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
416         to 32 bytes.
417
418 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
419
420         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
421         New.
422         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
423         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
424
425 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
426
427         * shlib-versions: Move x86_64-.*-linux.* entry to ...
428         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
429         * sysdeps/x86_64/x32/shlib-versions: New file.
430
431 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
432
433         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
434         __SIZEOF_PTHREAD_XXX_T.
435         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
436         (pthread_mutex_t): Likewise.
437         (pthread_rwlock_t): Likewise.
438         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
439         is defined.
440
441 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
442
443         * sysdeps/x86_64/x32/tls.h: New file.
444
445 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
446
447         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
448         integer.
449         (THREAD_SETMEM_NC): Likewise.
450
451 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
452
453         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
454         mov/%0.
455
456 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
457
458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
459         (__cleanup_fct_attribute): Check __x86_64__ instead of
460         __WORDSIZE.
461
462 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
463
464         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
465         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
466         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
467         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
468         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
469
470 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
471
472         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
473         instead of __WORDSIZE.
474
475 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
476
477         [BZ #3748]
478         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
479
480 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
481
482         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
483         (__pthread_cond_timedwait): Use CFI directives.
484         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
485         (__pthread_cond_wait): Likewise.
486         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
487         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
488
489 2012-05-03  David S. Miller  <davem@davemloft.net>
490
491         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
492         always have to return 0, especially for the pthread_spin_init
493         alias.
494         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
495         newline.
496         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
497         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
498
499 2012-05-02  David S. Miller  <davem@davemloft.net>
500
501         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
502         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
503         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
504         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
505         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
506         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
507         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
508         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
509         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
510         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
511         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
512         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
513         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
514         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
515         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
516         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
517         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
518         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
519
520 2012-05-02  Allan McRae  <allan@archlinux.org>
521
522         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
523         (LDFLAGS-tst-cancel24): Likewise.
524
525 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
526
527         * sysdeps/i386/pthread_spin_lock.S: New.
528         * sysdeps/i386/pthread_spin_lock.c: Delete.
529         * sysdeps/x86_64/pthread_spin_lock.S: New.
530         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
531
532 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
533
534         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
535         run when cross-compiling.
536
537 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
538
539         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
540         instead of libgcc_s.h.
541
542 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
543
544         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
545
546 2012-03-27  David S. Miller  <davem@davemloft.net>
547
548         * tst-cond16.c (do_test): Use a thread stack size which is either
549         PTHREAD_STACK_MIN or the page size, whichever is larger.
550         * tst-cond18.c (do_test): Likewise.
551
552 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
553
554         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
555         register char * __asm__("rsp") to get stack frame.
556
557 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
558
559         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
560         __NR_futex directly.
561
562 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
563
564         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
565         _Unwind_Ptr first.
566
567 2012-03-16  David S. Miller  <davem@davemloft.net>
568
569         [BZ #13844]
570         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
571         instead of "...".
572         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
573         Delete, not needed.
574
575 2012-03-15  David S. Miller  <davem@davemloft.net>
576
577         [BZ #13844]
578         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
579
580 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
581
582         [BZ #13673]
583         * pt-crti.S: Replace FSF snail mail address with URL.
584
585 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
586
587         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
588         Do not define before including <time.h>.
589
590 2012-03-08  David S. Miller  <davem@davemloft.net>
591
592         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
593
594 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
595
596         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
597         Check for timestamp before the Epoch.
598
599         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
600         updating nwaiters.
601
602         * tst-sem13.c (do_test): Add another test case.
603         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
604         Fix updating nwaiters.
605
606 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
607
608         [BZ #10545]
609         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
610         link test to a compile test.
611         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
612         <stdio.h>.
613         * sysdeps/pthread/configure: Regenerated.
614
615 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
616
617         * Makefile (distribute): Remove variable.
618
619 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
620
621         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
622         superfluous assignment.
623         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
624         Likewise.
625         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
626         (sem_timedwait): Likewise.
627
628 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
629
630         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
631         installed headers to...
632         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
633
634 2012-03-06  David S. Miller  <davem@davemloft.net>
635
636         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
637         atomic_increment and remove unused local variable.
638         (__old_sem_post): Likewise.
639
640 2012-02-27  David S. Miller  <davem@davemloft.net>
641
642         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
643         non-existing __pthread_attr.
644         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
645         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
646         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
647         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
649
650 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
651
652         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
653
654         * sysdeps/pthread/pthread.h: Define __need_timespec before including
655         <time.h>.
656         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
657         union.
658         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
659         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
660         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
661         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
662         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
663
664 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
665
666         [BZ #13695]
667         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
668         pt-initfini.s.
669         [crti.S not in sysdirs] (omit-deps): Do not append.
670         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
671         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
672         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
673         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
674         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
675         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
676         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
677         [crti.S in sysdirs] (extra-objs): Append unconditionally.
678         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
679         unconditionally.
680         * sysdeps/pthread/pt-initfini.c: Remove file.
681
682 2012-02-16  Richard Henderson  <rth@twiddle.net>
683
684         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
685         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
686
687 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
688
689         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
690
691 2012-02-16  David S. Miller  <davem@davemloft.net>
692
693         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
694
695 2012-02-15  Marek Polacek  <polacek@redhat.com>
696
697         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
698
699 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
700
701         Replace FSF snail mail address with URLs, as per GNU coding standards.
702
703 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
704
705         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
706
707 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
708
709         Support crti.S and crtn.S provided directly by architectures.
710         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
711         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
712         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
713         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
714         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
715         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
716         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
717         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
718         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
719         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
720         * pt-crti.S: New file.
721         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
722
723 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
724
725         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
726         macros for PIC register setup.
727         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
728         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
729         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
730         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
731         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
732
733 2012-01-11  Marek Polacek  <polacek@redhat.com>
734
735         * forward.c (FORWARD_NORETURN): Define macro.
736         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
737         (__pthread_exit): Likewise.
738
739 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
740
741         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
742
743         * pthreadP.h: Add noreturn to __pthread_exit.
744         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
745
746 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
747
748         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
749         Call pthread_attr_setstacksize() with result of
750         __pthread_get_minstack() to account for application TLS usage.
751
752 2012-01-08  Marek Polacek  <polacek@redhat.com>
753
754         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
755
756 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
757
758         [BZ #13553]
759         * pthreadP.h: Use const instead of __const.
760         * semaphore.h: Likewise.
761         * sysdeps/pthread/bits/libc-lock.h: Likewise.
762         * sysdeps/pthread/bits/sigthread.h: Likewise.
763         * sysdeps/pthread/pthread.h: Likewise.
764
765         * Makefile: Remove elf=yes test, only ELF is supported.
766
767         * shlib-versions: Remove entries for ports architectures.
768
769         In case anyone cares, the IA-64 architecture could move to ports.
770         * sysdeps/ia64/*: Removed.
771         * sysdeps/unix/sysv/linux/ia64/*: Removed.
772
773 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
774
775         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
776         __pthread_get_minstack.
777         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
778
779         [BZ #13088]
780         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
781         through __pthread_get_minstack.
782         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
783         directly from _rtld_global_ro.
784         (__pthread_get_minstack): New function.
785         * pthreadP.h: Declare __pthread_get_minstack.
786         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
787
788 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
789
790         [BZ #13515]
791         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
792         Correct reading name from file.
793
794 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
795
796         * allocatestack.c (allocate_stack): Return errno on failure.
797
798 2011-12-14  Jeff Law  <law@redhat.com>
799
800         [BZ #5245]
801         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
802
803 2011-11-28  Andreas Schwab  <schwab@redhat.com>
804
805         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
806         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
808
809 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
810
811         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
812         /proc/self/maps.
813
814 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
815
816         [BZ #13358]
817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
818         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
819         path for kernels with FUTEX_CLOCK_REALTIME.
820         Debugged by H.J. Lu <hjl.tools@gmail.com>.
821
822 2011-10-27  Andreas Schwab  <schwab@redhat.com>
823
824         [BZ #13344]
825         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
826         for memory synchronization functions.
827         * semaphore.h: Likewise.
828
829 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
830
831         * tst-cancel7.c: Avoid warning.
832         * tst-mutex6.c: Likewise.
833         * tst-mutex9.c: Likewise.
834         * tst-mutexpi6.c: Likewise.
835
836 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
837
838         * sysdeps/i386/tls.h: Remove #include <list.h>.
839
840 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
841
842         * pthread_create.c (start_thread): Call __ctype_init.
843
844 2011-09-15  Andreas Schwab  <schwab@redhat.com>
845
846         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
847         defined.
848         (list_add): Add atomic_write_barrier.
849         * descr.h: Define __need_list_t before including <list.h>.
850         * nptl-init.c: Include <list.h>
851         * allocatestack.c: Likewise.
852
853 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
854
855         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
856         * sysdeps/ia64/tls.h: Likewise.
857         * sysdeps/powerpc/tls.h: Likewise.
858         * sysdeps/s390/tls.h: Likewise.
859         * sysdeps/sh/tls.h: Likewise.
860         * sysdeps/sparc/tls.h: Likewise.
861         * sysdeps/x86_64/tls.h: Likewise.
862
863 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
864
865         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
866
867         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
868         !USE___THREAD.
869         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
870         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
871         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
872         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
873         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
874         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
875         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
876         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
877         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
878         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
879         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
880         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
881
882         * tst-tls1.c: Support for __thread is now mandatory.
883         * tst-tls2.c: Likewise.
884         * tst-tls3.c: Likewise.
885         * tst-tls3mod.c: Likewise.
886         * tst-tls4.c: Likewise.
887         * tst-tls4moda.c: Likewise.
888         * tst-tls4modb.c: Likewise.
889         * tst-tls5.h: Likewise.
890
891 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
892
893         [BZ #12403]
894         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
895         (pthread_rwlock_timedwrlock): Use correct macro in test.
896         Patch by H.J. Lu <hongjiu.lu@intel.com>.
897
898 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
899
900         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
901         use gettimeofday vsyscall, just call gettimeofday.
902         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
903         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
904         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
905         Likewise.
906         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
907         Likewise.
908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
909         Simplify __vdso_clock_gettime use.
910
911 2011-09-05  David S. Miller  <davem@davemloft.net>
912
913         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
914         New function.
915         (sem_timedwait): Call it to force an exception region around
916         the async cancel enable and the futex operation.
917         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
918         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
919         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
920         (__new_sem_wait): Call it to force an exception region around
921         the async cancel enable and the futex operation.
922         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
923         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
924
925 2011-08-31  Andreas Schwab  <schwab@redhat.com>
926
927         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
928         thread is woken up.
929
930 2011-08-20  David S. Miller  <davem@davemloft.net>
931
932         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
933
934 2011-08-14  Roland McGrath  <roland@hack.frob.com>
935
936         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
937         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
938
939 2011-08-08  Andreas Schwab  <schwab@redhat.com>
940
941         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
942         stack.
943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
945
946 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
947
948         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
949         barrier.
950         (__gcc_personality_v0): Likewise.
951         (_Unwind_ForcedUnwind): Likewise.
952         (_Unwind_GetCFA): Likewise.
953
954 2011-07-14  Roland McGrath  <roland@hack.frob.com>
955
956         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
957         UINTMAX_C.
958
959 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
960
961         * nptl-init.c (__nptl_set_robust): New function.
962         (pthread_functions): Add reference.
963         * npthreadP.h: Declare __nptl_set_robust.
964         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
965         ptr_set_robust member.
966         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
967         child if threads are used.
968
969 2011-06-14  Andreas Jaeger  <aj@suse.de>
970
971         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
972
973 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
974
975         [BZ #386]
976         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
977
978 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
979
980         [BZ #12650]
981         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
982         clearing memory.
983         Patch partly by Robert Rex <robert.rex@exasol.com>.
984
985 2011-01-19  Roland McGrath  <roland@redhat.com>
986
987         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
988         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
989         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
990         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
991         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
992         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
993
994 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
995
996         * Makefile (test-extras): Add tst-cleanup4aux.
997
998 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
999
1000         [BZ #10563]
1001         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1002         (__SETXID_2): Likewise.
1003         (__SETXID_3): Likewise.
1004
1005 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1006
1007         [BZ #10484]
1008         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1009         * alloca_cutoff.c: Add libc_hidden_def.
1010
1011 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1012
1013         [BZ #12113]
1014         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1015         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1016         of "struct pthread".
1017
1018 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1019
1020         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1021         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1022         (pthread_cleanup_push_defer_np): Likewise.
1023
1024 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1025
1026         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1027         small.
1028
1029 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1030             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1031
1032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1033         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1034
1035 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1036
1037         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1038
1039 2010-05-01  Alan Modra  <amodra@gmail.com>
1040
1041         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1042         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1043         to save temps.  Correct cfi for possible later frame manipulation.
1044         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1045         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1046         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1047         (DOCARGS_6, UNDOCARGS_6): Likewise.
1048         (CENABLE, CDISABLE): Add nops for non-shared calls.
1049
1050 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1051
1052         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1053         Fix type mismatch.
1054
1055 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1056
1057         * tst-abstime.c (do_test): Some more cleanups
1058
1059 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1060
1061         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1062
1063 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1064             Ulrich Drepper  <drepper@redhat.com>
1065
1066         * Makefile (tests): Add tst-abstime.
1067         * tst-abstime.c: New file.
1068         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1069         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1071         (__lll_timedlock_wait): Likewise.
1072         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1073         (__lll_robust_timedlock_wait): Likewise.
1074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1075         (__pthread_cond_timedwait): Likewise.
1076         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1077         (pthread_rwlock_timedrdlock): Likewise.
1078         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1079         (pthread_rwlock_timedwrlock): Likewise.
1080         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1081         Likewise.
1082
1083 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1084
1085         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1086
1087 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1088
1089         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1090         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1091
1092 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1093
1094         [BZ #11390]
1095         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1096         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1097         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1098         pthread_setname.
1099         * Makefile (libpthread-routines): Add pthread_getname and
1100         pthread_setname.
1101         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1102
1103 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1104
1105         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1106         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1107         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1108         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1109
1110 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1111
1112         * pthread_cond_timedwait.c: Add check for
1113         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1114         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1115         INTERNAL_SYSCALL.
1116
1117 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1118
1119         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1120         and the call fails wake eventually waiting setxid threads.  Don't free
1121         stack here if we try starting a thread.
1122         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1123         if the clone call failed.
1124
1125 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1126
1127         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1128         * allocatestack.c (get_cached_stack): Set setxid_futex.
1129         (allocate_stack): Likewise.
1130
1131 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1132             Ulrich Drepper  <drepper@redhat.com>
1133
1134         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1135         it is creating a thread or it is just being created.
1136         * pthread_create.c (start_thread): Wake setxid thread if it is
1137         waiting.
1138         (__pthread_create_2_1): Initialize setxid_futex.
1139         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1140         is waiting.
1141
1142 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1143
1144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1145         Fix unwind info.
1146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1147
1148 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1149
1150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1151         Fix pthread_cond_timedwait with requeue-PI.
1152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1153         Fix pthread_cond_wait with requeue-PI.
1154
1155 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1156
1157         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1158         and pthread_mutexattr_setrobust for GLIBC_2.12.
1159         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1160         * pthread_mutexattr_getrobust.c: Define alias
1161         pthread_mutexattr_getrobust.
1162         * pthread_mutexattr_setrobust.c: Define alias
1163         pthread_mutexattr_setrobust.
1164
1165 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1166
1167         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1168
1169 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1170
1171         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1172
1173 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1174
1175         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1176         call __gmon_start__.
1177         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1178
1179 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1180
1181         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1182         using memset.
1183
1184 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1185
1186         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1187         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1188         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1189         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1190         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1192         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1194
1195 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1196
1197         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1198         Don't update nwaiters after invalid timeout is recognized.
1199
1200 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1201
1202         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1203         __gmon_start__.
1204
1205 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1206
1207         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1208         THREAD_SELF->cancelhandling after returning from futex call.
1209
1210 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1211
1212         * tst-sem13.c: New file.
1213         * Makefile (tests): Add tst-sem13.
1214
1215 2009-11-22  Roland McGrath  <roland@redhat.com>
1216
1217         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1218         instead of recapitulating its contents.
1219
1220 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1221
1222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1223         optimizations and cleanups.
1224
1225 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1226
1227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1228         Remove redundant code. Fix cfi offsets.
1229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1230         Fix cfi offsets.
1231
1232 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1233
1234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1235         reduce size of unwind info.
1236
1237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1238         cfi directives.
1239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1240         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1241
1242 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1243
1244         [BZ #4457]
1245         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1246         LIBGCC_S_SO.
1247         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1248
1249 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1250
1251         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1252
1253         [BZ #3270]
1254         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1255         steps to avoid races with creation and terminations.
1256         * nptl-init.c (sighandler_setxid): Adjust.
1257         Patch by Daniel Jacobowitz.
1258
1259 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1260
1261         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1262
1263 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1264             Joseph Myers  <joseph@codesourcery.com>
1265
1266         [BZ #7094]
1267         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1268         Initialize the sigev_notify field for newly created timer to make sure
1269         the timer gets deleted from the active timer's list upon timer_delete.
1270
1271 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1272
1273         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1274         Correct a logic error.
1275
1276 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1277
1278         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1279         of the field in local variables.
1280         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1281         variable and don't unconditionally clear it.
1282
1283 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1284
1285         * pthread_create.c (start_thread): Hint to the kernel that memory for
1286         the stack can be reused.  We do not mark all the memory.  The part
1287         still in use and some reserve are kept.
1288
1289 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1290
1291         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1292
1293 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1294
1295         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1296         directives.
1297
1298 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1299
1300         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1301         directives.
1302         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1303
1304 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1305
1306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1307         (__pthread_cond_signal): Don't clobber register used for syscall
1308         number.
1309
1310 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1311
1312         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1313         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1314
1315         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1316         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1317         register.
1318
1319 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1320
1321         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1322         enabled by the special *_asynccancel functions.
1323         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1324         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1325
1326         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1327
1328 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1329
1330         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1331         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1332         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1333         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1334         since we can assume the special __*_{en,dis}able_asynccancel
1335         functions.
1336         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1337         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1338         and PTHREAD_CANCELED.
1339
1340 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1341
1342         * descr.h: Better definition of *_BITMASK macros for cancellation.
1343
1344 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1345
1346         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1347
1348         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1349         dynamic linker might have to save.
1350         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1351         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1352         printing.
1353
1354         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1355
1356 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1357
1358         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1359         New function.
1360         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1361         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1363         requeue_pi for robust mutexes.
1364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1365         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1366         Don't only skip __pthread_mutex_cond_lock.  Call instead
1367         __pthread_mutex_cond_lock_adjust.
1368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1369
1370         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1371         optimization of PI mutex handling.
1372
1373 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1374
1375         [BZ #10418]
1376         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1377         instead of of _acq variants of cmpxchg.
1378
1379 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1380
1381         * sysdeps/x86_64/configure.in: New file.
1382
1383         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1384         path when not using absolute timeout futex.
1385
1386 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1387
1388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1389         optimizations of last changes.
1390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1391
1392 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1393
1394         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1395         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1397         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1400         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1402
1403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1404         (__pthread_cond_timedwait): Make more robust.
1405
1406 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1407
1408         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1409         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1410         directly use absolute timeout.
1411
1412         * tst-sem5.c (do_test): Add test for premature timeout.
1413         * Makefile: Linu tst-sem5 with librt.
1414
1415         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1416         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1417         directly use absolute timeout.
1418         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1419         (pthread_rwlock_timedrdlock): Likewise.
1420
1421         * tst-cond11.c (run_test): Add test to check that the timeout is
1422         long enough.
1423
1424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1425         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1426         directly use absolute timeout.
1427
1428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1429         (__pthread_cond_wait): Convert to using exception handler instead of
1430         registered unwind buffer.
1431         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1432         (__pthread_cond_timedwait): Likewise.
1433
1434 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1435
1436         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1437         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1438         use absolute timeout.
1439
1440         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1441         handling of uncontested semaphore.
1442
1443         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1444         (__condvar_cleanup): Rewrite to use cfi directives instead of
1445         hand-coded unwind tables.
1446         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1447         Likewise.
1448         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1449         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1450         Likewise.
1451
1452 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1453
1454         * Makefile (libpthread-routines): Add pthread_sigqueue.
1455         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1456         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1457         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1458
1459 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1460
1461         [BZ #10262]
1462         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1463         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1464         cannot be assumed.
1465         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1466
1467 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1468
1469         * libc-cancellation.c: Move __libc_cleanup_routine to...
1470         * libc-cleanup.c: ...here.  New file.
1471         * Makefile (routines): Add libc-cleanup.
1472
1473         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1474         test.
1475         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1476         * sysdeps/pthread/librt-cancellation.c: Likewise.
1477
1478         [BZ #9924]
1479         * nptl-init.c: Renamed from init.c.
1480         * Makefile: Change all occurences of init.c to nptl-init.c.
1481
1482 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1483
1484         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1485         to test when deciding on the delay.
1486         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1487         * pthread_cancel.c: Close race between deciding on sending a signal
1488         and setting the CANCELING_BIT bit.
1489
1490         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1491         thread is canceled.
1492         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1493
1494 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1495
1496         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1497         is available.
1498         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1499         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1500         * sysdeps/i386/tls.h: Likewise.
1501         (tcbhead_t): Add __private_tm member.
1502
1503 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1504
1505         * sem_open.c (sem_open): Rewrite initialization of initsem to
1506         avoid warnings.
1507
1508         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1509         Avoid warning by using may_alias attribute on ptrhack.
1510
1511 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1512
1513         [BZ #10090]
1514         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1515         Check policy and priority for validity.
1516         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1517
1518 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1519
1520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1521         (__pthread_cond_timedwait): Change to use cfi directives instead of
1522         hand-coded unwind sections.
1523
1524 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1525
1526         * init.c (nptl_freeres): Compile only for SHARED.
1527
1528 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1529
1530         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1531         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1532         FUTEX_BITSET_MATCH_ANY.
1533
1534 2009-02-27  Roland McGrath  <roland@redhat.com>
1535
1536         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1537         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1538
1539 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1540
1541         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1542         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1543         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1544         200112L to 200809L.
1545
1546 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1547
1548         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1549         POSIX 2008.
1550
1551 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1552
1553         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1554         Unify name of include protector macro.
1555
1556 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1557
1558         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1559         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1560
1561 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1562
1563         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1564         pointer variables.
1565
1566         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1567         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1568         * init.c (nptl_freeres): New function.
1569         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1570         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1571         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1572         variable.
1573         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1574         load DSO.  Assign last.
1575         (__unwind_freeres): New function.
1576
1577         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1578         for better debugging.  No need to use stack_list_add here.
1579
1580 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1581
1582         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1583         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1584         instead of computing relative timeout.
1585         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1586         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1587
1588 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1589
1590         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1591
1592 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1593
1594         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1595         (list_add_tail): Removed.
1596
1597 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1598
1599         * (in_flight_stack): New variable.
1600         (stack_list_del): New function.  Use instead of list_del.
1601         (stack_list_add): New function.  Use instead of list_add when adding to
1602         stack_cache and stack_used lists.
1603         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1604         when the fork call interrupted another thread.
1605
1606 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1607
1608         * init.c (__pthread_initialize_minimal_internal): Optimize test
1609         FUTEX_CLOCK_REALTIME a bit.
1610
1611 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1612
1613         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1614         only passing five parameters to FUTEX_WAIT_BITSET call.
1615
1616         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1617         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1618         instead of computing relative timeout.
1619
1620 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1621
1622         * init.c (__pthread_initialize_minimal_internal): Check for
1623         FUTEX_CLOCK_REALTIME flag.
1624         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1625         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1626         relative timeout.
1627
1628         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1629         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1630         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1631         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1632         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1633         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1634
1635 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1636
1637         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1638         loop body instead of ; to avoid gcc warnings.
1639         (pthread_cleanup_pop_restore_np): Likewise.
1640         Patch by Caolán McNamara <caolanm@redhat.com>.
1641
1642 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1643
1644         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1645         fast path here, for robust/PI/PP mutexes call
1646         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1647         of ifs according to their probability.
1648         (__pthread_mutex_lock_full): New function.
1649         * pthread_mutex_unlock.c: Include assert.h.
1650         (__pthread_mutex_unlock_usercnt): Handle only the
1651         fast path here, for robust/PI/PP mutexes call
1652         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1653         of ifs according to their probability.
1654         (__pthread_mutex_unlock_full): New function.
1655         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1656         (__pthread_mutex_lock_full): Define.
1657
1658 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1659
1660         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1661         implementation.  Add necessary padding and.
1662         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1663         words.
1664
1665 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1666
1667         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1668         and FUTEX_WAKE_BITSET.
1669
1670 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1671
1672         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1673         and FUTEX_WAKE_BITSET.
1674         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1675         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1676         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1677         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1678
1679 2008-11-25  Roland McGrath  <roland@redhat.com>
1680
1681         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1682         Subdirectories moved to ports repository as
1683         sysdeps/.../nptl subdirectories.
1684
1685 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1686
1687         [BZ #7008]
1688         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1689         of old value.
1690         * pthread_cond_init.c (__pthread_cond_init): Fix
1691         cond->__data.__nwaiters initialization.
1692         * Makefile (tests): Add tst-cond23.
1693         * tst-cond23.c: New test.
1694
1695 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1696
1697         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1698         arguments.
1699         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1700         arguments.
1701
1702 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1703
1704         [BZ #6955]
1705         * pthread_mutex_lock.c: Add support for private PI mutexes.
1706         * pthread_mutex_timedlock.c: Likewise.
1707         * pthread_mutex_trylock.c: Likewise.
1708         * pthread_mutex_unlock.c: Likewise.
1709         Patch mostly by Ben Jackson <ben@ben.com>.
1710
1711 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1712
1713         [BZ #6843]
1714         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1715         Increase stack size for helper thread.
1716
1717 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1718
1719         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1720         assembly with a clobber list for access registers a0 and a1.
1721
1722 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1723
1724         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1725         to force runp->refcntr to be read from memory.
1726
1727 2008-09-08  Richard Guenther  <rguenther@suse.de>
1728
1729         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1730         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1731         lll_timedlock, lll_robust_timedlock, lll_unlock,
1732         lll_robust_unlock): Promote private to int.
1733
1734 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1735
1736         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1737         ARCH_RETRY_MMAP definitions.
1738         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1739         Define MAP_STACK when not defined.
1740         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1741         handling of ARCH_RETRY_MMAP.
1742
1743 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1744
1745         * tst-align2.c (f): Print message that f is reached.
1746
1747 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1748
1749         [BZ #6740]
1750         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1751         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1752
1753 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1754
1755         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1756         SOCK_CLOEXEC if possible.
1757
1758 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1759
1760         * Makefile (tests): Add tst-rwlock2a.
1761         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1762         * tst-rwlock2a.c: New file.
1763
1764 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1765
1766         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1767
1768 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1769
1770         * sysdeps/pthread/pthread.h: Fix typo in comment.
1771
1772 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1773
1774         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1775         of CPU set to the kernel.
1776
1777 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1778
1779         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1780         cfi directives.
1781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1782         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1785         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1786         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1787
1788 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1789
1790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1791         cfi directives.
1792         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1793         Likewise.
1794         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1795         Likewise.
1796         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1797         Likewise.
1798
1799 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1800
1801         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1802
1803 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1804
1805         David S. Miller  <davem@davemloft.net>
1806
1807         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1808
1809 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1810
1811         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1812         __pshared correctly.
1813         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1814         Likewise.
1815         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1816         Likewise.
1817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1818         Likewise.
1819         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1820         Likewise.
1821         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1822
1823 2008-04-14  David S. Miller  <davem@davemloft.net>
1824
1825         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1826         (__old_sem_wait): Fix argument to lll_futex_wait().
1827
1828 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1829
1830         * pthread_create.c: Require pthread_mutex_trylock and
1831         pthread_key_delete for libgcc.
1832
1833 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1834
1835         [BZ #6020]
1836         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1837         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1838         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1839
1840 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1841
1842         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1843         <linux/limits.h> has defined it.
1844         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1845         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1846         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1847         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1848
1849 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1850
1851         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1852         of ASSEMBLER.
1853         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1854         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1855
1856 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1857
1858         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1859         HAVE_DL_DISCOVER_OSVERSION.
1860         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1861         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1862
1863 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1864
1865         [BZ #5778]
1866         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1867         _POSIX_CHOWN_RESTRICTED value to zero.
1868
1869 2008-01-31  Roland McGrath  <roland@redhat.com>
1870
1871         * Makefile (omit-deps): Variable removed.
1872
1873 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1874
1875         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1876         unnecessary addr32 prefix.
1877
1878 2008-01-29  Roland McGrath  <roland@redhat.com>
1879
1880         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1881
1882 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1883
1884         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1885
1886 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1887
1888         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1889         a scratch register.
1890         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1891         (__lll_lock_wait_private): Fix typo.
1892         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1893         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1894         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1895         Adjust XADD use.
1896         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1897         (pthread_rwlock_timedrdlock): Return correct return value.
1898         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1899         (pthread_rwlock_timedwrlock): Likewise.
1900
1901 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1902
1903         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1904         thread returns the program exits with an error code.
1905
1906 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1907
1908         * pthread-errnos.sym: Add EOVERFLOW.
1909         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1910         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1911         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1912         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1913
1914 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1915
1916         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1917         parameter.  Passed it as permission to mmap.
1918         * allocatestack.c (allocate_stack): Pass prot as second parameter
1919         to ARCH_RETRY_MMAP.
1920
1921 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1922
1923         * tst-basic7.c: Allocate memory for the stack.
1924
1925         [BZ #5465]
1926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1927         (__pthread_cond_timedwait): Don't use VDSO.
1928         Patch by Michal Januszewski.
1929
1930 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1931
1932         [BZ #5455]
1933         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1934         Allow label before pthread_cleanup_pop.
1935         (pthread_cleanup_pop_restore_np): Likewise.
1936
1937 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1938
1939         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1940         Store 2 before returning ETIMEDOUT.
1941
1942 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1943
1944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1945         Store 2 before returning ETIMEDOUT.
1946         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1947         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1948         (__lll_lock_wait_private): Optimize.
1949         (__lll_lock_wait): Likewise.
1950
1951 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1952
1953         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1954         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1955         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1956
1957 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
1958
1959         [BZ #5240]
1960         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1961         If we time out, try one last time to lock the futex to avoid
1962         losing a wakeup signal.
1963         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1964         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1965
1966         [BZ #5245]
1967         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1968         if necessary.
1969
1970 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
1971
1972         [BZ #5245]
1973         * allocatestack.c (allocate_stack): Change ENOMEM error in case
1974         mmap failed to EAGAIN.
1975         * Makefile (tests): Add tst-basic7.
1976         * tst-basic7.c: New file.
1977
1978 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
1979
1980         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1981         Use __linkin_atfork.
1982
1983 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1984
1985         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1986         missing line continuations.
1987         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1988         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1989
1990 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1991
1992         [BZ #5220]
1993         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1994         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1995         (struct timer): Add next element.
1996         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1997         enqueue timer structure into __active_timer_sigev_thread list.
1998         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1999         remove timer struct from __active_timer_sigev_thread.
2000         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2001         Before using timer structure make sure it is still on the
2002         __active_timer_sigev_thread list.  Keep lock until done.
2003         Define __active_timer_sigev_thread and
2004         __active_timer_sigev_thread_lock.
2005
2006 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2007
2008         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2009         Redefine thread_atfork for use of ATFORK_MEM.
2010         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2011         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2012         function.
2013         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2014         Use atomic operation when removing first element of list.
2015
2016 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2017
2018         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2019         routine instead of an alias to __new_sem_post.
2020
2021 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2022
2023         * init.c (__pthread_initialize_minimal): Initialize word to appease
2024         valgrind.
2025
2026 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2027
2028         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2029         libc.so just clear NAME.
2030         (__libc_rwlock_fini): Nop inside of libc.so.
2031         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2032         all zeros.
2033
2034 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2035
2036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2037         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2038         unlocking failed.
2039         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2040
2041 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2042
2043         [BZ #4938]
2044         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2045         reclaimed stack if necessary.
2046         * Makefile (tests): Add tst-tsd6.
2047         * tst-tsd6.c: New file.
2048
2049 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2050
2051         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2052         Add private argument.
2053
2054 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2055
2056         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2057         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2058
2059 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2060
2061         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2062         (__lll_robust_timedlock): Pass private as last argument to
2063         __lll_robust_timedlock_wait.
2064         (__lll_unlock): Fix a pasto.
2065
2066 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2067
2068         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2069         sparc_old_sem): New structs.
2070         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2071         (__sem_wait_cleanup): New function.
2072         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2073         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2074         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2075         lll_futex_wait.
2076         (__old_sem_wait): New function.
2077         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2078         nptl/sysdeps/unix/sysv/linux/sparc version.
2079         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2080         Likewise.
2081         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2082         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2083         (__new_sem_trywait): Use sparc_old_sem structure.
2084         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2085         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2086         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2087         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2088         lll_futex_timed_wait.
2089         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2090         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2091         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2092         lll_futex_wake.
2093         (__old_sem_post): New function.
2094         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2095         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2096         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2097         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2098         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2099         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2100
2101 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2102
2103         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2104         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2105         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2106         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2107         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2108         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2109         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2110         Use FUTEX_WAKE_OP.
2111         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2112         kernel-features.h and tcb-offsets.h.
2113         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2114         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2115         process private.
2116         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2117         tcb-offsets.h.
2118         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2119         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2120         process private.
2121         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2122         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2123         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2124         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2125         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2126         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2127         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2128
2129 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2130
2131         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2132         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2133         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2134         lll_futex_timed_wait.
2135
2136         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2137         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2138         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2139         __lll_robust_unlock, __lll_wait_tid): Likewise.
2140
2141 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2142
2143         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2144         Fix a pasto.
2145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2146         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2147         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2148         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2150         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2151         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2153         kernel-features.h.
2154         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2155         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2156         process private.  Switch DW_CFA_advance_loc1 and some
2157         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2158         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2159         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2160         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2161         process private.  Switch DW_CFA_advance_loc{1,2} and some
2162         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2164         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2166         Likewise.
2167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2170         Likewise.
2171         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2172         (__pthread_cond_broadcast): Compare %r8 instead of
2173         dep_mutex-cond_*(%rdi) with $-1.
2174         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2175         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2176         of oring.
2177
2178 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2179
2180         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2181
2182 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2183
2184         * allocatestack.c: Include kernel-features.h.
2185         * pthread_create.c: Likewise.
2186         * pthread_mutex_init.c: Likewise.
2187         * init.c: Likewise.
2188         * pthread_cond_timedwait.c: Likewise.
2189         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2190         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2191         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2192         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2195         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2196         Likewise.
2197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2198         Likewise.
2199         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2200         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2201         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2202         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2203
2204 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2205
2206         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2207         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2208         byte elements.  One of them is the new __shared element.
2209         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2210         adjust names of other padding elements.
2211         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2212         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2213         byte elements.  One of them is the new __shared element.
2214         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2215         adjust names of other padding elements.
2216         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2217         Renamed __pad1 element to __shared, adjust names of other padding
2218         elements.
2219         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2220         (pthread_rwlock_t): Likewise.
2221         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2222         typo.
2223
2224 2007-08-09  Anton Blanchard  <anton@samba.org>
2225
2226         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2227
2228 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2229
2230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2231         <kernel-features.h>.
2232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2233
2234 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2235
2236         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2237         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2238         dealing with robust mutexes.
2239         * pthread_mutex_timedlock.c: Likewise.
2240         * pthread_mutex_trylock.c: Likewise.
2241         * pthread_mutex_unlock.c: Likewise.
2242         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2243
2244 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2245
2246         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2247         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2248         (PTHREAD_MUTEX_PSHARED): Define.
2249         * pthread_mutex_init.c (__pthread_mutex_init): Set
2250         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2251         mutexes.
2252         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2253         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2254         as second argument to lll_lock.
2255         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2256         instead of its __data.__lock field.
2257         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2258         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2259         to lll_robust_lock.
2260         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2261         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2262         instead of mutex->__data.__kind directly, pass
2263         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2264         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2265         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2266         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2267         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2268         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2269         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2270         of mutex->__data.__kind directly.
2271         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2272         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2273         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2274         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2275         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2276         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2277         and lll_futex_wake.
2278         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2279         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2280         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2281         directly.
2282         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2283         Take mutex as argument instead of its __data.__lock field, pass
2284         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2285         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2286         __data.__lock field.
2287         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2288         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2289         to lll_robust_cond_lock.
2290         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2291         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2292         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2293         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2294         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2295         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2296         lll_futex_wait.
2297         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2298         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2299         lll_futex_wake.
2300         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2301         pshared variable, pass it to lll_lock, lll_unlock,
2302         lll_futex_timedwait and lll_futex_wake.
2303         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2304         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2305         and lll_futex_wake.
2306         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2307         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2308         macro.
2309         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2310         lll_futex_wake_unlock): Likewise.
2311         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2312         Likewise.
2313         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2314         lll_futex_wake_unlock): Likewise.
2315         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2316         Likewise.
2317         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2318         lll_futex_wake_unlock): Likewise.
2319         (lll_futex_wake): Fix a typo.
2320         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2322         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2323         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2324         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2326         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2327         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2328         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2329         (__pthread_cond_timedwait): Likewise.
2330         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2331         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2332
2333 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2334
2335         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2336         Don't use CGOTSETUP and CGOTRESTORE macros.
2337         (CGOTSETUP, CGOTRESTORE): Remove.
2338         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2339         @local symbol.
2340
2341 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2342
2343         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2344         definitions for private futexes.
2345         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2346         kernel-features.h and lowlevellock.h.  Use private futexes if
2347         they are available.
2348         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2349         (__lll_mutex_lock_wait): Rename to
2350         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2351         (__lll_mutex_timedlock_wait): Rename to ...
2352         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2353         Don't compile in for libc.so.
2354         (__lll_mutex_unlock_wake): Rename to ...
2355         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2356         (__lll_timedwait_tid): Use __NR_gettimeofday.
2357         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2358         the header from assembler.  Renamed all lll_mutex_* resp.
2359         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2360         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2361         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2362         Define.
2363         (__lll_lock_wait_private): Add prototype.
2364         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2365         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2366         __lll_unlock_wake): Likewise.
2367         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2368         if private is constant LLL_PRIVATE.
2369         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2370         lll_timedlock, lll_robust_timedlock): Add private argument.
2371         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2372         if private is constant LLL_PRIVATE.
2373         (lll_robust_unlock, lll_robust_dead): Add private argument.
2374         (lll_lock_t): Remove.
2375         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2376         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2377         lll_cond_wake, lll_cond_broadcast): Remove.
2378         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2379         kernel-features.h and lowlevellock.h.
2380         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2381         (LOAD_FUTEX_WAIT): Define.
2382         (__lll_robust_mutex_lock_wait): Rename to ...
2383         (__lll_robust_lock_wait): ... this.  Add private argument.
2384         Use LOAD_FUTEX_WAIT macro.
2385         (__lll_robust_mutex_timedlock_wait): Rename to ...
2386         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2387         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2388         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2389         lowlevellock.h.
2390         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2391         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2392         __lll_mutex_{lock,unlock}_*.
2393         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2394         lowlevellock.h and pthread-errnos.h.
2395         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2396         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2397         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2398         __lll_mutex_{lock,unlock}_*.
2399         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2400         lowlevellock.h and pthread-errnos.h.
2401         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2402         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2403         __lll_mutex_{lock,unlock}_*.
2404         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2405         lowlevellock.h.
2406         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2407         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2408         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2409         (__condvar_tw_cleanup): Likewise.
2410         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2411         lowlevellock.h.
2412         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2413         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2414         __lll_mutex_{lock,unlock}_*.
2415         ( __condvar_w_cleanup): Likewise.
2416         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2417         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2418         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2419         lowlevellock.h.
2420         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2421         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2422         __lll_mutex_{lock,unlock}_*.
2423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2424         lowlevellock.h.
2425         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2426         FUTEX_PRIVATE_FLAG): Remove.
2427         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2428         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2429         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2430         lowlevellock.h.
2431         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2432         FUTEX_PRIVATE_FLAG): Remove.
2433         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2434         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2435         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2436         lowlevellock.h.
2437         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2438         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2439         __lll_mutex_{lock,unlock}_*.
2440         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2441         lowlevellock.h.
2442         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2443         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2444         __lll_mutex_{lock,unlock}_*.
2445         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2446         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2447         (__new_sem_post): Use standard initial exec code sequences.
2448         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2449         lowlevellock.h.
2450         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2451         FUTEX_PRIVATE_FLAG): Remove.
2452         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2453         exec code sequences.
2454         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2455         (__new_sem_trywait): Use standard initial exec code sequences.
2456         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2457         (__new_sem_wait): Use standard initial exec code sequences.
2458
2459 2007-07-31  Anton Blanchard  <anton@samba.org>
2460
2461         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2462         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2463         atomic_full_barrier.
2464
2465 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2466
2467         * allocatestack.c (stack_cache_lock): Change type to int.
2468         (get_cached_stack, allocate_stack, __deallocate_stack,
2469         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2470         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2471         as second argument to lll_lock and lll_unlock macros on
2472         stack_cache_lock.
2473         * pthread_create.c (__find_in_stack_list): Likewise.
2474         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2475         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2476         as second argument.
2477         * descr.h (struct pthread): Change lock and setxid_futex field
2478         type to int.
2479         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2480         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2481         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2482         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2483         Likewise.
2484         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2485         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2486         * pthreadP.h (__attr_list_lock): Change type to int.
2487         * pthread_attr_init.c (__attr_list_lock): Likewise.
2488         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2489         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2490         lll_{,un}lock.
2491         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2492         also for lll_futex_{wake,wait}.
2493         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2494         a pointer to const.
2495         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2496         LLL_SHARED as second argument to lll_{,un}lock.
2497         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2498         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2499         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2500         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2501         Likewise.
2502         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2503         as second argument to lll_{,un}lock macros on pd->lock.
2504         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2505         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2506         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2507         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2508         Likewise.
2509         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2510         Likewise.
2511         * pthread_once.c (once_lock): Change type to int.
2512         (__pthread_once): Pass LLL_PRIVATE as second argument to
2513         lll_{,un}lock macros on once_lock.
2514         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2515         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2516         rwlock->__data.__shared as second argument to them and similarly
2517         for lll_futex_w*.
2518         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2519         Likewise.
2520         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2521         Likewise.
2522         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2523         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2524         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2525         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2526         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2527         to lll_{,un}lock macros on __sem_mappings_lock.
2528         * sem_open.c (check_add_mapping): Likewise.
2529         (__sem_mappings_lock): Change type to int.
2530         * semaphoreP.h (__sem_mappings_lock): Likewise.
2531         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2532         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2533         instead of lll_*mutex_*, pass LLL_SHARED as last
2534         argument.
2535         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2536         pass LLL_SHARED as last argument.
2537         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2538         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2539         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2540         pass LLL_SHARED as last argument.
2541         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2542         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2543         LLL_SHARED as last argument.
2544         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2545         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2546         Similarly.
2547         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2548         __libc_lock_lock_recursive, __libc_lock_unlock,
2549         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2550         argument to lll_{,un}lock.
2551         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2552         _IO_lock_unlock): Likewise.
2553         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2554         compound literal.
2555         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2556         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2557         __fork_lock.
2558         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2559         free_mem): Likewise.
2560         (__fork_lock): Change type to int.
2561         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2562         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2563         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2564         lll_futex_wake.
2565         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2566         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2567         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2568         New function.
2569         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2570         pass it through to lll_futex_*wait, only compile in when
2571         IS_IN_libpthread.
2572         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2573         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2574         argument and pass it through to lll_futex_*wait.
2575         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2576         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2577         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2578         inline functions to __lll_* resp. __lll_robust_*.
2579         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2580         (lll_mutex_dead): Add private argument.
2581         (__lll_lock_wait_private): New prototype.
2582         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2583         __lll_robust_lock_timedwait): Add private argument to prototypes.
2584         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2585         call __lll_lock_wait_private, otherwise pass private to
2586         __lll_lock_wait.
2587         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2588         __lll_robust_timedlock): Add private argument, pass it to
2589         __lll_*wait functions.
2590         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2591         call __lll_unlock_wake_private, otherwise pass private to
2592         __lll_unlock_wake.
2593         (__lll_robust_unlock): Add private argument, pass it to
2594         __lll_robust_unlock_wake.
2595         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2596         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2597         argument, pass it through to __lll_* inline function.
2598         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2599         (lll_lock_t): Remove.
2600         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2601         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2602         lll_cond_wake, lll_cond_broadcast): Remove.
2603         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2604         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2605         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2606         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2607         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2608         the header from assembler.  Renamed all lll_mutex_* resp.
2609         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2610         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2611         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2612         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2613         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2614         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2615         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2616         Remove prototype.
2617         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2618         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2619         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2620         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2621         MULTIPLE_THREADS_OFFSET as another asm operand.
2622         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2623         MULTIPLE_THREADS_OFFSET as last asm operand, call
2624         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2625         otherwise pass private as another argument to __lll_lock_wait.
2626         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2627         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2628         private as another argument to __lll_*lock_wait call.
2629         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2630         MULTIPLE_THREADS_OFFSET as another asm operand, call
2631         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2632         otherwise pass private as another argument to __lll_unlock_wake.
2633         (lll_robust_unlock): Add private argument, pass private as another
2634         argument to __lll_unlock_wake.
2635         (lll_robust_dead): Add private argument, use __lll_private_flag
2636         macro.
2637         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2638         LLL_MUTEX_LOCK_INITIALIZER.
2639         (lll_lock_t): Remove.
2640         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2641         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2642         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2643         lll_cond_wake, lll_cond_broadcast): Remove.
2644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2645         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2646         2007-05-2{3,9} changes.
2647         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2648         kernel-features.h and lowlevellock.h.
2649         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2650         (LOAD_FUTEX_WAIT): Rewritten.
2651         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2652         define.
2653         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2654         (__lll_mutex_lock_wait): Rename to ...
2655         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2656         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2657         (__lll_mutex_timedlock_wait): Rename to ...
2658         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2659         contains private argument.  Don't compile in for libc.so.
2660         (__lll_mutex_unlock_wake): Rename to ...
2661         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2662         Don't compile in for libc.so.
2663         (__lll_timedwait_tid): Use __NR_gettimeofday.
2664         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2665         kernel-features.h and lowlevellock.h.
2666         (LOAD_FUTEX_WAIT): Define.
2667         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2668         define.
2669         (__lll_robust_mutex_lock_wait): Rename to ...
2670         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2671         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2672         macro.
2673         (__lll_robust_mutex_timedlock_wait): Rename to ...
2674         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2675         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2676         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2677         lowlevellock.h.
2678         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2679         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2680         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2681         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2682         to __lll_lock_wait in %edx.
2683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2684         Include lowlevellock.h and pthread-errnos.h.
2685         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2686         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2687         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2688         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2689         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2690         __lll_unlock_wake.
2691         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2692         Include lowlevellock.h and pthread-errnos.h.
2693         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2694         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2695         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2696         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2697         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2698         __lll_unlock_wake.
2699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2700         Include lowlevellock.h.
2701         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2702         Don't define.
2703         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2704         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2705         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2706         __lll_unlock_wake.  Use __NR_gettimeofday.
2707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2708         Include lowlevellock.h.
2709         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2710         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2711         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2712         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2713         and __lll_unlock_wake.
2714         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2715         Include lowlevellock.h.
2716         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2717         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2718         MUTEX(%ebx) address in %edx rather than %ecx to
2719         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2720         and __lll_unlock_wake.  Move return value from %ecx to %edx
2721         register.
2722         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2723         Include lowlevellock.h.
2724         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2725         Don't define.
2726         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2727         MUTEX(%ebp) address in %edx rather than %ecx to
2728         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2729         and __lll_unlock_wake.  Move return value from %ecx to %edx
2730         register.  Use __NR_gettimeofday.
2731         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2732         Include lowlevellock.h.
2733         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2734         Don't define.
2735         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2736         MUTEX(%ebp) address in %edx rather than %ecx to
2737         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2738         and __lll_unlock_wake.  Move return value from %ecx to %edx
2739         register.  Use __NR_gettimeofday.
2740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2741         Include lowlevellock.h.
2742         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2743         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2744         MUTEX(%edi) address in %edx rather than %ecx to
2745         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2746         and __lll_unlock_wake.
2747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2748         Include lowlevellock.h.
2749         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2750         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2751         MUTEX(%ebx) address in %edx rather than %ecx to
2752         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2753         and __lll_unlock_wake.  Move return value from %ecx to %edx
2754         register.
2755         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2756         lowlevellock.h.
2757         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2758         define.
2759         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2760         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2761         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2762         lowlevellock.h.
2763         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2764         (sem_timedwait): Use __NR_gettimeofday.
2765         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2766         lowlevellock.h.
2767         (LOCK): Don't define.
2768         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2769         lowlevellock.h.
2770         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2771         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2772         are waiters.
2773         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2774         2007-05-2{3,9} changes.
2775         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2776         kernel-features.h and lowlevellock.h.
2777         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2778         (LOAD_FUTEX_WAIT): Rewritten.
2779         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2780         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2781         (__lll_mutex_lock_wait): Rename to ...
2782         (__lll_lock_wait): ... this.  %esi is now private argument.
2783         Don't compile in for libc.so.
2784         (__lll_mutex_timedlock_wait): Rename to ...
2785         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2786         Don't compile in for libc.so.
2787         (__lll_mutex_unlock_wake): Rename to ...
2788         (__lll_unlock_wake): ... this.  %esi contains private argument.
2789         Don't compile in for libc.so.
2790         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2791         kernel-features.h and lowlevellock.h.
2792         (LOAD_FUTEX_WAIT): Define.
2793         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2794         (__lll_robust_mutex_lock_wait): Rename to ...
2795         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2796         Use LOAD_FUTEX_WAIT macro.
2797         (__lll_robust_mutex_timedlock_wait): Rename to ...
2798         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2799         private, use LOAD_FUTEX_WAIT macro.
2800         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2801         lowlevellock.h.
2802         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2803         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2804         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2805         __lll_lock_wait and __lll_unlock_wake.
2806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2807         Include lowlevellock.h and pthread-errnos.h.
2808         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2809         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2810         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2811         pass LLL_SHARED in %esi to both __lll_lock_wait and
2812         __lll_unlock_wake.
2813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2814         Include lowlevellock.h and pthread-errnos.h.
2815         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2816         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2817         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2818         pass LLL_SHARED in %esi to both __lll_lock_wait and
2819         __lll_unlock_wake.
2820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2821         Include lowlevellock.h.
2822         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2823         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2824         pass LLL_SHARED in %esi to both __lll_lock_wait and
2825         __lll_unlock_wake.
2826         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2827         Include lowlevellock.h.
2828         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2829         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2830         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2831         and __lll_unlock_wake.
2832         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2833         Include lowlevellock.h.
2834         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2835         Don't define.
2836         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2837         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2838         and __lll_unlock_wake.
2839         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2840         Include lowlevellock.h.
2841         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2842         Don't define.
2843         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2844         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2845         and __lll_unlock_wake.
2846         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2847         Include lowlevellock.h.
2848         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2849         Don't define.
2850         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2851         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2852         and __lll_unlock_wake.
2853         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2854         Include lowlevellock.h.
2855         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2856         Don't define.
2857         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2858         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2859         and __lll_unlock_wake.
2860         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2861         Include lowlevellock.h.
2862         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2863         Don't define.
2864         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2865         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2866         and __lll_unlock_wake.
2867         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2868         lowlevellock.h.
2869         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2870         define.
2871         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2872         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2873         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2874         lowlevellock.h.
2875         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2876         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2877         lowlevellock.h.
2878         (LOCK): Don't define.
2879         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2880         lowlevellock.h.
2881         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2882         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2883         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2884         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2885         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2886         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2887         (__lll_lock_wait_private): New function.
2888         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2889         it to lll_futex_*wait.  Don't compile in for libc.so.
2890         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2891         Remove.
2892         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2893         (struct sparc_pthread_barrier): Remove.
2894         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2895         struct sparc_pthread_barrier.  Pass
2896         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2897         and lll_futex_wait macros.
2898         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2899         Remove.
2900         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2901         Include sparc pthread_barrier_wait.c instead of generic one.
2902
2903 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2904
2905         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2906
2907         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2908         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2909         %ecx.
2910         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2911         (pthread_rwlock_timedwrlock): Likewise.
2912         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2913         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2914
2915 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2916
2917         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2918
2919 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2920
2921         * tst-locale2.c (useless): Add return statement.
2922
2923 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2924
2925         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2926         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2927         * pthread_create.c (start_thread): Likewise.
2928         * init.c (sighandler_setxid): Likewise.
2929         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2930         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2931         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2932         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2933         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2934         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2935         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2936         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2937         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2938         Likewise.
2939         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2940         Likewise.
2941         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2942         Likewise.
2943         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2944         __rtld_notify): Likewise.
2945         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2946         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2947         __pthread_once): Likewise.
2948         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2949         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2950         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2951         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2952         (lll_futex_wait): Add private argument, define as wrapper around
2953         lll_futex_timed_wait.
2954         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2955         use __lll_private_flag macro.
2956         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2957         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2958         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2959         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2960         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2961         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2962         (lll_futex_wait): Add private argument, define as wrapper around
2963         lll_futex_timed_wait.
2964         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2965         use __lll_private_flag macro.
2966         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2967         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2968         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2969         Define.
2970         (lll_futex_timed_wait, lll_futex_wake): Use it.
2971         (lll_private_futex_wait, lll_private_futex_timed_wait,
2972         lll_private_futex_wake): Removed.
2973         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2974         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2975         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2976         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2977         (lll_futex_wait): Add private argument, define as wrapper around
2978         lll_futex_timed_wait.
2979         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2980         use __lll_private_flag macro.
2981         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2982         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2983         to lll_futex_*.
2984         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2985         (lll_private_futex_wait, lll_private_futex_timed_wait,
2986         lll_private_futex_wake): Removed.
2987         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2988         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2989         (lll_private_futex_wait, lll_private_futex_timed_wait,
2990         lll_private_futex_wake): Removed.
2991         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2992         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2993         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2994         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2995         (lll_futex_wait): Add private argument, define as wrapper around
2996         lll_futex_timed_wait.
2997         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2998         use __lll_private_flag macro.
2999         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3000         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3001         to lll_futex_*.
3002         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3003         Define.
3004         (lll_futex_timed_wait, lll_futex_wake): Use it.
3005         (lll_private_futex_wait, lll_private_futex_timed_wait,
3006         lll_private_futex_wake): Removed.
3007
3008 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3009
3010         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3011         of the structure for sparc32.
3012
3013 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3014
3015         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3016
3017 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3018
3019         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3020         code used when private futexes are assumed.
3021         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3022         Likewise.
3023
3024 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3025
3026         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3027         (__lll_private_flag): Define.
3028         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3029         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3030         __lll_private_flag.
3031         (lll_private_futex_wait, lll_private_futex_timedwait,
3032         lll_private_futex_wake): Define as wrapper around non-_private
3033         macros.
3034         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3035         (__lll_private_flag): Define.
3036         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3037         (lll_private_futex_wait, lll_private_futex_timedwait,
3038         lll_private_futex_wake): Define as wrapper around non-_private
3039         macros.
3040
3041 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3042
3043         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3044         parameter to lll_futex_wait call.
3045         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3046
3047         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3048         Replace lll_futex_wait with lll_private_futex_wait.
3049         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3050         Add LLL_SHARED parameter to lll_futex_wake().
3051
3052         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3053         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3054         lll_private_futex_wake.
3055         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3056         bit from private parm before syscall.
3057         (lll_futex_timed_wait): Likewise.
3058         (lll_futex_wake): Likewise.
3059         (lll_futex_wake_unlock): Likewise.
3060         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3061         (lll_robust_mutex_unlock): Likewise.
3062         (lll_mutex_unlock_force): Likewise.
3063         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3064
3065 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3066
3067         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3068         compilation when unconditionally using private futexes.
3069         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3070         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3071         Likewise.
3072         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3073         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3074
3075 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3076
3077         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3078         Define.
3079
3080 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3081
3082         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3083         kernel-features.h.
3084
3085 2007-05-16  Roland McGrath  <roland@redhat.com>
3086
3087         * init.c (__nptl_initial_report_events): New variable.
3088         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3089         to that.
3090
3091 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3092
3093         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3094         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3095
3096 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3097
3098         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3099         implementation.
3100
3101 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3102
3103         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3104         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3105         * pthread_mutex_timedlock.c: Likewise.
3106         * pthread_mutex_trylock.c: Likewise.
3107         * pthread_mutex_unlock.c: Likewise.
3108
3109 2007-06-17  Andreas Schwab  <schwab@suse.de>
3110
3111         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3112         sections.
3113
3114 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3115
3116         * allocatestack.c (allocate_stack): Make code compile if
3117         __ASSUME_PRIVATE_FUTEX is set.
3118
3119 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3120
3121         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3122         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3123         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3124         (__pthread_rwlock_wrlock): Likewise.
3125         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3126         (pthread_rwlock_timedrdlock): Likewise.
3127         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3128         (pthread_rwlock_timedwrlock): Likewise.
3129         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3130         (__pthread_rwlock_unlock): Likewise.
3131
3132 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3133
3134         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3135         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3136         Split __flags into __flags, __shared, __pad1 and __pad2.
3137         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3138         futexes if they are available.
3139         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3140         in libc-lowlevellock.S allow using private futexes.
3141         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3142         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3143         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3144         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3145         lll_private_futex_timed_wait and lll_private_futex_wake.
3146         (lll_robust_mutex_unlock): Fix typo.
3147         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3148         field in futex command setup.
3149         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3150         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3151         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3152         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3153         if they are available.  Remove clear_once_control.
3154         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3155         futexes if they are available.
3156         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3157         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3158         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3159         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3160         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3161         Wake only when there are waiters.
3162         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3163         support.  Indicate that there are waiters.  Remove unnecessary
3164         extra cancellation test.
3165         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3166         left-over duplication of __sem_wait_cleanup.
3167
3168 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3169
3170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3171         parameter to lll_futex_wait, lll_futex_timed_wait, and
3172         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3173         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3174         lll_private_futex_wake.
3175         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3176         * allocatestack.c: Adjust use of lll_futex_* macros.
3177         * init.c: Likewise.
3178         * lowlevellock.h: Likewise.
3179         * pthread_barrier_wait.c: Likewise.
3180         * pthread_cond_broadcast.c: Likewise.
3181         * pthread_cond_destroy.c: Likewise.
3182         * pthread_cond_signal.c: Likewise.
3183         * pthread_cond_timedwait.c: Likewise.
3184         * pthread_cond_wait.c: Likewise.
3185         * pthread_create.c: Likewise.
3186         * pthread_mutex_lock.c: Likewise.
3187         * pthread_mutex_setprioceiling.c: Likewise.
3188         * pthread_mutex_timedlock.c: Likewise.
3189         * pthread_mutex_unlock.c: Likewise.
3190         * pthread_rwlock_timedrdlock.c: Likewise.
3191         * pthread_rwlock_timedwrlock.c: Likewise.
3192         * pthread_rwlock_unlock.c: Likewise.
3193         * sysdeps/alpha/tls.h: Likewise.
3194         * sysdeps/i386/tls.h: Likewise.
3195         * sysdeps/ia64/tls.h: Likewise.
3196         * sysdeps/powerpc/tls.h: Likewise.
3197         * sysdeps/pthread/aio_misc.h: Likewise.
3198         * sysdeps/pthread/gai_misc.h: Likewise.
3199         * sysdeps/s390/tls.h: Likewise.
3200         * sysdeps/sh/tls.h: Likewise.
3201         * sysdeps/sparc/tls.h: Likewise.
3202         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3203         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3204         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3205         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3206         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3207         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3208         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3209         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3210         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3211         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3212         Likewise.
3213         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3214         * sysdeps/x86_64/tls.h: Likewise.
3215
3216 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3217
3218         * pthread_getattr_np.c: No need to install a cancellation handler,
3219         this is no cancellation point.
3220         * pthread_getschedparam.c: Likewise.
3221         * pthread_setschedparam.c: Likewise.
3222         * pthread_setschedprio.c: Likewise.
3223         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3224         lll_unlock_wake_cb.
3225         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3227         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3228         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3229         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3230         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3231         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3232         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3233         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3234         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3235         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3236         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3237
3238         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3239         whether there are more than one thread makes no sense here since
3240         we only call the slow path if the locks are taken.
3241         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3242
3243         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3244         COND_NWAITERS_SHIFT.
3245         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3246         COND_CLOCK_BITS.
3247         * pthread_cond_init.c: Likewise.
3248         * pthread_cond_timedwait.c: Likewise.
3249         * pthread_cond_wait.c: Likewise.
3250         * pthread_condattr_getclock.c: Likewise.
3251         * pthread_condattr_setclock.c: Likewise.
3252         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3257
3258 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3259
3260         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3261         unistd.h.
3262
3263         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3264         insn suffix.
3265         (THREAD_GSCOPE_GET_FLAG): Remove.
3266         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3267         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3268         changes.
3269         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3270         (THREAD_GSCOPE_GET_FLAG): Remove.
3271         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3272         instead of THREAD_GSCOPE_GET_FLAG.
3273         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3274         it.
3275         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3276         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3277         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3278         THREAD_GSCOPE_WAIT): Define.
3279         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3280         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3281         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3282         THREAD_GSCOPE_WAIT): Define.
3283         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3284         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3285         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3286         THREAD_GSCOPE_WAIT): Define.
3287         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3288         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3289         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3290         THREAD_GSCOPE_WAIT): Define.
3291
3292 2007-05-24  Richard Henderson  <rth@redhat.com>
3293
3294         * descr.h (struct pthread): Add header.gscope_flag.
3295         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3296         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3297         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3298         THREAD_GSCOPE_WAIT): Define.
3299
3300 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3301
3302         * init.c: Make it compile with older kernel headers.
3303
3304         * tst-initializers1.c: Show through exit code which test failed.
3305
3306         * pthread_rwlock_init.c: Also initialize __shared field.
3307         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3308         element in rwlock structure into four byte elements.  One of them is
3309         the new __shared element.
3310         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3311         Likewise.
3312         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3313         __shared, adjust names of other padding elements.
3314         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3315         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3316         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3317         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3318         FUTEX_PRIVATE_FLAG.
3319         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3320         futex to use private operations if possible.
3321         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3322         Likewise.
3323         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3324         Likewise.
3325         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3326         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3327         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3328         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3329         Likewise.
3330         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3331         Likewise.
3332         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3333         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3334
3335 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3336
3337         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3338         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3339         * pthread_rwlock_timedrdlock.c: Likewise.
3340         * pthread_rwlock_tryrdlock.c: Likewise.
3341
3342         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3343         optimization.
3344
3345         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3346         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3347         duplication of __sem_wait_cleanup.
3348
3349         * allocatestack.c: Revert last change.
3350         * init.c: Likewise.
3351         * sysdeps/i386/tls.h: Likewise.
3352         * sysdeps/x86_64/tls.h: Likewise.
3353         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3354         header structure.
3355         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3356
3357         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3358         Add private field.
3359         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3360         * pthread_barrier_init.c: Set private flag if pshared and private
3361         futexes are supported.
3362         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3363         private field in futex command setup.
3364         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3365
3366 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3367
3368         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3369         support.
3370         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3371         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3372         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3373         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3374         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3375
3376         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3377         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3378         fields in the structure.
3379         (__old_sem_init): New function.
3380         * sem_open.c: Initialize all fields of the structure.
3381         * sem_getvalue.c: Adjust for renamed element.
3382         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3383         (gen-as-const-headers): Add structsem.sym.
3384         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3385         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3386         struct new_sem.  Add struct old_sem.
3387         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3388         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3389         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3390         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3391         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3392         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3393         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3394         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3395         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3396         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3397         * tst-sem10.c: New file.
3398         * tst-sem11.c: New file.
3399         * tst-sem12.c: New file.
3400         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3401         of struct sem.
3402
3403 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3404             Jakub Jelinek  <jakub@redhat.com>
3405
3406         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3407         Move __pthread_enable_asynccancel right before futex syscall.
3408         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3409         Likewise.
3410
3411 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3412
3413         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3414         THREAD_COPY_PRIVATE_FUTEX): Define.
3415         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3416         THREAD_COPY_PRIVATE_FUTEX): Define.
3417         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3418         * init.c (__pthread_initialize_minimal_internal): Use
3419         THREAD_SET_PRIVATE_FUTEX.
3420
3421         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3422         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3423         THREAD_GSCOPE_FLAG_WAIT): Define.
3424         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3425         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3426         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3427         PTR_DEMANGLE.
3428         (THREAD_GSCOPE_GET_FLAG): Define.
3429         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3430         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3431         instead of ->header.gscope_flag directly.
3432
3433 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3434
3435         * init.c (__pthread_initialize_minimal_internal): Check whether
3436         private futexes are available.
3437         * allocatestack.c (allocate_stack): Copy private_futex field from
3438         current thread into the new stack.
3439         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3440         futexes if they are available.
3441         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3442         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3443         in libc-lowlevellock.S allow using private futexes.
3444         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3446         FUTEX_PRIVATE_FLAG.
3447         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3448         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3449         if they are available.
3450         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3451         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3452         * sysdeps/i386/tcb-offsets.sym: Likewise.
3453         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3454         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3455
3456 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3457
3458         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3459         Remove ptr_wait_lookup_done again.
3460         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3461         (__pthread_initialize_minimal_internal): Initialize
3462         _dl_wait_lookup_done pointer in _rtld_global directly.
3463         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3464         Remove code to code _dl_wait_lookup_done.
3465         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3466         encrypted for now.
3467
3468 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3469
3470         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3471         pthread_mutex_init failed with ENOTSUP.
3472
3473 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3474
3475         * allocatestack.c (__wait_lookup_done): New function.
3476         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3477         Add ptr_wait_lookup_done.
3478         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3479         * pthreadP.h: Declare __wait_lookup_done.
3480         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3481         Define macros to implement reference handling of global scope.
3482         * sysdeps/x86_64/tls.h: Likewise.
3483         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3484         Initialize GL(dl_wait_lookup_done).
3485
3486 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3487
3488         [BZ #4512]
3489         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3490         is detected.
3491         * pthread_mutex_timedlock.c: Likewise.
3492         * pthread_mutex_trylock.c: Likewise.
3493         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3494
3495         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3496         * tst-robust9.c: New file.
3497         * tst-robustpi9.c: New file.
3498
3499         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3500         unnecessary extra cancellation test.
3501
3502 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3503
3504         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3505         extra cancellation test.
3506         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3507
3508 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3509
3510         * descr.h (struct pthread): Rearrange members to fill hole in
3511         64-bit layout.
3512
3513         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3514         (__pthread_setaffinity_new): If syscall was successful and
3515         RESET_VGETCPU_CACHE is defined, use it before returning.
3516         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3517
3518 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3519
3520         [BZ #4455]
3521         * tst-align2.c: Include stackinfo.h.
3522         * tst-getpid1.c: Likewise.
3523
3524 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3525
3526         [BZ #4455]
3527         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3528         * tst-getpid1.c (do_test): Likewise.
3529
3530         [BZ #4456]
3531         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3532         (allocate_stack): Likewise.
3533
3534 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3535
3536         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3537         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3538         (__lll_robust_timedlock_wait): Likewise.
3539         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3540
3541 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3542
3543         [BZ #4465]
3544         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3545         * tst-cancel4.c (tf_fdatasync): New test.
3546
3547 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3548
3549         [BZ #4392]
3550         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3551         check mutexes like normal mutexes.
3552
3553         [BZ #4306]
3554         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3555         Initialize the whole sigevent structure to appease valgrind.
3556
3557 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3558
3559         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3560         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3561
3562 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3563
3564         * tst-locale1.c: Avoid warnings.
3565         * tst-locale2.c: Likewise.
3566
3567 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3568
3569         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3570         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3571
3572 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3573
3574         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3575         __extern_always_inline where appropriate.
3576         * sysdeps/pthread/pthread.h: Likewise.
3577
3578 2007-03-13  Richard Henderson  <rth@redhat.com>
3579
3580         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3581         separate cfi regions for the two subsections.
3582
3583 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3584
3585         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3586         new thread, don't just decrement it.
3587         Patch by Suzuki K P <suzuki@in.ibm.com>.
3588
3589 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3590
3591         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3592         PTHFCT_CALL definition.
3593
3594 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3595
3596         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3597         available, don't use it.
3598
3599 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3600
3601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3602         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3603         call into the kernel to delay.
3604
3605 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3606
3607         * tst-initializers1.c: We want to test the initializers as seen
3608         outside of libc, so undefined _LIBC.
3609
3610         * pthread_join.c (cleanup): Avoid warning.
3611
3612 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3613
3614         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3615         (__lll_timedwait_tid): Add unwind info.
3616
3617         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3618         function table, mangle the pointers.
3619         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3620         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3621         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3622         demangle pointers before use.
3623         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3624         demangle pointer.
3625         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3626         * sysdeps/pthread/setxid.h: Likewise.
3627
3628 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3629
3630         * tst-rwlock7.c: Show some more information in case of correct
3631         behavior.
3632
3633 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3634
3635         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3636         (lll_futex_timed_wait): Undo part of last change, don't negate
3637         return value.
3638
3639 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3640
3641         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3642         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3643
3644 2006-12-28  David S. Miller  <davem@davemloft.net>
3645
3646         * shlib-versions: Fix sparc64 linux target specification.
3647
3648 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3649
3650         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3651         Adjust include path for pthread_barrier_wait.c move.
3652
3653 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3654
3655         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3656         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3657
3658 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3659
3660         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3661         6 argument cancellable syscalls.
3662         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3663         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3664         6 argument cancellable syscalls.
3665         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3666
3667 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3668
3669         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3670         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3671
3672 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3673
3674         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3675         __sync_lock_release instead of __sync_lock_release_si.
3676
3677 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3678
3679         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3680         Define.
3681         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3682         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3683         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3684         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3685         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3686         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3687         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3688         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3689         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3690         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3691         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3692
3693 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3694
3695         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3696         * pthread_barrier_wait.c: ...here.
3697         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3698         * pthread_cond_broadcast.c: ...here.
3699         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3700         * pthread_cond_signal.c: ...here.
3701         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3702         * pthread_cond_timedwait.c: ...here.
3703         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3704         * pthread_cond_wait.c: ...here.
3705         * sysdeps/pthread/pthread_once.c: Move to...
3706         * pthread_once.c: ...here.
3707         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3708         * pthread_rwlock_rdlock.c: ...here.
3709         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3710         * pthread_rwlock_timedrdlock.c: ...here.
3711         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3712         * pthread_rwlock_timedwrlock.c: ...here.
3713         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3714         * pthread_rwlock_unlock.c: ...here.
3715         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3716         * pthread_rwlock_wrlock.c: ...here.
3717         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3718         * pthread_spin_destroy.c: ...here.
3719         * sysdeps/pthread/pthread_spin_init.c: Move to...
3720         * pthread_spin_init.c: ...here.
3721         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3722         * pthread_spin_unlock.c: ...here.
3723         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3724         * pthread_getcpuclockid.c: ...here.
3725
3726         * init.c: USE_TLS support is now always enabled.
3727         * tst-tls5.h: Likewise.
3728         * sysdeps/alpha/tls.h: Likewise.
3729         * sysdeps/i386/tls.h: Likewise.
3730         * sysdeps/ia64/tls.h: Likewise.
3731         * sysdeps/powerpc/tls.h: Likewise.
3732         * sysdeps/s390/tls.h: Likewise.
3733         * sysdeps/sh/tls.h: Likewise.
3734         * sysdeps/sparc/tls.h: Likewise.
3735         * sysdeps/x86_64/tls.h: Likewise.
3736
3737 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3738
3739         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3740         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3741         failed.
3742
3743         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3744         Define to THREAD_SELF->header.multiple_threads.
3745         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3746         Likewise.
3747         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3748         Likewise.
3749         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3750         (SINGLE_THREAD_P): Likewise.
3751         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3752         (SINGLE_THREAD_P): Likewise.
3753         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3754         (SINGLE_THREAD_P): Likewise.
3755         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3756         (SINGLE_THREAD_P): Likewise.
3757         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3758         Likewise.
3759         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3760         (SINGLE_THREAD_P): Likewise.
3761         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3762         (SINGLE_THREAD_P): Likewise.
3763         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3764         Likewise.
3765
3766 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3767
3768         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3769         by default rather than 2_3_3.
3770
3771 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3772
3773         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3774         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3775         atomic_* instead of catomic_* macros.
3776
3777 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3778
3779         [BZ #3285]
3780         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3781         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3782         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3783         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3784         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3785         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3786         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3787         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3788         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3789         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3790         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3791         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3792         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3793
3794 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3795
3796         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3797         cancelable syscalls with six parameters.
3798
3799         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3800         operations instead of atomic_*.
3801
3802 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3803
3804         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3805
3806 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3807
3808         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3809         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3810         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3811         New file.
3812         * pthread_attr_setstack.c: Allow overwriting the version number of the
3813         new symbol.
3814         * pthread_attr_setstacksize.c: Likewise.
3815         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3816         it.
3817         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3818         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3819
3820 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3821
3822         [BZ #3251]
3823         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3824         Patch by Petr Baudis.
3825
3826 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3827
3828         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3829
3830         * tst-cancel2.c (tf): Loop as long as something was written.
3831
3832 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3833
3834         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3835         mutexes wake all mutexes.
3836         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3837         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3838         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3839
3840 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3841
3842         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3843         to guarantee the thread is always canceled.
3844
3845 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3846
3847         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3848         Include stdlib.h.
3849         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3850         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3851         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3854
3855 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3856
3857         [BZ #3123]
3858         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3859         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3863         * Makefile (tests): Add tst-cond22.
3864         * tst-cond22.c: New file.
3865
3866 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3867
3868         [BZ #3124]
3869         * descr.h (struct pthread): Add parent_cancelhandling.
3870         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3871         cancelhandling value to child.
3872         * pthread_create.c (start_thread): If parent thread was canceled
3873         reset the SIGCANCEL mask.
3874         * Makefile (tests): Add tst-cancel25.
3875         * tst-cancel25.c: New file.
3876
3877 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3878             Ulrich Drepper  <drepper@redhat.com>
3879
3880         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3881         counterp if it is already zero.
3882         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3883
3884 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3885             Roland McGrath  <roland@redhat.com>
3886
3887         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3888         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3889         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3890         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3891         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3892         lll_robust_mutex_timedlock, lll_mutex_unlock,
3893         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3894         Add _L_*_ symbols around the subsection.
3895         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3896         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3897
3898 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3899             Roland McGrath  <roland@redhat.com>
3900
3901         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3902         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3903         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3904         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3905         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3906         lll_robust_mutex_timedlock, lll_mutex_unlock,
3907         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3908         Add _L_*_ symbols around the subsection.
3909         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3910         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3911
3912 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3913
3914         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3915         change because it can disturb too much existing code.  If real hard
3916         reader preference is needed we'll introduce another type.
3917         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3918         (pthread_rwlock_timedwrlock): Likewise.
3919         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3920         Likewise.
3921
3922 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3923
3924         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3925         reader preference.
3926         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3927         (pthread_rwlock_timedwrlock): Likewise.
3928         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3929         Likewise.
3930
3931 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3932
3933         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3934         Only define ifdef SHARED.
3935
3936 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3937
3938         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3939         (free_stacks): ...here.
3940         (__free_stack_cache): New function.
3941         * pthreadP.h: Declare __free_stack_cache.
3942         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3943         ptr_freeres.
3944         * init.c (pthread_functions): Initialize ptr_freeres.
3945         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3946         New freeres function.
3947
3948 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
3949
3950         [BZ #3018]
3951         * Makefile (extra-objs): Add modules to extra-test-objs instead.
3952
3953 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
3954
3955         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3956         _XOPEN_REALTIME_THREADS.
3957
3958 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
3959
3960         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3961         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3962         HAVE_CLOCK_GETTIME_VSYSCALL.
3963         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3964
3965 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
3966
3967         * sysdeps/unix/sysv/linux/bits/posix_opt.h
3968         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3969         * descr.h (struct priority_protection_data): New type.
3970         (struct pthread): Add tpp field.
3971         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3972         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3973         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3974         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3975         TPP mutexes.
3976         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3977         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3978         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3979         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3980         * tpp.c: New file.
3981         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3982         boosted by TPP.
3983         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3984         * pthread_mutexattr_getprioceiling.c
3985         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3986         in the SCHED_FIFO priority range.
3987         * pthread_mutexattr_setprioceiling.c
3988         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3989         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3990         if mutex is not TPP.  Ceiling is now in __data.__lock.
3991         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3992         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3993         is now in __data.__lock.  Add locking.
3994         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3995         * Makefile (libpthread-routines): Add tpp.
3996         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3997         * tst-tpp.h: New file.
3998         * tst-mutexpp1.c: New file.
3999         * tst-mutexpp6.c: New file.
4000         * tst-mutexpp10.c: New file.
4001         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4002         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4003
4004 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4005
4006         [BZ #2843]
4007         * pthread_join.c (pthread_join): Account for self being canceled
4008         when checking for deadlocks.
4009         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4010         (tf1): Don't print anything after pthread_join returns, this would be
4011         another cancellation point.
4012         (tf2): Likewise.
4013         * tst-join6.c: New file.
4014         * Makefile (tests): Add tst-join6.
4015
4016 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4017
4018         [BZ #2892]
4019         * pthread_setspecific.c (__pthread_setspecific): Check
4020         out-of-range index before checking for unused key.
4021
4022         * sysdeps/pthread/gai_misc.h: New file.
4023
4024 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4025
4026         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4027         file.  Don't use sysctl.
4028         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4029         overwrite the file if this is likely not true.
4030
4031 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4032
4033         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4034         * Makefile (tests): Add tst-getpid3.
4035         * tst-getpid3.c: New file.
4036
4037 2006-07-30  Roland McGrath  <roland@redhat.com>
4038
4039         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4040
4041         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4042         (pause_not_cancel): New macro.
4043         (nanosleep_not_cancel): New macro.
4044         (sigsuspend_not_cancel): New macro.
4045         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4046         nanosleep_not_cancel macro from <not-cancel.h>.
4047         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4048         macro from <not-cancel.h>.
4049
4050 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4051             Jakub Jelinek  <jakub@redhat.com>
4052
4053         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4054         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4055         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4056         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4057         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4058         * pthread_mutex_lock.c: Likewise.
4059         * pthread_mutex_timedlock.c: Likewise.
4060         * pthread_mutex_trylock.c: Likewise.
4061         * pthread_mutex_unlock.c: Likewise.
4062         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4063         all mutexes.
4064         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4065         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4066         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4067         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4068         pthread-pi-defines.sym.
4069         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4070         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4072         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4073         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4074         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4075         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4076         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4077         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4078         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4079         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4080         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4081         * tst-mutex2.c: Likewise.
4082         * tst-mutex3.c: Likewise.
4083         * tst-mutex4.c: Likewise.
4084         * tst-mutex5.c: Likewise.
4085         * tst-mutex6.c: Likewise.
4086         * tst-mutex7.c: Likewise.
4087         * tst-mutex7a.c: Likewise.
4088         * tst-mutex8.c: Likewise.
4089         * tst-mutex9.c: Likewise.
4090         * tst-robust1.c: Likewise.
4091         * tst-robust7.c: Likewise.
4092         * tst-robust8.c: Likewise.
4093         * tst-mutexpi1.c: New file.
4094         * tst-mutexpi2.c: New file.
4095         * tst-mutexpi3.c: New file.
4096         * tst-mutexpi4.c: New file.
4097         * tst-mutexpi5.c: New file.
4098         * tst-mutexpi6.c: New file.
4099         * tst-mutexpi7.c: New file.
4100         * tst-mutexpi7a.c: New file.
4101         * tst-mutexpi8.c: New file.
4102         * tst-mutexpi9.c: New file.
4103         * tst-robust1.c: New file.
4104         * tst-robust2.c: New file.
4105         * tst-robust3.c: New file.
4106         * tst-robust4.c: New file.
4107         * tst-robust5.c: New file.
4108         * tst-robust6.c: New file.
4109         * tst-robust7.c: New file.
4110         * tst-robust8.c: New file.
4111         * Makefile (tests): Add the new tests.
4112
4113         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4114         * pthread_mutex_destroy.c: Remove unneeded label.
4115
4116 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4117
4118         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4119         computations to compile time.
4120
4121 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4122
4123         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4124
4125 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4126
4127         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4128
4129 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4130
4131         * pthread_key_create.c (__pthread_key_create): Do away with
4132         __pthread_keys_lock.
4133
4134         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4135         (__kernel_cpumask_size): Mark as hidden.
4136         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4137
4138         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4139         * semaphoreP.h (__sem_mappings_lock): Likewise.
4140
4141 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4142
4143         * pthread_atfork.c: Mark __dso_handle as hidden.
4144
4145 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4146
4147         [BZ #2644]
4148         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4149         the reload problem.  Change the one path in pthread_cancel_init
4150         which causes the problem.  Force gcc to reload.  Simplify callers.
4151         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4152         (_Unwind_GetBSP): Undo last patch.
4153
4154 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4155
4156         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4157         function pointer is reloaded after pthread_cancel_init calls.
4158
4159         [BZ #2644]
4160         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4161         pointers are reloaded after pthread_cancel_init calls.
4162
4163 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4164
4165         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4166         __always_inline.
4167
4168 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4169
4170         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4171         Allocate new object which is passed to timer_sigev_thread so that
4172         the timer can be deleted before the new thread is scheduled.
4173
4174 2006-04-26  Roland McGrath  <roland@redhat.com>
4175
4176         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4177
4178 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4179
4180         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4181         suffix for conditional jumps.
4182         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4183         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4184         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4185         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4186         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4187         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4188
4189         * init.c (sigcancel_handler): Compare with correct PID even if the
4190         thread is in the middle of a fork call.
4191         (sighandler_setxid): Likewise.
4192         Reported by Suzuki K P <suzuki@in.ibm.com> .
4193
4194 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4195
4196         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4197
4198 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4199
4200         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4201         fails [Coverity CID 105].
4202
4203 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4204
4205         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4206
4207 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4208
4209         [BZ #2505]
4210         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4211         Define __lll_rel_instr using lwsync.
4212
4213 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4214
4215         * allocatestack.c (allocate_stack): Always initialize robust_head.
4216         * descr.h: Define struct robust_list_head.
4217         (struct pthread): Use robust_list_head in robust mutex list definition.
4218         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4219         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4220         (__pthread_initialize_minimal_internal): Register robust_list with
4221         the kernel.
4222         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4223         Declare __set_robust_list_avail.
4224         * pthread_create.c (start_thread): Register robust_list of new thread.
4225         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4226         waiters.
4227         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4228         number of users, it's unreliable.
4229         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4230         set_robust_list syscall is available.
4231         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4232         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4233         Set robust_head.list_op_pending before trying to lock a robust mutex.
4234         * pthread_mutex_timedlock.c: Likewise.
4235         * pthread_mutex_trylock.c: Likewise.
4236         * pthread_mutex_unlock.c: Likewise for unlocking.
4237         * Makefile (tests): Add tst-robust8.
4238         * tst-robust8.c: New file.
4239
4240 2006-03-08  Andreas Schwab  <schwab@suse.de>
4241
4242         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4243         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4244
4245 2006-03-05  Roland McGrath  <roland@redhat.com>
4246
4247         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4248         and $config_os doesn't match *linux*.
4249
4250 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4251
4252         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4253         Use __syscall_error.
4254         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4255         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4256         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4257         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4258         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4259         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4260
4261 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4262
4263         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4264
4265 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4266
4267         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4268         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4269         mutex.
4270         (__lll_robust_timedlock_wait): Likewise.
4271         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4272         (__lll_robust_lock_wait): Likewise.
4273         (__lll_robust_timedlock_wait): Likewise.
4274         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4275         (__lll_robust_lock_wait): Likewise.
4276         (__lll_robust_timedlock_wait): Likewise.
4277
4278 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4279
4280         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4281         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4282         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4283         lll_robust_mutex_unlock): Define.
4284         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4285
4286 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4287
4288         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4289         instead of <clone.S>.
4290
4291 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4292
4293         * Makefile (libpthread-routines): Add
4294         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4295         and pthread_mutex_[sg]etprioceiling.
4296         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4297         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4298         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4299         pthread_mutex_setprioceiling.
4300         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4301         PTHREAD_PRIO_PROTECT): New enum values.
4302         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4303         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4304         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4305         prototypes.
4306         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4307         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4308         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4309         Define.
4310         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4311         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4312         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4313         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4314         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4315         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4316         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4317         protocol mutexes.
4318         * pthread_mutex_getprioceiling.c: New file.
4319         * pthread_mutex_setprioceiling.c: New file.
4320         * pthread_mutexattr_getprioceiling.c: New file.
4321         * pthread_mutexattr_setprioceiling.c: New file.
4322         * pthread_mutexattr_getprotocol.c: New file.
4323         * pthread_mutexattr_setprotocol.c: New file.
4324
4325 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4326
4327         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4328
4329 2006-02-27  Roland McGrath  <roland@redhat.com>
4330
4331         * sysdeps/pthread/Subdirs: List nptl here too.
4332         * configure (libc_add_on_canonical): New variable.
4333
4334         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4335
4336         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4337         self to get main source tree's file.
4338         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4339         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4340         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4341         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4342         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4343         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4344         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4345         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4346         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4347         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4348         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4349         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4350         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4351
4352         * Makefile: Use $(sysdirs) in vpath directive.
4353
4354         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4355         (CPPFLAGS-timer_routines.c): Likewise.
4356
4357         * Makeconfig (includes): Variable removed.
4358
4359 2006-02-26  Roland McGrath  <roland@redhat.com>
4360
4361         * sysdeps/generic/pt-raise.c: Moved to ...
4362         * pt-raise.c: ... here.
4363         * sysdeps/generic/lowlevellock.h: Moved to ...
4364         * lowlevellock.h: ... here.
4365
4366 2006-02-23  Roland McGrath  <roland@redhat.com>
4367
4368         * descr.h (struct pthread): Add final member `end_padding'.
4369         (PTHREAD_STRUCT_END_PADDING): Use it.
4370
4371 2006-02-20  Roland McGrath  <roland@redhat.com>
4372
4373         * sysdeps/mips: Directory removed, saved in ports repository.
4374         * sysdeps/unix/sysv/linux/mips: Likewise.
4375
4376 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4377
4378         * tst-robust1.c: Add second mutex to check that the mutex list is
4379         handled correctly.
4380
4381 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4382
4383         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4384         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4385         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4386         lll_robust_mutex_unlock): New macros.
4387         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4388         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4389         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4390         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4391         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4392
4393 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4394
4395         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4396         definitions.
4397         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4398
4399 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4400
4401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4402         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4403         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4404         (lll_robust_mutex_unlock): Likewise.
4405
4406 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4407
4408         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4409         Set robust_list.__next rather than robust_list.
4410         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4411         (__pthread_list_t): New typedef.
4412         (pthread_mutex_t): Replace __next and __prev fields with __list.
4413         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4414         (__pthread_list_t): New typedef.
4415         (pthread_mutex_t): Replace __next and __prev fields with __list.
4416         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4417         (__pthread_list_t, __pthread_slist_t): New typedefs.
4418         (pthread_mutex_t): Replace __next and __prev fields with __list.
4419         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4420         (__pthread_list_t, __pthread_slist_t): New typedefs.
4421         (pthread_mutex_t): Replace __next and __prev fields with __list.
4422         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4423         (__pthread_list_t, __pthread_slist_t): New typedefs.
4424         (pthread_mutex_t): Replace __next and __prev fields with __list.
4425         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4426         (__pthread_slist_t): New typedef.
4427         (pthread_mutex_t): Replace __next field with __list.
4428
4429 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4430
4431         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4432         PTHREAD_MUTEX_OWNERDEAD.
4433         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4434         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4435         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4436         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4437         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4438         to PTHREAD_MUTEX_INCONSISTENT.
4439         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4440         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4441         * pthread_mutex_trylock.c: Likewise.
4442         * pthread_mutex_timedlock.c: Likewise.
4443         * pthread_mutex_unlock.c: Likewise.
4444         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4445         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4446         lowlevelrobustlock.sym.
4447         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4449         definitions.
4450         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4451         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4452         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4453         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4454         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4455
4456 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4457
4458         * allocatestack.c (allocate_stack): Initialize robust_list.
4459         * init.c (__pthread_initialize_minimal_internal): Likewise.
4460         * descr.h (struct xid_command): Pretty printing.
4461         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4462         robust_list.  Adjust macros.
4463         * pthread_create.c (start_thread): Adjust robust_list handling.
4464         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4465         but the owner for all robust mutex types.
4466         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4467         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4468         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4469         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4470
4471         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4472         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4473
4474 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4475
4476         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4477         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4478
4479 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4480
4481         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4482         Return status.
4483         (lll_futex_timed_wait): Define.
4484
4485 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4486
4487         * tst-cancel4.c: Test ppoll.
4488
4489 2006-01-18  Andreas Jaeger  <aj@suse.de>
4490
4491         [BZ #2167]
4492         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4493         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4494         by Jim Gifford <patches@jg555.com>.
4495
4496 2006-01-13  Richard Henderson  <rth@redhat.com>
4497
4498         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4499
4500 2006-01-10  Roland McGrath  <roland@redhat.com>
4501
4502         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4503         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4504         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4505         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4506         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4507         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4508         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4509         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4510         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4511         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4512
4513 2006-01-09  Roland McGrath  <roland@redhat.com>
4514
4515         * tst-initializers1-c89.c: New file.
4516         * tst-initializers1-c99.c: New file.
4517         * tst-initializers1-gnu89.c: New file.
4518         * tst-initializers1-gnu99.c: New file.
4519         * Makefile (tests): Add them.
4520         (CFLAGS-tst-initializers1-c89.c): New variable.
4521         (CFLAGS-tst-initializers1-c99.c): New variable.
4522         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4523         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4524
4525         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4526         Use __extension__ on anonymous union definition.
4527         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4528         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4529         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4530         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4531         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4532
4533 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4534
4535         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4536         Don't give the union a name because it changes the mangled name.
4537         Instead name the struct for __data.
4538         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4539         Likewise.
4540         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4541         Likewise.
4542
4543 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4544
4545         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4546         stack bias to mc_ftp field.
4547
4548 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4549
4550         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4551         being too clever and reloading the futex value where it shouldn't.
4552
4553 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4554
4555         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4556         correct type.
4557
4558 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4559
4560         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4561         Add cfi directives.
4562
4563 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4564
4565         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4566         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4567         rename in tcbhead_t.
4568
4569         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4570         Don't give the union a name because it changes the mangled name.
4571         Instead name the struct for __data.
4572         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4573         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4574         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4575         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4576         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4577         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4578
4579 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4580
4581         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4582         Return status.
4583         (lll_futex_timed_wait): Define.
4584         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4585         * sysdeps/pthread/aio_misc.h: New file.
4586
4587 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4588
4589         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4590
4591 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4592
4593         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4594         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4595         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4596
4597 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4598
4599         * tst-cancel24.cc: Use C headers instead of C++ headers.
4600
4601 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4602
4603         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4604         sparc-linux configured glibc.
4605         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4606         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4607         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4608         atomic_compare_and_exchange_val_24_acq instead of
4609         atomic_compare_and_exchange_val_acq.
4610         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4611         instead of atomic_exchange_rel.
4612         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4613         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4614         file.
4615         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4616         file.
4617         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4618         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4619         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4620         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4621         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4622         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4623         New file.
4624         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4625         New file.
4626         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4627         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4628         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4629         file.
4630         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4631         file.
4632         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4633
4634 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4635
4636         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4637         mutex initializers.
4638
4639 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4640
4641         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4642         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4643         THREAD_COPY_POINTER_GUARD): Define.
4644         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4645         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4646
4647 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4648
4649         * version.c: Update copyright year.
4650
4651 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4652
4653         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4654         .eh_frame section, use cfi_* directives.
4655         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4656
4657 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4658
4659         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4660         now.
4661
4662 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4663
4664         * sysdeps/pthread/sigaction.c: Removed.
4665         * sigaction.c: New file.
4666         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4667
4668 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4669
4670         * Makefile (tests): Add tst-signal7.
4671         * tst-signal7.c: New file.
4672
4673 2005-12-27  Roland McGrath  <roland@redhat.com>
4674
4675         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4676         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4677         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4678         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4679         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4680         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4681         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4682         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4683         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4684         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4685         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4686
4687 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4688
4689         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4690         and __prev field to pthread_mutex_t.
4691         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4692         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4693         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4694         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4695         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4696         to pthread_mutex_t.
4697
4698 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4699
4700         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4701         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4702         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4703         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4704         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4705         and PTHREAD_MUTEXATTR_FLAG_BITS.
4706         * descr.h (struct pthread): Add robust_list field and define
4707         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4708         * pthread_mutexattr_getrobust.c: New file.
4709         * pthread_mutexattr_setrobust.c: New file.
4710         * pthread_mutex_consistent.c: New file.
4711         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4712         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4713         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4714         Adjust pthread_mutex_t initializers.
4715         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4716         field to pthread_mutex_t.
4717         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4718         and __prev field to pthread_mutex_t.
4719         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4720         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4721         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4722         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4723         * pthread_mutexattr_gettype.c: Likewise.
4724         * pthread_mutexattr_setpshared.c: Likewise.
4725         * pthread_mutexattr_settype.c: Likewise.
4726         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4727         Initialize mutex kind according to robust flag.
4728         * pthread_mutex_lock.c: Implement local robust mutex.
4729         * pthread_mutex_timedlock.c: Likewise.
4730         * pthread_mutex_trylock.c: Likewise.
4731         * pthread_mutex_unlock.c: Likewise.
4732         * pthread_create.c (start_thread): Mark robust mutexes which remained
4733         locked as dead.
4734         * tst-robust1.c: New file.
4735         * tst-robust2.c: New file.
4736         * tst-robust3.c: New file.
4737         * tst-robust4.c: New file.
4738         * tst-robust5.c: New file.
4739         * tst-robust6.c: New file.
4740         * tst-robust7.c: New file.
4741         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4742         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4743         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4744         tst-robust5, tst-robust6, and tst-robust7.
4745
4746         * tst-typesizes.c: New file.
4747         * Makefile (tests): Add tst-typesizes.
4748
4749         * tst-once3.c: More debug output.
4750
4751 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4752
4753         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4754         missing after last change.
4755
4756         * version.c: Update copyright year.
4757
4758 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4759
4760         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4761         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4762         * pthread_mutex_trylock.c: Likewise.
4763         * pthread_mutex_timedlock.c: Likewise.
4764         * pthread_mutex_unlock.c: Likewise.
4765
4766 2005-12-22  Roland McGrath  <roland@redhat.com>
4767
4768         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4769         so that #include_next's search location is not reset to the -I..
4770         directory where <nptl/...> can be found.
4771
4772 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4773
4774         [BZ #1913]
4775         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4776         Fix unwind info.  Remove useless branch prediction prefix.
4777         * tst-cancel24.cc: New file.
4778         * Makefile: Add rules to build and run tst-cancel24.
4779
4780 2005-12-21  Roland McGrath  <roland@redhat.com>
4781
4782         * libc-cancellation.c: Use <> rather than "" #includes.
4783         * pt-cleanup.c: Likewise.
4784         * pthread_create.c: Likewise.
4785         * pthread_join.c: Likewise.
4786         * pthread_timedjoin.c: Likewise.
4787         * pthread_tryjoin.c: Likewise.
4788         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4789         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4790         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4791         * unwind.c: Likewise.
4792
4793 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4794
4795         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4796         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4797         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4798         THREAD_COPY_POINTER_GUARD): Define.
4799
4800 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4801
4802         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4803         rather than one.
4804         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4805         THREAD_COPY_POINTER_GUARD): Define.
4806         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4807         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4808         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4809         THREAD_COPY_POINTER_GUARD): Define.
4810         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4811         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4812         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4813         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4814         Use PTR_DEMANGLE for B0 if defined.
4815
4816 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4817
4818         * pthread_create.c (__pthread_create_2_1): Use
4819         THREAD_COPY_POINTER_GUARD if available.
4820         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4821         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4822         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4823         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4824         * sysdeps/x86_64/tls.h: Likewise.
4825
4826 2005-12-15  Roland McGrath  <roland@redhat.com>
4827
4828         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4829
4830 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4831
4832         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4833         sysdeps/generic.
4834         * errno-loc.c: New file.
4835
4836 2005-12-12  Roland McGrath  <roland@redhat.com>
4837
4838         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4839         adjustments before choosing stack size.  Update minimum stack size
4840         calculation to match allocate_stack change.
4841
4842 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4843
4844         * allocatestack.c (allocate_stack): Don't demand that there is an
4845         additional full page available on the stack beside guard, TLS, the
4846         minimum stack.
4847
4848 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4849
4850         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4851         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4852
4853         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4854         compiling 32-bit code we must define __cleanup_fct_attribute.
4855
4856 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4857
4858         [BZ #1920]
4859         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4860         __attribute__ instead of __attribute.
4861         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4862         (__cleanup_fct_attribute): Likewise.
4863
4864 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4865
4866         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4867         a write barrier before writing libgcc_s_getcfa.
4868
4869 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4870
4871         * sysdeps/unix/sysv/linux/configure: Removed.
4872
4873 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4874
4875         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4876         optional init_array/fini_array support.
4877
4878 2005-10-24  Roland McGrath  <roland@redhat.com>
4879
4880         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4881         versioned_symbol use.
4882
4883 2005-10-16  Roland McGrath  <roland@redhat.com>
4884
4885         * init.c (__pthread_initialize_minimal_internal): Even when using a
4886         compile-time default stack size, apply the minimum that allocate_stack
4887         will require, and round up to page size.
4888
4889 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4890
4891         * Makefile ($(test-modules)): Remove static pattern rule.
4892
4893 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4894             Ulrich Drepper  <drepper@redhat.com>
4895
4896         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4897         alignment in callback function.
4898         * Makefile: Add rules to build and run tst-align3.
4899         * tst-align3.c: New file.
4900
4901 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4902
4903         * allocatestack.c (setxid_signal_thread): Add
4904         INTERNAL_SYSCALL_DECL (err).
4905
4906 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4907
4908         * allocatestack.c (setxid_signal_thread): Need to use
4909         atomic_compare_and_exchange_bool_acq.
4910
4911 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4912             Jakub Jelinek  <jakub@redhat.com>
4913
4914         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4915         CANCEL_RESTMASK.
4916         (struct pthread): Move specific_used field to avoid padding.
4917         Add setxid_futex field.
4918         * init.c (sighandler_setxid): Reset setxid flag and release the
4919         setxid futex.
4920         * allocatestack.c (setxid_signal_thread): New function.  Broken
4921         out of the bodies of the two loops in __nptl_setxid.  For undetached
4922         threads check whether they are exiting and if yes, don't send a signal.
4923         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4924         * pthread_create.c (start_thread): For undetached threads, check
4925         whether setxid bit is set.  If yes, wait until signal has been
4926         processed.
4927
4928         * allocatestack.c (STACK_VARIABLES): Initialize them.
4929         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4930
4931 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4932
4933         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4934         waiters, awake all waiters on the associated mutex.
4935
4936 2005-09-22  Roland McGrath  <roland@redhat.com>
4937
4938         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4939         ../sysdeps/x86_64/hp-timing.h).
4940
4941 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4942
4943         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4944         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4945         (lll_futex_wake_unlock): Define.
4946         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4947         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4948         (lll_futex_wake_unlock): Define.
4949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4950         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4951         (lll_futex_wake_unlock): Define.
4952         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4953         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4954         (lll_futex_wake_unlock): Define.
4955         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4956         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4957         (lll_futex_wake_unlock): Define.
4958         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4959         lll_futex_wake_unlock.
4960         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4961         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4962         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4964         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4965         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4966
4967 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4968
4969         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4970         Fix typo in register name.
4971
4972 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
4973
4974         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4975         Use __sigfillset.  Document that sigfillset does the right thing wrt
4976         to SIGSETXID.
4977
4978 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4979
4980         [BZ #1102]
4981         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4982         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4983         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4984         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4985         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4986         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4987         in the structure.
4988         * Makefile (tests): Add tst-initializers1.
4989         (CFLAGS-tst-initializers1.c): Set.
4990         * tst-initializers1.c: New test.
4991
4992 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4993
4994         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4995         Make sure __flags are located at offset 48 from the start of the
4996         structure.
4997
4998 2005-07-02  Roland McGrath  <roland@redhat.com>
4999
5000         * Makeconfig: Comment fix.
5001
5002 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5003
5004         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5005         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5006         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5007         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5008         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5009         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5010         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5011         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5012         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5013         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5014
5015 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5016
5017         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5018         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5019         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5020         fields.
5021         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5022         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5023         field.  Put in sysinfo field unconditionally.
5024         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5025         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5026         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5027         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5028         fields.
5029         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5030         * pthread_create.c (__pthread_create_2_1): Use
5031         THREAD_COPY_STACK_GUARD macro.
5032         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5033         tests.
5034         * tst-stackguard1.c: New file.
5035         * tst-stackguard1-static.c: New file.
5036
5037 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5038
5039         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5040         Invoke CGOTSETUP and CGOTRESTORE.
5041         (CGOTSETUP, CGOTRESTORE): Define.
5042
5043 2005-05-29  Richard Henderson  <rth@redhat.com>
5044
5045         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5046         (tf_write, tf_writev): Use it.
5047         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5048         the system minimum.
5049
5050 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5051
5052         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5053         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5054         __librt_*_asynccancel@local.
5055
5056 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5057
5058         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5059         all occurrences of JUMPTARGET.  Instead append @local to labels.
5060
5061 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5062
5063         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5064         size/alignment of struct pthread rather than tcbhead_t.
5065         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5066         Likewise.
5067         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5068         Likewise.
5069         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5070         Likewise.
5071
5072 2005-05-19  Richard Henderson  <rth@redhat.com>
5073
5074         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5075         __sync_val_compare_and_swap, not explicit _si variant.
5076         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5077
5078 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5079
5080         [BZ #915]
5081         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5082
5083 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5084
5085         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5086         .eh_frame section, use cfi_* directives.
5087
5088 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5089
5090         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5091         of "" includes.
5092
5093 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5094
5095         [BZ #1075]
5096         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5097         aio_write blocks.
5098
5099 2005-04-27  Roland McGrath  <roland@redhat.com>
5100
5101         * Makefile (tests): Remove tst-clock2.
5102
5103         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5104         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5105         translating to the kernel clockid_t for our own process/thread clock.
5106
5107         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5108
5109 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5110
5111         * old_pthread_cond_init.c: Include <errno.h>.
5112         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5113         process shared or uses clock other than CLOCK_REALTIME.
5114         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5115
5116 2005-04-13  David S. Miller  <davem@davemloft.net>
5117
5118         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5119         * sysdeps/sparc/sparc64/clone.S: New file.
5120
5121 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5122
5123         [BZ #1102]
5124         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5125         __inline instead of inline.
5126         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5127
5128 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5129
5130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5131         functionally equivalent, but shorter instructions.
5132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5133         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5134         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5135         Likewise.
5136         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5137         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5138         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5139         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5140         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5141         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5143         Likewise.
5144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5145         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5147         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5148         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5149
5150 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5151
5152         * sysdeps/mips/Makefile: New file.
5153         * sysdeps/mips/nptl-sysdep.S: New file.
5154         * sysdeps/mips/tcb-offsets.sym: New file.
5155         * sysdeps/mips/pthread_spin_lock.S: New file.
5156         * sysdeps/mips/pthread_spin_trylock.S: New file.
5157         * sysdeps/mips/pthreaddef.h: New file.
5158         * sysdeps/mips/tls.h: New file.
5159         * sysdeps/mips/jmpbuf-unwind.h: New file.
5160         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5161         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5162         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5163         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5164         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5165         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5166         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5167         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5168         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5169         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5170
5171 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5172
5173         [BZ #1112]
5174         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5175         variable to scerr.
5176
5177 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5178
5179         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5180
5181 2005-02-25  Roland McGrath  <roland@redhat.com>
5182
5183         * alloca_cutoff.c: Correct license text.
5184         * tst-unload.c: Likewise.
5185         * sysdeps/pthread/allocalim.h: Likewise.
5186         * sysdeps/pthread/pt-initfini.c: Likewise.
5187         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5188         * sysdeps/pthread/bits/sigthread.h: Likewise.
5189         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5190         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5191
5192 2005-02-16  Roland McGrath  <roland@redhat.com>
5193
5194         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5195         Use unsigned int * for ptr_nthreads.
5196
5197 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5198
5199         [BZ #721]
5200         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5201         gcc4.
5202
5203 2005-02-07  Richard Henderson  <rth@redhat.com>
5204
5205         [BZ #787]
5206         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5207         argument.
5208
5209 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5210
5211         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5212         order of arguments in invocation of atomic_add_zero.
5213
5214 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5215
5216         [BZ #737]
5217         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5218         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5219         at least gotntpoff relocation and addition.
5220         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5221         Likewise.
5222         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5223         Likewise.
5224         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5225         Likewise.
5226
5227 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5228
5229         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5230         entry for static tls deallocation fix.
5231         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5232         also contains information whether the memory pointed to is static
5233         TLS or not.
5234         * sysdeps/i386/tls.h: Likewise.
5235         * sysdeps/ia64/tls.h: Likewise.
5236         * sysdeps/powerpc/tls.h: Likewise.
5237         * sysdeps/s390/tls.h: Likewise.
5238         * sysdeps/sh/tls.h: Likewise.
5239         * sysdeps/sparc/tls.h: Likewise.
5240         * sysdeps/x86_64/tls.h: Likewise.
5241
5242 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5243
5244         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5245
5246 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5247
5248         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5249         %esp.
5250         * Makefile (tests): Add tst-align2.
5251         * tst-align2.c: New test.
5252         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5253         -mpreferred-stack-boundary=4.
5254
5255 2004-12-18  Roland McGrath  <roland@redhat.com>
5256
5257         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5258         New file removed withdrawn for the moment.
5259
5260 2004-12-17  Richard Henderson  <rth@redhat.com>
5261
5262         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5263         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5264
5265 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5266
5267         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5268         Increased PTHREAD_STACK_MIN.
5269
5270         * tst-context1.c (stacks): Use bigger stack size.
5271
5272 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5273
5274         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5275         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5276
5277 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5278
5279         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5280         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5281         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5282
5283 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5284
5285         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5286
5287 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5288
5289         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5290         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5291
5292         * tst-getpid1.c: If child crashes, report this first.  Print which
5293         signal.
5294
5295 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5296
5297         * init.c (__pthread_initialize_minimal_internal): Also unblock
5298         SIGSETXID.
5299
5300 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5301
5302         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5303         _POSIX_THREAD_CPUTIME): Define to 0.
5304         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5305         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5306         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5307         __timer_signal_thread_tclk): Remove.
5308         (init_module): Remove their initialization.
5309         (thread_cleanup): Remove their cleanup assertions.
5310         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5311         __timer_signal_thread_tclk): Remove.
5312         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5313         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5314         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5315
5316 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5317
5318         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5319         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5320
5321         * Makefile (tests): Add tst-getpid2.
5322         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5323         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5324         * tst-getpid2.c: New test.
5325
5326 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5327
5328         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5329
5330 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5331
5332         * Makefile (tests): Add tst-getpid1.
5333         * tst-getpid1.c: New file.
5334         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5335         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5336
5337 2004-12-02  Roland McGrath  <roland@redhat.com>
5338
5339         * Makefile (libpthread-nonshared): Variable removed.
5340         ($(objpfx)libpthread_nonshared.a): Target removed.
5341         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5342         These are now handled by generic magic from
5343         libpthread-static-only-routines being set.
5344
5345 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5346
5347         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5348         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5349         _POSIX_THREAD_PRIO_PROTECT): Define.
5350         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5351         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5352         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5353
5354 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5355
5356         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5357         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5358         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5359         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5360         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5361         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5362         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5363
5364 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5365
5366         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5367
5368         * Makefile (libpthread-routines): Add pthread_setschedprio.
5369         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5370         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5371         * pthread_setschedprio.c: New file.
5372
5373 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5374
5375         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5376         * pthread_cancel.c (pthread_create): Likewise.
5377
5378         * Makefile (libpthread-routines): Add vars.
5379         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5380         * init.c (__default_stacksize, __is_smp): Remove.
5381         * vars.c: New file.
5382         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5383         and define a wrapper macro.
5384         (PTHREAD_STATIC_FN_REQUIRE): Define.
5385         * allocatestack.c (__find_thread_by_id): Undefine.
5386         * pthread_create (__pthread_keys): Remove.
5387         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5388         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5389         PTHREAD_STATIC_FN_REQUIRE.
5390
5391 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5392
5393         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5394         parameter to REGISTER macro.
5395
5396 2004-11-17  Roland McGrath  <roland@redhat.com>
5397
5398         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5399         Make sure SIGCANCEL is blocked as well.
5400
5401 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5402
5403         * sysdeps/pthread/setxid.h: New file.
5404         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5405         (struct xid_command): Add forward decl.
5406         (struct pthread_functions): Change return type of __nptl_setxid hook
5407         to int.
5408         * pthreadP.h (__nptl_setxid): Change return type to int.
5409         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5410         calling thread, return its return value and set errno on failure.
5411         * descr.h (struct xid_command): Change id type to long array.
5412
5413         * Makefile: Add rules to build and test tst-setuid1 and
5414         tst-setuid1-static.
5415         * tst-setuid1.c: New test.
5416         * tst-setuid1-static.c: New test.
5417
5418 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5419
5420         * Makefile (tests): Add tst-exit3.
5421         * tst-exit3.c: New test.
5422
5423 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5424
5425         * Makefile (tests): Add tst-exit2.
5426         * tst-exit2.c: New file.
5427
5428 2004-11-09  Roland McGrath  <roland@redhat.com>
5429
5430         [BZ #530]
5431         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5432         here, before calling clone.
5433         * pthread_create.c (start_thread): Don't do it here.
5434
5435 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5436
5437         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5438
5439 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5440
5441         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5442         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5443         assembler warning.
5444
5445 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5446
5447         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5448         if sched_priority is not between minprio and maxprio.
5449
5450 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5451
5452         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5453         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5454
5455         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5456         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5457
5458 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5459
5460         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5461         not-cancelable I/O functions.
5462
5463 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5464
5465         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5466         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5467         make sure 2 is stored in the futex and we looked at the old value.
5468         Fix a few other problems to return the correct value.
5469
5470 2004-10-14  Richard Henderson  <rth@redhat.com>
5471
5472         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5473         make gcc4 happy.
5474
5475 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5476
5477         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5478         of pthread-functions.h and pthreaddef.h.
5479         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5480
5481         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5482         Change __data.__nwaiters from int to unsigned int.
5483
5484         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5485         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5486
5487         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5488         before return type.
5489
5490         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5491         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5492
5493 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5494
5495         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5496         test fails, remove message queue.
5497         (tf_msgsnd): Likewise.
5498
5499 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5500
5501         * tst-clock1.c: Change #ifdef to #if defined.
5502         * tst-clock2.c: Likewise.
5503         * tst-cond11.c: Likewise.
5504
5505         * sysdeps/pthread/timer_create.c (timer_create): Use
5506         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5507         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5508         THREAD_CPUTIME.
5509
5510 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5511
5512         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5513         _POSIX_THREAD_CPUTIME): Define to 0.
5514
5515 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5516
5517         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5518         and _POSIX_THREAD_CPUTIME to zero.
5519         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5520         * tst-barrier2.c: Fix testing for POSIX feature.
5521         * tst-clock1.c: Likewise.
5522         * tst-clock2.c: Likewise.
5523         * tst-cond11.c: Likewise.
5524         * tst-cond4.c: Likewise.
5525         * tst-cond6.c: Likewise.
5526         * tst-flock2.c: Likewise.
5527         * tst-mutex4.c: Likewise.
5528         * tst-mutex9.c: Likewise.
5529         * tst-rwlock12.c: Likewise.
5530         * tst-rwlock4.c: Likewise.
5531         * tst-signal1.c: Likewise.
5532         * tst-spin2.c: Likewise.
5533         * sysdeps/pthread/posix-timer.h: Likewise.
5534         * sysdeps/pthread/timer_create.c: Likewise.
5535         * sysdeps/pthread/timer_routines.c: Likewise.
5536
5537 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5538
5539         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5540         (__lll_mutex_timedlock_wait): Address futex correctly.
5541
5542         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5543         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5544         make sure 2 is stored in the futex and we looked at the old value.
5545         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5546         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5547         which might very well made the code not working at all before.
5548         [BZ #417]
5549
5550 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5551
5552         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5553         allow SIGSETXID to be sent.
5554         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5555         for SIGSETXID to be defined.
5556         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5557         SIGSETXID cannot be blocked.
5558
5559         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5560         Add __extension__ to long long types.
5561         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5562         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5563         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5564         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5565         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5566         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5567         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5568
5569 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5570
5571         * descr.h (struct pthread): Add stopped_start field.
5572         * sysdeps/pthread/createthread.c (create_thread): Set
5573         start_stopped flag in descriptor for new thread appropriately.
5574         * pthread_create.c (start_thread): Only take lock to be stopped on
5575         startup if stopped_start flag says so.
5576
5577 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5578
5579         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5580         is created detached and if yes, do not try to free the stack in case
5581         the thread creation failed.
5582         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5583         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5584         case there has been no error.  [BZ #405]
5585
5586         * pthread_create.c (start_thread): Don't wait for scheduler data
5587         etc to be set at the beginning of the function.  The cancellation
5588         infrastructure must have been set up.  And enable async
5589         cancellation before potentially going to sleep.  [BZ #401]
5590
5591 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5592
5593         * Versions: Remove exports for pthread_set*id_np functions.
5594         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5595         for now.
5596         * Makefile: Don't build pthread_set*id code for now.
5597
5598 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5599
5600         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5601         internal use.
5602         * allocatestack.c (__nptl_setxid): New function.
5603         * descr.h (struct xid_command): Define type.
5604         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5605         (sighandler_setxid): New function.
5606         (__pthread_initialize_minimal): Register sighandler_setxid for
5607         SIGCANCEL.
5608         * pt-allocrtsig.c: Update comment.
5609         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5610         Declare __nptl_setxid.
5611         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5612         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5613         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5614         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5615         and pthread_setresuid_np.
5616         * pthread_setgid_np.c: New file.
5617         * pthread_setuid_np.c: New file.
5618         * pthread_setegid_np.c: New file.
5619         * pthread_seteuid_np.c: New file.
5620         * pthread_setregid_np.c: New file.
5621         * pthread_setreuid_np.c: New file.
5622         * pthread_setresgid_np.c: New file.
5623         * pthread_setresuid_np.c: New file.
5624         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5625         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5626         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5627         and pthread_setresuid_np.
5628         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5629         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5630         pthread_setregid, and pthread_setresgid.
5631
5632 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5633
5634         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5635         ENOMEM when out of memory.
5636
5637 2004-09-10  Roland McGrath  <roland@redhat.com>
5638
5639         [BZ #379]
5640         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5641         code, since we don't try to use the broken CLONE_STOPPED any more.
5642         * pthread_create.c (start_thread): Likewise.
5643
5644 2004-09-15  Richard Henderson  <rth@redhat.com>
5645
5646         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5647
5648 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5649
5650         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5651         (__libc_unwind_longjmp): Delete macro and declare as function.
5652         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5653         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5654         nptl directory.
5655         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5656         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5657         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5658
5659 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5660
5661         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5662         for __USE_XOPEN2K.
5663         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5664         types also for __USE_XOPEN2K.
5665         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5666         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5667         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5668         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5669         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5670         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5671         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5672         [BZ #320]
5673
5674 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5675
5676         * sysdeps/pthread/pthread.h
5677         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5678         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5679         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5680         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5681         [BZ #375]
5682
5683 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5684
5685         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5686         PSEUDO to be used with . prefix.
5687
5688         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5689         Use atomic_increment instead of atomic_exchange_and_add.
5690         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5691         Likewise.
5692         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5693         Likewise.
5694         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5695         Likewise.
5696
5697         * allocatestack.c (allocate_stack): Use atomic_increment_val
5698         instead of atomic_exchange_and_add.
5699         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5700         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5701         Likewise.
5702         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5703         Likewise.
5704
5705         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5706         the initialization function might throw.
5707
5708 2005-09-05  Richard Henderson  <rth@redhat.com>
5709
5710         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5711         Move definition inside libpthread, libc, librt check.  Provide
5712         definition for rtld.
5713
5714 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5715
5716         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5717         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5718         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5719         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5720         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5721         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5722         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5723         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5724         * unwind.c: Use it.
5725
5726         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5727         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5728         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5729         Likewise.
5730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5731         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5732         this is the last waiter, signal pthread_cond_destroy caller and
5733         avoid using the pthread_cond_t structure after unlock.
5734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5736         Read clock type from the least significant bits of __nwaiters instead
5737         of __clock.
5738         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5739         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5740
5741 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5742
5743         [BZ #342]
5744         * Makefile (tests): Add tst-cond20 and tst-cond21.
5745         * tst-cond20.c: New test.
5746         * tst-cond21.c: New test.
5747         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5748         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5749         it unsigned int.
5750         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5751         Likewise.
5752         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5753         (pthread_cond_t): Likewise.
5754         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5755         Likewise.
5756         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5757         Likewise.
5758         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5759         Likewise.
5760         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5761         (cond_nwaiters): New.
5762         (clock_bits): New.
5763         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5764         if there are waiters not signalled yet.
5765         Wait until all already signalled waiters wake up.
5766         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5767         __nwaiters.  If pthread_cond_destroy has been called and this is the
5768         last waiter, signal pthread_cond_destroy caller and avoid using
5769         the pthread_cond_t structure after unlock.
5770         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5771         decrement it when leaving.  If pthread_cond_destroy has been called
5772         and this is the last waiter, signal pthread_cond_destroy caller.
5773         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5774         Likewise.  Read clock type from the least significant bits of
5775         __nwaiters instead of __clock.
5776         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5777         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5778         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5779         clock type just from the last COND_CLOCK_BITS bits of value.
5780         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5781         instead of __clock, just from second bit of condattr's value.
5782
5783 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5784
5785         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5786         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5787         != 64.
5788         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5789
5790 2004-08-15  Roland McGrath  <roland@frob.com>
5791
5792         * pthread_atfork.c: Update copyright terms including special exception
5793         for these trivial files, which are statically linked into executables
5794         that use dynamic linking for the significant library code.
5795
5796 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5797
5798         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5799         pthread_rwlock_rdlock.
5800         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5801         Decrease __nr_readers_queued after reacquiring lock.
5802         * sysdeps/pthread/pthread_rwlock_timedrdlock
5803         (pthread_rwlock_timedrdlock): Likewise.
5804         Reported by Bob Cook <bobcook47@hotmail.com>.
5805
5806 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5807
5808         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5809         before pthread_barrier_wait.
5810
5811 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5812
5813         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5814         Remove unnecessary exception handling data.
5815
5816 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5817
5818         [BZ #284]
5819         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5820         instead of clockid_t.
5821
5822 2004-07-21  Roland McGrath  <roland@redhat.com>
5823
5824         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5825
5826 2004-07-19  Roland McGrath  <roland@redhat.com>
5827
5828         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5829
5830 2004-07-02  Roland McGrath  <roland@redhat.com>
5831
5832         * configure: Don't exit.
5833
5834 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5835
5836         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5837         (__pthread_cond_timedwait): Check for invalid nanosecond in
5838         timeout value.
5839
5840 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5841
5842         * Makefile: Add rules to build and run tst-fini1.
5843         * tst-fini1.c: New file.
5844         * tst-fini1mod.c: New file.
5845
5846 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5847
5848         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5849         if no cancellation support is needed.
5850         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5851         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5852         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5853         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5854         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5855         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5856         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5857         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5858         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5859
5860         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5861         only if not already defined.
5862
5863 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5864
5865         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5866         constraint "m" instead of "0" for futex.
5867
5868         * shlib-versions: Add powerpc64-.*-linux.*.
5869
5870 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5871
5872         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5873         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5874         for valid tv_nsec.
5875         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5876         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5877         bits.
5878
5879 2004-06-29  Roland McGrath  <roland@redhat.com>
5880
5881         * Banner: NPTL no longer has its own version number.
5882         * Makefile (nptl-version): Variable removed.
5883         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5884         using $(version), the glibc version number.
5885
5886 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5887
5888         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5889         Fix branch offset for a PLT entry.
5890         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5891         Likewise.
5892         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5893         Likewise.
5894         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5895         Likewise.
5896         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5897         Likewise.
5898
5899 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5900
5901         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5902         unconditionally.
5903
5904 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5905
5906         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5907         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5908         instead of tv_sec.
5909         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5910         (pthread_rwlock_timedrdlock): Likewise.
5911
5912 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5913
5914         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5915         Set __r7 to val, not mutex.
5916
5917 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5918
5919         * Makefile: Add rules to build tst-rwlock14.
5920         * tst-rwlock14.c: New file.
5921
5922 2004-06-24  Boris Hu  <boris.hu@intel.com>
5923
5924         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5925         check.
5926         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5927
5928 2004-06-19  Andreas Jaeger  <aj@suse.de>
5929
5930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5931         assembler in last patch.
5932
5933 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5934
5935         * sysdeps/pthread/pthread_cond_timedwait.c
5936         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5938         (__pthread_cond_timedwait): Check for invalid nanosecond in
5939         timeout value.
5940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5941         * tst-cond19.c: New file.
5942         * Makefile: Add rules to build and run tst-cond19.
5943
5944 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
5945
5946         * tst-context1.c (GUARD_PATTERN): Defined.
5947         (tst_context_t): Define struct containing ucontext_t & guard words.
5948         (ctx): Declare as an array of tst_context_t.
5949         (fct): Verify uc_link & guard words are still valid.
5950         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
5951
5952 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5953
5954         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5955         Add __data.__futex field, reshuffle __data.__clock.
5956         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5957         (__pthread_cond_signal): Increment __futex at the same time as
5958         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5959         address of low 32-bits of __wakeup_seq to futex syscall.
5960         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5961         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5962         releasing internal lock to FUTEX_WAIT.
5963         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5964         (__pthread_cond_timedwait): Likewise.
5965         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5966         (FUTEX_CMP_REQUEUE): Define.
5967         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5968         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5969         Pass __futex value from before the unlock and __futex address instead
5970         of address of low 32-bits of __wakeup_seq to futex syscall.
5971         Fallback to FUTEX_WAKE all on any errors.
5972
5973 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
5974
5975         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5976         comment typo.
5977         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5978         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5979         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5980         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5981         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
5982
5983 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5984
5985         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5986         Add memory clobber to inline assembly.
5987         (__lll_mutex_trylock): Likewise.
5988         (__lll_mutex_cond_trylock): Likewise.
5989
5990 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5991
5992         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5993         Pass val argument as 6th system call argument in %r7.
5994
5995 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5996
5997         * Makefile (tests): Add tst-cond16.
5998         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5999         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6000         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6001         Add __data.__futex field, reshuffle __data.__clock.
6002         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6003         (__pthread_cond_signal): Increment __futex at the same time as
6004         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6005         address of low 32-bits of __wakeup_seq to futex syscall.
6006         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6007         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6008         releasing internal lock to FUTEX_WAIT.
6009         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6010         (__pthread_cond_timedwait): Likewise.
6011         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6012         (FUTEX_CMP_REQUEUE): Define.
6013         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6014         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6015         Pass __futex value from before the unlock and __futex address instead
6016         of address of low 32-bits of __wakeup_seq to futex syscall.
6017         Fallback to FUTEX_WAKE all on any errors.
6018         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6019         Define.
6020         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6021         internally.  Return non-zero if error, zero if success.
6022         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6023         Add __data.__futex field, reshuffle __data.__clock.
6024         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6025         Define.
6026         (lll_futex_requeue): Add val argument, return 1 unconditionally
6027         for the time being.
6028         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6029         Add __data.__futex field, reshuffle __data.__clock.
6030         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6031         Define.
6032         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6033         internally.  Return non-zero if error, zero if success.
6034         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6035         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6036         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6037         Define.
6038         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6039         internally.  Return non-zero if error, zero if success.
6040         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6041         Add __data.__futex field, reshuffle __data.__clock.
6042         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6043         Define.
6044         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6045         internally.  Return non-zero if error, zero if success.
6046         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6047         Add __data.__futex field, reshuffle __data.__clock.
6048         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6049         Add __data.__futex field, reshuffle __data.__clock.
6050         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6051         Increment __futex at the same time as __wakeup_seq or __total_seq.
6052         Pass address of __futex instead of address of low 32-bits of
6053         __wakeup_seq to futex syscall.
6054         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6055         Pass __futex value from before releasing internal lock
6056         to FUTEX_WAIT.
6057         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6058         Likewise.  Avoid unnecessary shadowing of variables.
6059         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6060         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6061         unlock and __futex address instead of address of low 32-bits of
6062         __wakeup_seq to futex_requeue macro, adjust for new return value
6063         meaning.
6064         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6065         (__pthread_cond_signal): Increment __futex at the same time as
6066         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6067         address of low 32-bits of __wakeup_seq to futex syscall.
6068         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6069         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6070         releasing internal lock to FUTEX_WAIT.
6071         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6072         (__pthread_cond_timedwait): Likewise.
6073         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6074         (FUTEX_CMP_REQUEUE): Define.
6075         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6076         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6077         Pass __futex value from before the unlock and __futex address instead
6078         of address of low 32-bits of __wakeup_seq to futex syscall.
6079         Fallback to FUTEX_WAKE all on any errors.
6080
6081 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6082
6083         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6084         Add nop to align the end of critical section.
6085         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6086
6087 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6088
6089         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6090         Add __broadcast_seq field.
6091         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6092         all waiters as woken with woken_seq and bump broadcast counter.
6093         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6094         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6095         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6096         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6097
6098 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6099
6100         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6101         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6102         Reported by Kaz Kojima.
6103
6104 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6105
6106         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6107
6108 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6109
6110         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6111         __broadcast_seq with bc_seq after acquiring internal lock instead of
6112         before it.
6113
6114 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6115
6116         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6117         compilation.
6118         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6119         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6120         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6121         (pthread_cond_t): Add __data.__broadcast_seq field.
6122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6123         (FRAME_SIZE): Define.
6124         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6125         Comment typo fixes.
6126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6127         Define.
6128         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6129         typo fixes.
6130         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6131         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6132         fixes.
6133
6134 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6135
6136         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6137         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6138         Add __broadcast_seq field.
6139         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6140         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6141         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6142         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6143         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6145         all waiters as woken with woken_seq and bump broadcast counter.
6146         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6148         __broadcast_seq field.
6149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6150         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6151         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6152         * pthread_cond_init.c: Initialize __broadcast_seq field.
6153         * Makefile (tests): Add tst-cond17 and tst-cond18.
6154         Add .NOTPARALLEL goal.
6155         * tst-cond16.c: New file.  From Jakub.
6156         * tst-cond17.c: New file.  From Jakub.
6157         * tst-cond18.c: New file.  From Jakub.
6158
6159 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6160
6161         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6162         unwind info.
6163
6164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6165         Parametrize frame size.  Correct some unwind info.
6166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6167
6168 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6169
6170         * tst-stack3.c: Note testing functionality beyond POSIX.
6171
6172 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6173
6174         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6175         Change conditional from ifdef to if.
6176
6177 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6178
6179         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6180         SYSDEP_CANCEL_ERROR): Define.
6181         (PSEUDO): Use it.
6182
6183 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6184
6185         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6186
6187 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6188
6189         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6190
6191 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6192
6193         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6194         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6195         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6196         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6197
6198 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6199
6200         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6201         thread has all signals blocked.
6202
6203 2004-04-18  Andreas Jaeger  <aj@suse.de>
6204
6205         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6206         (SEM_VALUE_MAX): Add missing brace.
6207
6208 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6209
6210         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6211         in rt subdir.
6212         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6213         * sysdeps/pthread/tst-mqueue8x.c: New test.
6214         * tst-cancel4.c: Update comment about message queues.
6215
6216         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6217         return it_value { 0, 0 }.
6218         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6219         like SIGEV_SIGNAL.
6220         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6221         assertion for SIGEV_NONE.
6222         (thread_attr_compare): Compare all attributes, not just a partial
6223         subset.
6224
6225 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6226
6227         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6228
6229 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6230
6231         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6232         Just use a plain number.
6233         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6234         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6235         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6236         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6237         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6238         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6239         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6240
6241 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6242
6243         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6244         frame info.
6245         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6246
6247 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6248
6249         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6250         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6251         of calling sigwaitinfo.
6252
6253 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6254
6255         * allocatestack.c (allocate_stack): Set reported_guardsize
6256         unconditionally.
6257         * pthread_getattr_np.c (pthread_getattr_np): Use
6258         reported_guardsize instead of guardsize.
6259         * descr.h (struct pthread): Add reported_guardsize field.
6260
6261 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6262
6263         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6264
6265 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6266
6267         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6268
6269 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6270
6271         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6272         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6273         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6274         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6275         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6276         Define.
6277         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6278         (_POSIX_MESSAGE_PASSING): Define.
6279         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6280         (_POSIX_MESSAGE_PASSING): Define.
6281         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6282         (_POSIX_MESSAGE_PASSING): Define.
6283
6284 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6285
6286         * tst-context1.c (fct): Check whether correct stack is used.
6287
6288 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6289
6290         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6291         matching constraints for asm mem parameters.
6292
6293         * tst-clock2.c (tf): Don't define unless needed.
6294
6295 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6296
6297         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6298         $(gnulib).
6299
6300 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6301
6302         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6303         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6304         * pthreadP.h: Declare __nptl_deallocate_tsd.
6305         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6306         Adjust caller.
6307
6308         * Makefile (tests): Add tst-tsd5.
6309         * tst-tsd5.c: New file.
6310
6311 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6312
6313         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6314         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6315         is SHLIB_COMPAT check.
6316         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6317         (__pthread_attr_getaffinity_old): Likewise.
6318         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6319         (__pthread_getaffinity_old): Likewise.
6320         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6321         (__pthread_setaffinity_old): Likewise.
6322
6323 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6324
6325         * allocatestack.c (_make_stacks_executable): Call
6326         _dl_make_stack_executable first.
6327
6328 2004-03-24  Roland McGrath  <roland@redhat.com>
6329
6330         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6331         constraint instead of "0".
6332
6333 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6334
6335         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6336         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6337
6338         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6339         code to avoid warning.
6340
6341 2004-03-24  Andreas Jaeger  <aj@suse.de>
6342
6343         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6344         (__pthread_attr_setaffinity_old): Remove const.
6345
6346 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6347
6348         * sysdeps/unix/sysv/linux/smp.h: New file.
6349         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6350         * init.c: Define __is_smp.
6351         (__pthread_initialize_minimal_internal): Call is_smp_system to
6352         initialize __is_smp.
6353         * pthreadP.h: Declare __is_smp.
6354         Define MAX_ADAPTIVE_COUNT is necessary.
6355         * pthread_mutex_init.c: Add comment regarding __spins field.
6356         * pthread_mutex_lock.c: Implement adaptive mutex type.
6357         * pthread_mutex_timedlock.c: Likewise.
6358         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6359         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6360         Add __spins field.
6361         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6362         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6363         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6364         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6365         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6366         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6367         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6368         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6369         lll_mutex_cond_trylock.
6370         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6371         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6372         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6373         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6374         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6375         Define BUSY_WAIT_NOP.
6376         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6377         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6378
6379         * tst-mutex5.c: Add support for testing adaptive mutexes.
6380         * tst-mutex7.c: Likewise.
6381         * tst-mutex5a.c: New file.
6382         * tst-mutex7a.c: New file.
6383         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6384
6385         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6386         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6387         vgettimeofday call might destroy the content.
6388
6389         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6390         @pause in the loop.
6391
6392         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6393         No need to restrict type of ret.  Make it int.  Add comment.
6394
6395         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6396         Remove unnecessary setne instruction.
6397
6398 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6399
6400         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6401         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6402         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6403         If realloc fails, break out of the loop.
6404
6405 2004-03-20  Andreas Jaeger  <aj@suse.de>
6406
6407         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6408         (__pthread_setaffinity_old): Fix interface.
6409         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6410         (__pthread_getaffinity_old): Likewise.
6411
6412         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6413         (__pthread_setaffinity_new): Remove duplicate declaration.
6414
6415 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6416
6417         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6418         the return value to a safe register.
6419         (CDISABLE): Set the function argument correctly.
6420
6421 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6422
6423         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6424         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6425         Rewrite so that only one locked memory operation per round is needed.
6426         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6427         (pthread_barrier_wait): After wakeup, release lock only when the
6428         last thread stopped using the barrier object.
6429         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6430         (__pthread_cond_wait): Don't store mutex address if the current
6431         value is ~0l.  Add correct cleanup support and unwind info.
6432         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6433         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6434         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6435         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6436         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6437         Add correct cleanup support and unwind info.
6438         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6439         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6440         information for syscall wrappers.
6441
6442 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6443
6444         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6445         cpusetsize field, remove next.
6446         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6447         parameter for size of the CPU set.
6448         (pthread_setaffinity_np): Likewise.
6449         (pthread_attr_getaffinity_np): Likewise.
6450         (pthread_attr_setaffinity_np): Likewise.
6451         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6452         interface change, keep compatibility code.
6453         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6454         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6455         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6456         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6457         __pthread_getaffinity_np.
6458         * Versions: Add version for changed interfaces.
6459         * tst-attr3.c: Adjust test for interface change.
6460         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6461         increasing buffer sizes.
6462         * pthread_attr_destroy.c: Remove unused list handling.
6463         * pthread_attr_init.c: Likewise.
6464
6465 2004-03-17  Roland McGrath  <roland@redhat.com>
6466
6467         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6468         first argument to clock_getres so we ever enable kernel timers.
6469
6470 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6471
6472         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6473
6474 2004-03-12  Richard Henderson  <rth@redhat.com>
6475
6476         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6477         oldvalue from CENABLE to CDISABLE.
6478
6479 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6480
6481         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6482         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6483         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6484         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6485
6486 2004-03-11  Richard Henderson  <rth@redhat.com>
6487
6488         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6489         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6490         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6491
6492 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6493
6494         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6495         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6496         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6497
6498 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6499
6500         * forward.c (__pthread_cond_broadcast_2_0,
6501         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6502         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6503         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6504
6505 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6506
6507         * sysdeps/sh/tcb-offsets.sym: Add PID.
6508         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6509         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6510
6511 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6512
6513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6514         include <sysdep-cancel.h>, vfork is no cancellation point.
6515         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6516         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6517         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6518
6519 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6520
6521         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6522         libc_hidden_def.
6523         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6524         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6525         Likewise.
6526         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6527         Likewise.
6528         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6529         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6530         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6531         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6532         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6533
6534         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6535         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6536         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6537         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6538         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6539         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6540
6541         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6542         a local register for saving old PID.  Negate PID in parent upon exit.
6543
6544         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6545         tcb-offsets.h.
6546         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6547         before syscall, set to the old value in the parent afterwards.
6548         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6549         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6550         tcb-offsets.h.
6551         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6552         before syscall, set to the old value in the parent afterwards.
6553         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6554         * sysdeps/s390/tcb-offsets.sym: Add PID.
6555
6556         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6557         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6558         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6559         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6560         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6561         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6562
6563 2004-03-10  Andreas Schwab  <schwab@suse.de>
6564
6565         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6566         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6567         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6568
6569 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6570
6571         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6572         * tst-cancel21.c (do_one_test): Likewise.
6573         Reported by Gordon Jin <gordon.jin@intel.com>.
6574
6575 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6576
6577         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6578         if non-zero and set to INT_MIN if zero.
6579         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6580         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6581         (SAVE_PID, RESTORE_PID): Define.
6582         (__vfork): Use it.
6583         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6584         Use relative path to avoid including NPTL i386/vfork.S.
6585         (SAVE_PID, RESTORE_PID): Define.
6586         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6587         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6588         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6589         tst-vfork2x.
6590         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6591         * tst-vfork1.c: New test.
6592         * tst-vfork2.c: New test.
6593         * tst-vfork1x.c: New test.
6594         * tst-vfork2x.c: New test.
6595
6596 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6597
6598         * sysdeps/i386/tcb-offsets.sym: Add PID.
6599         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6600         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6601         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6602
6603 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6604
6605         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6606
6607 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6608
6609         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6610         _rtld_global_ro.
6611
6612 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6613
6614         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6615         _rtld_global_ro.
6616
6617         * tst-once4.c: Remove unnecessary macro definition.
6618
6619         * tst-mutex7.c (do_test): Limit thread stack size.
6620         * tst-once2.c (do_test): Likewise.
6621         * tst-tls3.c (do_test): Likewise.
6622         * tst-tls1.c (do_test): Likewise.
6623         * tst-signal3.c (do_test): Likewise.
6624         * tst-kill6.c (do_test): Likewise.
6625         * tst-key4.c (do_test): Likewise.
6626         * tst-join4.c (do_test): Likewise.
6627         * tst-fork1.c (do_test): Likewise.
6628         * tst-context1.c (do_test): Likewise.
6629         * tst-cond2.c (do_test): Likewise.
6630         * tst-cond10.c (do_test): Likewise.
6631         * tst-clock2.c (do_test): Likewise.
6632         * tst-cancel10.c (do_test): Likewise.
6633         * tst-basic2.c (do_test): Likewise.
6634         * tst-barrier4.c (do_test): Likewise.
6635
6636 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6637
6638         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6639
6640 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6641
6642         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6643         (__pthread_cond_timedwait): Optimize wakeup test.
6644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6645         (__pthread_cond_wait): Likewise.
6646         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6647         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6648         Likewise.
6649
6650 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6651
6652         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6653         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6654         the atomic instruction needed.
6655         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6656         (__lll_mutex_lock_wait): Likewise.
6657
6658 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6659
6660         * Makefile (tests): Add tst-cond14 and tst-cond15.
6661         * tst-cond14.c: New file.
6662         * tst-cond15.c: New file.
6663
6664 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6665
6666         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6667         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6668         needs to be implemented differently to be useful.
6669
6670 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6671
6672         * pthread_attr_setschedparam.c: Don't test priority against limits
6673         here.  Set ATTR_FLAG_SCHED_SET flag.
6674         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6675         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6676         from parent thread to child.  If attribute is used and scheduling
6677         parameters are not inherited, copy parameters from attribute or
6678         compute them.  Check priority value.
6679         * pthread_getschedparam.c: If the parameters aren't known yet get
6680         them from the kernel.
6681         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6682         ATTR_FLAG_POLICY_SET flag for thread.
6683         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6684         and ATTR_FLAG_POLICY_SET.
6685
6686         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6687
6688         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6689         fail if stack address hasn't been set.  Just return 0.
6690
6691 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6692
6693         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6694         libpthread for the files in this list.
6695         (CFLAGS-tst-unload): Removed.
6696         * tst-unload.c (do_test): Don't use complete path for
6697         LIBPHREAD_SO.
6698
6699         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6700         tst-_res1mod2.
6701
6702 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6703
6704         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6705         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6706         operation per round is needed.
6707         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6708         (__lll_mutex_lock_wait): Likewise.
6709
6710 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6711
6712         * tst-cancel9.c (cleanup): Don't print to stderr.
6713
6714 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6715
6716         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6717
6718 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6719
6720         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6721         (__syscall_error_handler2): Call CDISABLE.
6722         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6723         (__syscall_error_handler2): Call CDISABLE.
6724
6725         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6726         Release lock before the loop, don't reacquire it.
6727
6728         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6729
6730 2004-02-19  Andreas Schwab  <schwab@suse.de>
6731
6732         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6733         Fix last change.
6734
6735 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6736
6737         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6738         (pthread_barrier_wait): After wakeup, release lock only when the
6739         last thread stopped using the barrier object.
6740         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6741         (pthread_barrier_wait): Likewise.
6742         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6743         Likewise.
6744         * Makefile (tests): Add tst-barrier4.
6745         * tst-barrier4.c: New file.
6746
6747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6748         (__pthread_cond_timedwait): Perform timeout test while holding
6749         internal lock to prevent wakeup race.
6750         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6751         * sysdeps/pthread/pthread_cond_timedwait.c
6752         (__pthread_cond_timedwait): Likewise.
6753         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6754         (__pthread_cond_timedwait): Likewise.
6755
6756 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6757
6758         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6759         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6760         * Makefile (tests): Add tst-rwlock13.
6761         * tst-rwlock13.c: New test.
6762
6763 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6764
6765         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6766         (__condvar_tw_cleanup): Little optimization.
6767         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6768
6769 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6770
6771         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6772         libpthread as "lib" parameter to SHLIB_COMPAT.
6773         (__novmx_siglongjmp): Fix typo in function name.
6774         (__novmx_longjmp): Fix typo in function name.
6775
6776 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6777
6778         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6779         __builtin_expect.
6780
6781         * sysdeps/generic/pt-longjmp.c: Moved to...
6782         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6783
6784 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6785
6786         * Makefile (libpthread-routines): Add pt-cleanup.
6787         * pt-longjmp.c: Removed.
6788         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6789         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6790         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6791         Version longjmp, siglongjmp for GLIBC_2.3.4.
6792         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6793
6794 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6795
6796         * sysdeps/pthread/pthread_cond_timedwait.c
6797         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6798         Reuse code.  Add __builtin_expects.
6799
6800         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6801         (__pthread_cond_timedwait): Get internal lock in case timeout has
6802         passed before the futex syscall.
6803         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6804
6805 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6806
6807         * allocatestack.c: Pretty printing.
6808
6809         * sysdeps/pthread/createthread.c (create_thread): Don't add
6810         CLONE_DETACHED bit if it is not necessary.
6811
6812 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6813
6814         * pthread_getattr_np.c: Include ldsodefs.h.
6815
6816 2004-01-16  Richard Henderson  <rth@redhat.com>
6817
6818         * allocatestack.c: Don't declare __libc_stack_end.
6819         * init.c (__pthread_initialize_minimal_internal): Likewise.
6820         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6821
6822 2004-01-15  Richard Henderson  <rth@redhat.com>
6823
6824         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6825         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6826         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6827         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6828         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6829         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6830         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6831         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6832
6833 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6834
6835         * init.c (pthread_functions): Make array const.
6836
6837 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6838
6839         * allocatestack.c (__make_stacks_executable): Change interface.
6840         Check parameters.  Pass parameter on to libc counterpart.
6841         * pthreadP.h: Change declaration.
6842
6843 2004-01-13  Richard Henderson  <rth@redhat.com>
6844
6845         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6846         prototype form.
6847         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6848         Likewise.
6849
6850         * sysdeps/alpha/Makefile: New file.
6851         * sysdeps/alpha/tcb-offsets.sym: New file.
6852         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6853         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6854
6855         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6856         on powerpc version.
6857
6858 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6859
6860         * Makefile (tests): Add tst-backtrace1.
6861         * tst-backtrace1.c: New test.
6862
6863 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6864
6865         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6866         register as second parameter to the REGISTER macro.
6867         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6868         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6869         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6870         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6871         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6872         of thread register as second parameter to REGISTER macro in 64 case.
6873
6874 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6875
6876         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6877         (CFLAGS-getpid.o): Defined.
6878         (CFLAGS-getpid.os): Defined.
6879
6880 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6881
6882         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6883         returned for main thread does not overlap with any other VMA.
6884         Patch by Jakub Jelinek.
6885
6886 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6887
6888         * tst-raise1.c: Include stdio.h.
6889
6890 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6891
6892         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6893         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6894         If pid is 0, set it to selftid.
6895         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6896         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6897         != 0, return self->tid without doing a syscall.
6898         * descr.h (struct pthread): Move pid field after tid.
6899
6900         * Makefile (tests): Add tst-raise1.
6901         * tst-raise1.c: New file.
6902
6903 2003-12-23  Roland McGrath  <roland@redhat.com>
6904
6905         * tst-oddstacklimit.c: New file.
6906         * Makefile (tests): Add it.
6907         (tst-oddstacklimit-ENV): New variable.
6908
6909         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6910         value up to page size for __default_stacksize.
6911
6912 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6913
6914         * Makefile (tests): Add tst-eintr5.
6915         * tst-eintr5.c: New file.
6916
6917         * eintr.c (eintr_source): Prevent sending signal to self.
6918
6919         * tst-eintr2.c (tf1): Improve error message.
6920
6921 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6922
6923         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6924         * sysdeps/unix/sysv/linux/getpid.c: New file.
6925         * pthread_cancel.c: Add comment explaining use of PID field.
6926         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6927         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6928         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6929         temporarily to signal the field must not be relied on and updated
6930         by getpid().
6931         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6932         temporarily negative.
6933         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6934
6935 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6936
6937         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6938         (eintr_source): If ARG != NULL, use pthread_kill.
6939         * tst-eintr1.c: Adjust for this change.
6940         * tst-eintr2.c: Likewise.
6941         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6942         * tst-eintr3.c: New file.
6943         * tst-eintr4.c: New file.
6944
6945 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
6946
6947         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6948         if CANCELSTATE_BITMASK is set.
6949         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6950         Likewise.
6951
6952         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6953         (tests-reverse): Add tst-cancel23.
6954         * tst-cancel22.c: New test.
6955         * tst-cancel23.c: New test.
6956
6957 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
6958
6959         * tst-eintr1.c: Better error messages.
6960
6961         * Makefile (tests): Add tst-eintr2.
6962         * tst-eintr2.c: New file.
6963
6964 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
6965
6966         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6967         (CFLAGS-tst-cancelx21.c): Set.
6968         * tst-cancel21.c: New test.
6969         * tst-cancelx21.c: New test.
6970
6971         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
6972         comparison operand.
6973         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6974         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
6975         * pt-longjmp.c: Include jmpbuf-unwind.h.
6976         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6977         _JMPBUF_UNWINDS.  Adjust compared pointers.
6978         * init.c (__pthread_initialize_minimal_internal): Initialize
6979         pd->stackblock_size.
6980         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6981         * sysdeps/alpha/jmpbuf-unwind.h: New file.
6982         * sysdeps/i386/jmpbuf-unwind.h: New file.
6983         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6984         * sysdeps/s390/jmpbuf-unwind.h: New file.
6985         * sysdeps/sh/jmpbuf-unwind.h: New file.
6986         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6987         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6988         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6989         (_JMPBUF_CFA_UNWINDS): Remove.
6990         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6991
6992 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6993
6994         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6995         (CFLAGS-tst-cancelx20.c): Set.
6996         * tst-cancel20.c: New test.
6997         * tst-cancelx20.c: New test.
6998
6999 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7000
7001         * init.c (__pthread_initialize_minimal_internal): Don't treat
7002         architectures with separate register stack special here when
7003         computing default stack size.
7004
7005 2003-12-17  Roland McGrath  <roland@redhat.com>
7006
7007         * Makefile (tst-cancelx7-ARGS): New variable.
7008         Reportd by Greg Schafer <gschafer@zip.com.au>.
7009
7010 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7011
7012         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7013         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7014         (tst-stack3-ENV): Set.
7015         ($(objpfx)tst-stack3-mem): New.
7016         * tst-stack3.c: New test.
7017
7018 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7019
7020         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7021         Add unwind directives.  Drop unused .regstk directive.
7022         (_fini_EPILOG_BEGINS): Add unwind directives.
7023
7024 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7025
7026         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7027         Assume parameter is a pointer.
7028         (lll_futex_wake): Likewise.
7029         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7030         Likewise.
7031         (lll_futex_wake): Likewise.
7032         Reported by Boris Hu.
7033         * sysdeps/unix/sysv/linux/unregister-atfork.c
7034         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7035
7036         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7037
7038 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7039
7040         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7041         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7042         __rtld_lock_initialize for ld.so lock.
7043         Patch in part by Adam Li <adam.li@intel.com>.
7044
7045 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7046
7047         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7048         in $(gnulib).  Also, remove stale comment.
7049
7050 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7051
7052         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7053         advantage of new syscall stub and optimize accordingly.
7054
7055         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7056         from SYS_futex, to match expectations of
7057         sysdep.h:DO_INLINE_SYSCALL.
7058         (lll_futex_clobbers): Remove.
7059         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7060         (lll_futex_wake): Likewise.
7061         (lll_futex_requeue): Likewise.
7062         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7063         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7064         Jelinek).
7065         (__lll_mutex_lock): Likewise.
7066         (__lll_mutex_cond_lock): Likewise.
7067         (__lll_mutex_timed_lock): Likewise.
7068         (__lll_mutex_unlock): Likewise.
7069         (__lll_mutex_unlock_force): Likewise.
7070
7071         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7072         comes before the include of <sysdep.h>.
7073         (THREAD_SELF_SYSINFO): New macro.
7074         (THREAD_SYSINFO): Likewise.
7075         (INIT_SYSINFO): New macro.
7076         (TLS_INIT_TP): Call INIT_SYSINFO.
7077
7078         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7079
7080         * sysdeps/pthread/createthread.c (create_thread): Use
7081         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7082         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7083         THREAD_SELF_SYSINFO instead of open code.
7084         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7085         (THREAD_SYSINFO): Likewise.
7086
7087         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7088
7089         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7090
7091 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7092
7093         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7094         instead of .init.  Patch by David Mosberger.
7095
7096 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7097
7098         * sysdeps/pthread/configure.in: Remove broken declaration in C
7099         cleanup handling check.
7100
7101 2003-11-30  Andreas Jaeger  <aj@suse.de>
7102
7103         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7104         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7105         Likewise.
7106
7107 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7108
7109         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7110         * pthread_attr_destroy.c: Include shlib-compat.h.
7111         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7112         is set in iattr->flags.
7113         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7114
7115 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7116
7117         * Makefile (distribute): Add tst-cleanup4aux.c.
7118
7119         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7120         include.
7121
7122 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7123
7124         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7125         pthread_cond_signal.
7126
7127         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7128         store mutex address if the current value is ~0l.
7129         * sysdeps/pthread/pthread_cond_timedwait.c
7130         (__pthread_cond_timedwait): Likewise.
7131         * sysdeps/pthread/pthread_cond_broadcast.c
7132         (__pthread_cond_broadcast): Don't use requeue for pshared
7133         condvars.
7134
7135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7136         (__pthread_cond_wait): Don't store mutex address if the current
7137         value is ~0l.
7138         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7139         (__pthread_cond_timedwait): Likewise.
7140         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7141         (__pthread_cond_broadcast): Don't use requeue for pshared
7142         condvars.
7143
7144         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7145         element with ~0l for pshared condvars, with NULL otherwise.
7146
7147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7148         (__pthread_cond_wait): Don't store mutex address if the current
7149         value is ~0l.
7150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7151         (__pthread_cond_timedwait): Likewise.
7152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7153         (__pthread_cond_broadcast): Don't use requeue for pshared
7154         condvars.
7155
7156         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7157         * tst-cond12.c: New file.
7158         * tst-cond13.c: New file.
7159
7160 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7161
7162         * sysdeps/pthread/configure.in: Make missing forced unwind support
7163         fatal.
7164
7165 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7166
7167         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7168
7169 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7170
7171         * Makefile: Add magic to clean up correctly.
7172
7173 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7174
7175         * unwind.c (FRAME_LEFT): Define.
7176         (unwind_stop): Handle old style cleanups here.
7177         (__pthread_unwind): Handle old style cleanups only if
7178         !HAVE_FORCED_UNWIND.
7179         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7180         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7181         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7182         ($(objpfx)tst-cleanupx4): Likewise.
7183         * tst-cleanup4.c: New test.
7184         * tst-cleanup4aux.c: New.
7185         * tst-cleanupx4.c: New test.
7186
7187 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7188
7189         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7190         lll_mutex_*lock macros to skip atomic operations on some archs.
7191
7192 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7193
7194         * sysdeps/pthread/tst-timer.c (main): Initialize
7195         sigev2.sigev_value as well.
7196
7197 2003-10-15  Roland McGrath  <roland@redhat.com>
7198
7199         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7200         is missing.
7201         * sysdeps/pthread/configure: Regenerated.
7202
7203 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7204
7205         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7206         locking macros.  No distinction between normal and mutex locking
7207         anymore.
7208         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7209         Merge bits from lowlevelmutex.S we still need.
7210         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7211         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7212         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7213         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7214         new mutex implementation.
7215         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7216         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7217         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7218         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7219         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7221         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7223         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7224         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7225         symbol for entry point to avoid cancellation.
7226
7227 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7228
7229         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7230         changes.
7231         (SAVE_OLDTYPE_0): Fix a typo.
7232
7233 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7234
7235         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7236         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7237
7238 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7239
7240         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7241         correct offset.
7242
7243 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7244
7245         * Makefile (tests): Add tst-cancel19.
7246         * tst-cancel19.c: New test.
7247
7248 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7249
7250         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7251         restoring of the old cancellation type.
7252
7253 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7254
7255         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7256
7257 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7258
7259         * sysdeps/pthread/malloc-machine.h: New file
7260
7261 2003-09-24  Roland McGrath  <roland@redhat.com>
7262
7263         * allocatestack.c (__make_stacks_executable): Don't ignore return
7264         value from _dl_make_stack_executable.
7265
7266 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7267
7268         * allocatestack.c (__make_stacks_executable): Also change
7269         permission of the currently unused stacks.
7270
7271         * allocatestack.c (change_stack_perm): Split out from
7272         __make_stacks_executable.
7273         (allocate_stack): If the required permission changed between the time
7274         we started preparing the stack and queueing it, change the permission.
7275         (__make_stacks_executable): Call change_stack_perm.
7276
7277         * Makefile: Build tst-execstack-mod locally.
7278         * tst-execstack-mod.c: New file.
7279
7280 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7281
7282         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7283
7284 2003-09-23  Roland McGrath  <roland@redhat.com>
7285
7286         * tst-execstack.c: New file.
7287         * Makefile (tests): Add it.
7288         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7289         (LDFLAGS-tst-execstack): New variable.
7290
7291         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7292         whether to use PROT_EXEC for stack mmap.
7293         (__make_stacks_executable): New function.
7294         * pthreadP.h: Declare it.
7295         * init.c (__pthread_initialize_minimal_internal): Set
7296         GL(dl_make_stack_executable_hook) to that.
7297
7298 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7299
7300         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7301         recommendation from AMD re avoidance of lock prefix.
7302
7303 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7304
7305         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7306         lll_futex_timed_wait instead of lll_futex_wait.
7307         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7308         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7309         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7310         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7311         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7312         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7313         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7314         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7315         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7316         Completely revamp the locking macros.  No distinction between
7317         normal and mutex locking anymore.
7318         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7319         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7320         __lll_lock_timedwait): Fix prototypes.
7321         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7322         __lll_lock_timedwait): Likewise.
7323         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7324         macros, add __builtin_expect.
7325         (lll_mutex_timedlock): Likewise.  Fix return value.
7326         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7327         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7328         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7329         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7330         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7331         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7332         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7333         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7334
7335 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7336
7337         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7338         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7339         operation if possible.
7340
7341         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7342         like jumping over the lock prefix.
7343
7344 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7345
7346         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7347         locking macros.  No distinction between normal and mutex locking
7348         anymore.
7349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7350         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7351         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7352         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7353         locking.  Merge bits from lowlevelmutex.S we still need.
7354         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7355         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7356         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7357         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7358         * Makefile (routines): Remove libc-lowlevelmutex.
7359         (libpthread-rountines): Remove lowlevelmutex.
7360         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7361         for new mutex implementation.
7362         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7363         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7364         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7365         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7366         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7367         Likewise.
7368         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7369         Likewise.
7370         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7371         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7372         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7373         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7376         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7377         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7378         Likewise.
7379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7380         Likewise.
7381         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7383         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7384         Don't use requeue.
7385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7386         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7387
7388 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7389
7390         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7391         in parameters of asm with output parameters.
7392
7393         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7394         type of DECR parameter to int.
7395         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7396
7397 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7398
7399         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7400         guardsize for each thread.
7401
7402 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7403
7404         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7405         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7406         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7407
7408         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7409         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7410         NULL.
7411         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7412         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7413         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7414         (pthread_getaffinity_np): Add hidden_def.
7415
7416         * Makefile (tests): Add tst-attr3.
7417         * tst-attr3.c: New test.
7418
7419         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7420
7421 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7422
7423         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7424         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7425
7426 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7427
7428         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7429         * tst-align.c: Include tst-stack-align.h.
7430         (tf, do_test): Use TEST_STACK_ALIGN macro.
7431
7432 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7433
7434         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7435         variable.
7436
7437 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7438
7439         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7440         stack-related values for the initial thread.
7441
7442 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7443
7444         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7445
7446 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7447
7448         * pthread_mutex_lock.c: Minor code rearrangements.
7449
7450 2003-09-05  Roland McGrath  <roland@redhat.com>
7451
7452         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7453         Instead, include ../nptl_db/db_info.c to do its magic.
7454         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7455         (__pthread_pthread_key_2ndlevel_size): Likewise.
7456         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7457         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7458         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7459         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7460         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7461         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7462         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7463         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7464         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7465         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7466         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7467         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7468         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7469         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7470         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7471         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7472         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7473
7474 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7475
7476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7477         of pthread_t to be compatible with LT.
7478         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7479         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7480         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7481         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7482         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7483         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7484         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7485
7486 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7487
7488         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7489
7490 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7491
7492         * unwind-forcedunwind.c: Move to...
7493         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7494         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7495         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7496         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7497         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7498         * unwind.c: Include jmpbuf-unwind.h.
7499         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7500
7501 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7502
7503         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7504         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7505         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7506         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7507         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7508         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7509         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7510         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7511         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7512         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7513         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7514         function.
7515         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7516         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7517         * Makefile (tests): Add tst-stack2.
7518         * tst-stack2.c: New test.
7519         * tst-stack1.c: Include limits.h and sys/param.h.
7520         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7521
7522         * pthread_condattr_setpshared.c: Include errno.h.
7523         (pthread_condattr_setpshared): Return EINVAL if pshared
7524         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7525
7526         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7527         defined symbol for entry point to avoid cancellation.
7528         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7529         Likewise.
7530         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7531         Likewise.
7532         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7533         Likewise.
7534         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7535         Likewise.
7536         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7537         Likewise.
7538         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7539         __close_nocancel, __read_nocancel, __write_nocancel,
7540         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7541         libpthread.so or librt.so, define to corresponding function
7542         without _nocancel suffix.
7543         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7544         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7545         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7546
7547         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7548
7549 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7550
7551         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7552         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7553
7554         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7555         in subsections has a symbol associated with it.
7556
7557         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7558         defined symbol for entry point to avoid cancellation.
7559         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7560
7561 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7562
7563         * Makefile (tests): Add tst-tls5.
7564         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7565         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7566         ($(objpfx)tst-tls5): New.
7567         ($(objpfx)tst-tls6.out): Likewise.
7568         (tests): Depend on $(objpfx)tst-tls6.out.
7569         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7570         (do_test): Check pthread_self () return value alignment.
7571         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7572         (tf): Check pthread_self () return value alignment.
7573         * tst-tls5.c: New test.
7574         * tst-tls5.h: New.
7575         * tst-tls5mod.c: New.
7576         * tst-tls5moda.c: New.
7577         * tst-tls5modb.c: New.
7578         * tst-tls5modc.c: New.
7579         * tst-tls5modd.c: New.
7580         * tst-tls5mode.c: New.
7581         * tst-tls5modf.c: New.
7582         * tst-tls6.sh: New test.
7583
7584         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7585         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7586         * init.c (pthread_functions): Initialize them.
7587         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7588         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7589         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7590         pthread_cond_timedwait@@GLIBC_2.3.2.
7591
7592 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7593
7594         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7595         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7596         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7597         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7598         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7599         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7600
7601         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7602
7603         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7604         _POSIX_THREAD_PRIORITY_SCHEDULING.
7605         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7606
7607 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7608
7609         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7610         nested function, use static inline function from libio.h.
7611         Code by Richard Henderson.
7612
7613         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7614         weak.
7615
7616 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7617
7618         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7619         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7620         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7621         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7622         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7623         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7624         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7625         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7626         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7627         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7628         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7629         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7630         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7631         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7632         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7633         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7634         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7635         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7636         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7637         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7638         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7639         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7640         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7641         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7642         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7643         * sysdeps/sparc/tls.h: New file.
7644         * sysdeps/sparc/tcb-offsets.sym: New file.
7645         * sysdeps/sparc/Makefile: New file.
7646         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7647         * init.c [__sparc__] (__NR_set_tid_address): Define.
7648
7649 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7650
7651         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7652         _IO_release_lock): Define.
7653
7654 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7655
7656         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7657         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7658
7659 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7660
7661         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7662         (__pthread_cleanup_class): Add missing return types of member
7663         functions.
7664
7665 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7666
7667         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7668         (lll_mutex_unlock_force): Add memory barrier between store and futex
7669         syscall.
7670
7671 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7672
7673         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7674         tempmsg in first loop.
7675
7676 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7677
7678         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7679         _POSIX_THREAD_PRIORITY_SCHEDULING.
7680         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7681
7682 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7683
7684         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7685         (__rtld_lock_default_lock_recursive,
7686         __rtld_lock_default_unlock_recursive): Define.
7687         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7688         __rtld_lock_unlock_recursive): Define using
7689         GL(_dl_rtld_*lock_recursive).
7690         * init.c (__pthread_initialize_minimal_internal): Initialize
7691         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7692         Lock GL(_dl_load_lock) the same number of times as
7693         GL(_dl_load_lock) using non-mt implementation was nested.
7694
7695         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7696         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7697
7698 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7699
7700         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7701         PIPE_BUF.
7702
7703 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7704
7705         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7706
7707 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7708
7709         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7710         to first syscall error check.  Move syscall error check for tkill
7711         into __ASSUME_CLONE_STOPPED #ifdef.
7712
7713 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7714
7715         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7716         is not defined, do explicit synchronization.
7717         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7718         is not defined also unlock pd->lock for non-debugging case in case
7719         it is necessary.
7720         * pthread_create.c (start_thread): Always get and release pd->lock
7721         if __ASSUME_CLONE_STOPPED is not defined.
7722         (start_thread_debug): Removed.  Adjust users.
7723         * allocatestack.c (allocate_stack): Always initialize lock if
7724         __ASSUME_CLONE_STOPPED is not defined.
7725         * Makefile (tests): Add tst-sched1.
7726         * tst-sched1.c: New file.
7727
7728         * sysdeps/pthread/createthread.c (do_clone): Only use
7729         sched_setschduler and pass correct parameters.
7730
7731 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7732
7733         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7734         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7735         PTHREAD_STACK_MIN in comments.
7736
7737 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7738
7739         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7740         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7741         argument.
7742         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7743         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7744         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7745         (__pthread_cleanup_upto): Fix prototype.
7746         (_longjmp_unwind): Adjust caller.
7747         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7748         Change second argument to const struct pointer.
7749         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7750         * tst-sem9.c (main): Likewise.
7751         * unwind.c: Include string.h for strlen prototype.
7752
7753 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7754
7755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7756         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7757         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7758         Define HAVE_CMOV.
7759         Patch by Nicholas Miell <nmiell@attbi.com>.
7760
7761 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7762
7763         * init.c (__pthread_initialize_minimal_internal): Initialize
7764         GL(dl_init_static_tls).
7765         * pthreadP.h (__pthread_init_static_tls): New prototype.
7766         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7767         New functions.
7768         * Makefile (tests): Add tst-tls4.
7769         (modules-names): Add tst-tls4moda and tst-tls4modb.
7770         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7771         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7772         tst-tls4modb.so.
7773         * tst-tls4.c: New file.
7774         * tst-tls4moda.c: New file.
7775         * tst-tls4modb.c: New file.
7776
7777 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7778
7779         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7780         before __timer_dealloc.
7781         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7782         Don't call list_unlink.
7783
7784 2003-07-29  Roland McGrath  <roland@redhat.com>
7785
7786         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7787
7788 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7789
7790         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7791         Don't reuse struct aiocb A if it failed.
7792         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7793         not just one byte, as that does not block.
7794
7795 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7796
7797         * sysdeps/pthread/unwind-resume.c: New file.
7798         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7799         unwind-resume in csu subdir.
7800         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7801         exceptions.
7802         (librt-sysdep_routines, librt-shared-only-routines): Add
7803         rt-unwind-resume.
7804         * sysdeps/pthread/rt-unwind-resume.c: New file.
7805         * unwind-forcedunwind.c: New file.
7806         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7807         (libpthread-shared-only-routines): Likewise.
7808         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7809         * pthreadP.h (pthread_cancel_init): New prototype.
7810         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7811
7812         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7813         attr argument const struct pthread_attr *.
7814
7815         * res.c (__res_state): Return __resp.
7816         * descr.h: Include resolv.h.
7817         (struct pthread): Add res field.
7818         * pthread_create.c: Include resolv.h.
7819         (start_thread): Initialize __resp.
7820         * Makefile (tests): Add tst-_res1.
7821         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7822         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7823         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7824         libpthread.
7825         * tst-_res1.c: New file.
7826         * tst-_res1mod1.c: New file.
7827         * tst-_res1mod2.c: New file.
7828
7829 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7830
7831         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7832
7833         * Makefile: Define various *-no-z-defs variables for test DSOs
7834         which has undefined symbols.
7835
7836 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7837
7838         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7839         Retry if the stwcx fails to store once_control.
7840
7841 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7842
7843         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7844         pthread_attr_setaffinity.
7845         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7846         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7847         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7848         * pthread_attr_destroy.c: Free cpuset element if allocated.
7849         * pthread_create.c: Pass iattr as additional parameter to
7850         create_thread.
7851         * sysdeps/pthread/createthread.c: If attribute is provided and
7852         a new thread is created with affinity set or scheduling parameters,
7853         start thread with CLONE_STOPPED.
7854         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7855         pthread_attr_setaffinity.
7856         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7857         cpuset element.
7858
7859 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7860
7861         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7862
7863 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7864
7865         * sysdeps/pthread/configure.in: Require CFI directives also for
7866         ppc and s390.
7867
7868 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7869
7870         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7871         Add cfi directives.
7872
7873 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7874
7875         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7876         CLEANUP_JMP_BUF.
7877         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7878         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7879         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7880         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7881         not self pointer in __writer.  Compare with TID to determine
7882         deadlocks.
7883         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7884         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7885         Likewise.
7886         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7887         Likewise.
7888         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7889         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7890         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7891         macros also when compiling librt.
7892
7893 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7894
7895         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7896         -fasynchronous-unwind-tables.
7897         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7898         (PSEUDO): Add cfi directives.
7899         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7900         Likewise.
7901         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7902         Likewise.
7903
7904 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7905
7906         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7907         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7908         * unwind.c (__pthread_unwind_next): Add hidden_def.
7909         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7910         Likewise.
7911         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7912         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7913         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7914         Likewise.
7915         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7916         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7917         Likewise.
7918         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7919         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7920         __pthread_unregister_cancel and __pthread_unwind_next.
7921
7922 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7923
7924         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7925         different symbol for the cancellation syscall wrapper and
7926         non-cancellation syscall wrapper.
7927         (PSEUDO_END): Define.
7928
7929 2003-07-05  Richard Henderson  <rth@redhat.com>
7930
7931         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7932         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7933         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7934         return actual return value from the syscall, not 0.
7935
7936 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7937
7938         * descr.h (struct pthread): Add pid field.
7939         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7940         (__reclaim_stacks): Likewise.
7941         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7942         also check for PID of the signal source.
7943         (__pthread_initialize_minimal_internal): Also initialize pid field
7944         of initial thread's descriptor.
7945         * pthread_cancel.c: Use tgkill instead of tkill if possible.
7946         * sysdeps/unix/sysv/linux/fork.c: Likewise.
7947         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7948         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7949         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7950
7951 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
7952
7953         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7954         Fix use of parameter.
7955         (__libc_cleanup_pop): Likewise.
7956
7957 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
7958
7959         * init.c (sigcancel_handler): Change parameters to match handler
7960         for SA_SIGACTION.  Check signal number and code to recognize
7961         invalid invocations.
7962
7963 2003-07-03  Roland McGrath  <roland@redhat.com>
7964
7965         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7966         Apply sizeof (struct pthread) bias to r13 value.
7967
7968 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
7969
7970         * sysdeps/pthread/configure.in: Require CFI directives.
7971
7972         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7973         definition.
7974         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7975         libpthread compilation.
7976         * unwind.c (__pthread_unwind): Add hidden_def.
7977         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7978
7979 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7980
7981         * libc-cancellation.c (__libc_cleanup_routine): Define.
7982         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7983         (__pthread_cleanup_pop): Define.
7984
7985 2003-07-01  Richard Henderson  <rth@redhat.com>
7986
7987         * sysdeps/alpha/elf/pt-initfini.c: New file.
7988         * sysdeps/alpha/pthread_spin_lock.S: New file.
7989         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7990         * sysdeps/alpha/pthreaddef.h: New file.
7991         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7992         * sysdeps/alpha/tls.h: New file.
7993         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7994         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7995         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7996         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7997         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7998         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7999         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8000         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8001         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8002         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8003
8004 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8005
8006         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8007         cleanup support and unwind info.
8008
8009 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8010
8011         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8012         Use correct cleanup handler registration.  Add unwind info.
8013         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8014         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8015         * tst-once3.c: Add cleanup handler and check it is called.
8016         * tst-once4.c: Likewise.
8017         * tst-oncex3.c: New file.
8018         * tst-oncex4.c: New file.
8019         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8020
8021 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8022
8023         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8024
8025 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8026
8027         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8028         (tf_msgsnd): Likewise.
8029
8030         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8031         premature returns a bit more.
8032
8033 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8034
8035         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8036         definition to the front.
8037
8038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8039         the cleanup functions to make the names unique.  Fix dwarf opcode
8040         un unwind table.
8041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8042         functions to make the names unique.  Fix CFA offset for two blocks.
8043
8044 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8045
8046         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8047         missing closing braces.
8048         Patch by Christophe Saout <christophe@saout.de>.
8049
8050 2003-06-24  Roland McGrath  <roland@redhat.com>
8051
8052         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8053
8054 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8055
8056         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8057         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8058
8059         * pthreadP.h: Declare __find_thread_by_id.
8060         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8061         * pthread_clock_gettime.c: Allow using other thread's clock.
8062         * pthread_clock_settime.c: Likewise.
8063         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8064         * Makefile: Add rules to build and run tst-clock2.
8065         * tst-clock2.c: New file.
8066
8067 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8068
8069         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8070         to use exception-based cleanup handler.
8071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8072
8073         * tst-cond8.c (ch): Announce that we are done.
8074
8075         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8076
8077         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8078         Also test aio_suspend with timeout value.
8079
8080 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8081
8082         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8083         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8084         attribute_hidden.
8085
8086         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8087         (__pthread_mutex_lock_internal): Likewise.
8088         (__pthread_mutex_unlock_internal): Likewise.
8089         (__pthread_mutex_unlock_usercnt): Declare.
8090         * pthread_mutex_destroy.c: Always fail if used in any way.
8091         * pthread_mutex_init.c: Update comment.
8092         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8093         * pthread_mutex_timedlock.c: Adjust __nusers.
8094         * pthread_mutex_trylock.c: Adjust __nusers.
8095         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8096         and public interfaces are wrapper with pass additional parameter.
8097         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8098         parameter zero.
8099         * tst-mutex8.c: New file.
8100         * Makefile (tests): Add tst-mutex8.
8101         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8102         __pthread_mutex_unlock_usercnt.
8103         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8108         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8109         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8110         Add __nusers.
8111         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8112         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8113         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8114         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8115         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8116
8117         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8118         * pthread_mutex_timedlock.c: Likewise.
8119         * pthread_mutex_trylock.c: Adjust __nusers.
8120         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8121         * tst-mutex9.c: New file.
8122         * Makefile (tests): Add tst-mutex9.
8123         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8124         * sysdeps/ia64/tls.h: Likewise.
8125         * sysdeps/powerpc/tls.h: Likewise.
8126         * sysdeps/s390/tls.h: Likewise.
8127         * sysdeps/sh/tls.h: Likewise.
8128         * sysdeps/x86_64/tls.h: Likewise.
8129         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8130         Change type of __owner.
8131         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8132         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8133         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8134         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8135         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8136
8137 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8138
8139         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8140         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8141
8142         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8143         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8144         instead of nr to lll_futex_wake.  Only set errno and return -1
8145         if err < 0.
8146
8147         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8148         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8149         return actual return value from the syscall, not 0.
8150
8151 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8152
8153         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8154         find a random value.
8155         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8156         errno==EIDRM.
8157
8158         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8159         compat_timer_settime.
8160         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8161         compat_timer_gettime.
8162         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8163         compat_timer_getoverrun.
8164         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8165         compat_timer_delete.
8166
8167         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8168         error-checking mutex detect busy mutexes.
8169
8170 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8171
8172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8173         Add ax to clobber list.
8174         (lll_mutex_cond_lock): Likewise.
8175         (lll_mutex_unlock): Likewise.
8176         (lll_lock): Likewise.
8177         (lll_unlock): Likewise.
8178
8179         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8180         * tst-cancel18.c: New file.
8181         * tst-cancelx18.c: New file.
8182
8183         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8184         and tcdrain.
8185
8186         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8187         * tst-cancel17.c: New file.
8188         * tst-cancelx17.c: New file.
8189
8190         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8191         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8192         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8193
8194         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8195
8196 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8197
8198         * sysdeps/pthread/createthread.c (create_thread): Set
8199         header.multiple_threads unconditionally.
8200         * allocatestack.c (allocate_stack): Likewise.
8201         * descr.h (struct pthread): Add header.multiple_threads
8202         unconditionally.
8203         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8204         Define for librt.  #error if neither libpthread, libc nor librt.
8205         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8206         Likewise.
8207         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8208         CDISABLE): Likewise.
8209         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8210         CDISABLE): Likewise.
8211         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8212         CDISABLE): Likewise.
8213         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8214         CDISABLE): Likewise.  Access header.multiple_threads outside of
8215         libc and libpthread.
8216         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8217         Likewise.
8218         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8219         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8220
8221 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8222
8223         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8224         Also test early cancellation before the thread reaches the cancellation
8225         point.
8226
8227         * Makefile: Compile forward.c with exceptions.
8228
8229         * sysdeps/unix/sysv/linux/sleep.c: New file.
8230
8231 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8232
8233         * Makefile: Add CFLAGS definition to compile function wrappers
8234         duplicated from libc with exceptions.
8235         * tst-cancel4.c: Also check cancellation handlers.
8236
8237         * Makefile: Add rules to build and run tst-cancel16 and
8238         tst-cancelx16.  Add missing CFLAGS definitions.
8239         * tst-cancel16.c: New file.
8240         * tst-cancelx16.c: New file.
8241
8242 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8243
8244         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8245         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8246         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8247         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8248
8249         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8250         (LIBC_CANCEL_RESET): Likewise.
8251         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8252         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8253         librt-cancellation.
8254         (CFLAGS-libcrt-cancellation.c): Define.
8255         * sysdeps/pthread/librt-cancellation.c: New file.
8256         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8257         macros also when compiling librt.
8258         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8259         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8260         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8261         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8262         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8263         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8264         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8265
8266         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8267         compat_timer_create.
8268
8269 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8270
8271         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8272
8273         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8274         __register_atfork.
8275         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8276         Add libc_hidden_def.
8277
8278 2003-06-13  Roland McGrath  <roland@redhat.com>
8279
8280         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8281         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8282
8283 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8284
8285         * allocatestack.c (queue_stack): Always inline.
8286         * ptreadhP.h (__do_cancel): Likewise.
8287
8288 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8289
8290         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8291         a typo.
8292
8293 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8294
8295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8296         (__pthread_cond_signal): Remove incorrect second addition for
8297         cond_lock!=0.
8298
8299 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8300
8301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8302         (__pthread_cond_signal): Use correct futex pointer in
8303         __lll_mutex_lock_wait call.
8304
8305         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8306         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8307
8308 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8309
8310         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8311         cancelable.
8312         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8313         Likewise.
8314
8315         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8316         hand-written CFI generation code.  Since ENTRY/END also initiated
8317         CFI frames this caused two CFI sets to be generated.
8318
8319 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8320
8321         * cleanup_routine.c: New file.
8322         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8323         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8324         cleanup handling.
8325         * Makefile (libpthread-routines): Add cleanup_routine.
8326         Add more CFLAGS variables to compile with exceptions.  Add comments
8327         why which file needs unwind tables.
8328         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8329         tests.
8330         * tst-cancelx1.c: New file.
8331         * tst-cancelx2.c: New file.
8332         * tst-cancelx3.c: New file.
8333         * tst-cancelx4.c: New file.
8334         * tst-cancelx5.c: New file.
8335         * tst-cancelx6.c: New file.
8336         * tst-cancelx7.c: New file.
8337         * tst-cancelx8.c: New file.
8338         * tst-cancelx9.c: New file.
8339         * tst-cancelx10.c: New file.
8340         * tst-cancelx11.c: New file.
8341         * tst-cancelx12.c: New file.
8342         * tst-cancelx13.c: New file.
8343         * tst-cancelx14.c: New file.
8344         * tst-cancelx15.c: New file.
8345         * tst-cleanupx0.c: New file.
8346         * tst-cleanupx0.expect: New file.
8347         * tst-cleanupx1.c: New file.
8348         * tst-cleanupx2.c: New file.
8349         * tst-cleanupx3.c: New file.
8350
8351         * tst-cleanup0.c: Make standard compliant.
8352         * tst-cleanup1.c: Likewise.
8353
8354         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8355         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8356         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8357         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8358         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8359         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8360         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8361         CLEANUP_JMP_BUF.
8362         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8363         * tst-cancel12.c: New file.
8364         * tst-cancel13.c: New file.
8365         * tst-cancel14.c: New file.
8366         * tst-cancel15.c: New file.
8367         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8368         and tst-cancel15.
8369
8370         * tst-cancel1.c: Add some comments.
8371
8372         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8373         timeout correctly.
8374
8375 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8376
8377         * Makefile (CFLAGS-pthread_cancel.c): Define.
8378
8379 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8380
8381         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8382         Change type of __writer element to int.
8383         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8384         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8385         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8386         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8387         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8388         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8389         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8390         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8391         Compare with TID to determine deadlocks.
8392         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8393         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8394         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8395         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8396         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8397         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8398         Likewise.
8399         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8400         Likewise.
8401         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8402         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8403         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8404         Likewise.
8405         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8406         Likewise.
8407         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8408         * Makefile (tests): Add tst-rwlock12.
8409         * tst-rwlock12.c: New file.
8410
8411 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8412
8413         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8414         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8415         Remove bogus hidden_proto.
8416         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8417         Likewise.
8418         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8419         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8420         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8421         ___lll_mutex_timedlock): Likewise.
8422
8423 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8424
8425         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8426         (__pthread_cond_signal): Add some code to eventually handle
8427         cond_lock!=0.
8428
8429 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8430
8431         * Makefile (tests): Add tst-exec4.
8432         (tst-exec4-ARGS): Define.
8433         * tst-exec4.c: New file.
8434
8435 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8436
8437         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8438         Also fail if tv_nsec < 0.
8439         (__lll_timedwait_tid): Likewise.
8440         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8441         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8442         Likewise.
8443         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8444         Likewise.
8445         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8446         Likewise.
8447         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8448         Likewise.
8449         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8450         Likewise.
8451         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8452         Likewise.
8453
8454         * Makefile (tests): Add tst-sem8 and tst-sem9.
8455         * tst-sem8.c: New file.
8456         * tst-sem9.c: New file.
8457         * sem_open.c: Fix creation of in_use record if the file exists but
8458         no internal record.
8459
8460         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8461         definitions.
8462
8463         * sysdeps/pthread/timer_create.c (timer_create): In case
8464         evp==NULL, assign timer ID to sival_ptr.
8465
8466         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8467         struct pthread_unwind_buf *.
8468         (struct pthread): Likewise for cleanup_jmp_buf element.
8469
8470         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8471         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8472         * unwind.c (__pthread_unwind_next): Likewise.
8473
8474 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8475
8476         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8477         (lll_futex_timed_wait): Use int for futex value parameter.
8478         (lll_futex_wake): Likewise.
8479         (lll_futex_requeue): Likewise.
8480
8481         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8482         Replace one memory operation with one register operation.
8483
8484         * tst-join4.c (do_test): Fix error message.
8485
8486         * tst-rwlock6.c (do_test): Use correct format specifier.
8487
8488         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8489         (__lll_mutex_lock_wait): Replace one memory operation with one
8490         register operation.
8491         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8492         (__lll_mutex_lock_wait): Likewise.
8493
8494         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8495         (__lll_mutex_cond_lock): Add one to value parameter of
8496         __lll_lock_wait to reflect reality in the futex syscall.
8497         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8498         (lll_mutex_cond_lock): Likewise.
8499
8500 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8501
8502         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8503         New function.
8504         (lll_mutex_cond_lock): Define.
8505
8506 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8507
8508         * Makefile (tests): Add tst-signal6.
8509         * tst-signal6.c: New file.
8510
8511         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8512         (__lll_mutex_unlock_force): New function
8513         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8514
8515         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8516         (__lll_mutex_unlock_force): New function.
8517         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8518
8519         * tst-rwlock7.c (do_test): Use correct format specifier.
8520
8521         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8522         Find break parameter in correct asm argument.
8523
8524 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8525
8526         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8527         Remove out4.
8528         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8529         error occured.
8530         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8531         Add __mutex.
8532         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8533         lll_futex_requeue, lll_mutex_unlock_force): Define.
8534
8535 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8536
8537         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8538         (pthread_cond_t): Add __mutex.
8539         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8540         lll_futex_requeue, lll_mutex_unlock_force): Define.
8541
8542 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8543
8544         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8545         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8546         Add __mutex field.
8547         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8548         Define.
8549         (lll_futex_wait, lll_futex_wake): Define.
8550         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8551         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8552         FUTEX_REQUEUE instead of FUTEX_WAIT.
8553         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8554         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8555         mutex which was used in condvar structure.  Call
8556         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8557         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8558
8559         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8560         include tcb-offsets.h.  Read wakeup value in locked region.
8561         Use the value of gbr register as THREAD_ID.
8562         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8564         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8565
8566         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8567         macros.
8568
8569 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8570
8571         * sysdeps/pthread/pthread_cond_broadcast.c
8572         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8573
8574 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8575
8576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8577         typo in register name.
8578         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8579         correctly.  Actually use requeue.  Little optimization.
8580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8581         mutex address early.  Handle cancellation state as 32-bit value.
8582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8583         Remove unnecessary label.
8584
8585 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8586
8587         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8588         instead of FUTEX_WAIT.
8589         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8594         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8595         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8596         of __pthread_mutex_lock_internal.
8597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8599         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8600         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8603         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8604         Add pthread_mutex_cond_lock.
8605         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8606         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8607         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8608         lll_mutex_cond_lock.
8609         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8610         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8611         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8612         Add __mutex field.
8613         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8614         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8615
8616         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8617         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8618
8619         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8620         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8621         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8622         macro don't define aliases.
8623
8624         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8625         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8626         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8627         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8628         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8630         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8633
8634 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8635
8636         * sem_open.c: Fix one endless loop.  Implement correct semantics
8637         wrt opening the same semaphore more then once.
8638         * sem_close.c: Adjust for sem_open change.
8639         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8640         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8641         * Makefile (tests): Add tst-sem7.
8642         * tst-sem7.c: New file.
8643
8644 2003-05-16  Roland McGrath  <roland@redhat.com>
8645
8646         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8647         uninitialized variable braino.
8648
8649 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8650
8651         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8652         test for syscall availability.
8653
8654         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8655         __no_posix_timers to -1 if the syscalls don't exist.
8656
8657         * pthread_join.c (pthread_join): Set tid field of the joined
8658         thread to -1.  This isn't necessary but helps to recognize some
8659         error conditions with almost no cost.
8660
8661         * allocatestack.c (FREE_P): Also negative values indicate an
8662         unused stack.
8663
8664         * unwind.c: Include <unistd.h>.
8665
8666 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8667
8668         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8669
8670 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8671
8672         * Makefile (crti-objs, crtn-objs): New variables.
8673         (omit-deps, extra-objs): Add crtn.
8674         ($(objpfx)libpthread.so): Depend on both crti and crtn
8675         and links to them in multidir.
8676         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8677
8678 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8679
8680         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8681         (lll_mutex_unlock): Use atomic_exchange_rel.
8682
8683 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8684
8685         * cond-perf.c (cons): Add missing locking around setting of alldone.
8686
8687 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8688
8689         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8690         related macros.
8691         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8692
8693 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8694
8695         * tst-sem6.c: New file.
8696         * Makefile (tests): Add tst-sem6.
8697
8698         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8699         Use atomic_exchange_rel instead of atomic_exchange.
8700         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8701         Likewise.
8702
8703         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8704         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8705         vsyscall is possible.
8706
8707         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8708         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8709         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8710         pthread_setaffinity_np.
8711         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8712         and pthread_setaffinity_np.
8713         * Makefile (libpthread-routines): Add pthread_getaffinity and
8714         pthread_setaffinity.
8715
8716         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8717         use it in case mmap to allocate the stack fails.
8718         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8719         ARCH_MAP_FLAGS here.
8720         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8721         ARCH_RETRY_MMAP.
8722
8723 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8724
8725         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8726         handler implementation.  It is now lockless in fork().
8727         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8728         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8729         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8730         declare the __fork_*_lists.
8731         (struct fork_handler): Include pointers to all three functions.
8732         Add next, refcntr and need_signal elements.
8733         (__fork_handlers): New declaration.
8734         (__register_atfork_malloc): Remove declaration.
8735         (HAVE_register_atfork_malloc): Remove definition.
8736         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8737         __pthread_child_handler variable.
8738         (__libc_pthread_init): Use __register_atfork instead of explicitly
8739         adding to the list.
8740         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8741         and lll_futex_wake.
8742         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8743
8744         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8745         function must never be reached.
8746
8747         * cond-perf.c: New file.
8748
8749 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8750
8751         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8752
8753 2003-05-04  Roland McGrath  <roland@redhat.com>
8754
8755         * Makefile ($(objpfx)../libc.so): New target.
8756
8757 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8758
8759         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8760         (pthread_condattr_t): Size is only an int, don't use long for
8761         alignment.
8762         (pthread_mutexattr_t): Likewise.
8763         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8764         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8765         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8766
8767 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8768
8769         * sysdeps/i386/tls.h: Define THREAD_ID.
8770         * sysdeps/ia64/tls.h: Likewise.
8771         * sysdeps/powerpc/tls.h: Likewise.
8772         * sysdeps/s390/tls.h: Likewise.
8773         * sysdeps/sh/tls.h: Likewise.
8774         * sysdeps/x86_64/tls.h: Likewise.
8775         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8776         record ownership.
8777         * pthread_mutex_timedlock.c: Likewise.
8778         * pthread_mutex_trylock.c: Likewise.
8779         * pthread_mutex_unlock.c: Likewise.
8780         * pthread_rwlock_trywrlock.c: Likewise.
8781         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8782         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8783         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8784         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8785
8786         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8787         flag.
8788
8789 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8790
8791         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8792         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8793         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8794         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8795         Make __align long long instead of long.
8796         (pthread_rwlock_t): Formatting.
8797         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8798         (pthread_rwlock_t): Formatting.
8799         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8800         (pthread_cond_t): Make __align long long instead of long.
8801         (pthread_rwlock_t): Move __flags field to the same position as in
8802         linuxthreads.
8803
8804 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8805
8806         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8807         * tst-rwlock7.c (do_test): Likewise.
8808
8809 2003-04-26  Roland McGrath  <roland@redhat.com>
8810
8811         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8812
8813 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8814
8815         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8816         sizeof (struct pthread).
8817         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8818         1 struct pthread.
8819         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8820         to 0.
8821         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8822         struct pthread.
8823         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8824         to 32-bit bytes.
8825         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8826         tcbp.
8827         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8828         unneccessarily.
8829         (NO_TLS_OFFSET): Define.
8830         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8831         add TLS_TCB_SIZE unnecessarily.
8832
8833 2003-04-22  Roland McGrath  <roland@redhat.com>
8834
8835         * Makeconfig (shared-thread-library): Reverse link order to work
8836         around linker bug.
8837
8838 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8839
8840         * semaphore.h: Fix typo in comment.
8841
8842 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8843
8844         * sysdeps/pthread/sigfillset.c: New file.
8845
8846         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8847         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8848         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8849         * sysdeps/pthread/sigaction.c: Likewise.
8850         * sysdeps/pthread/sigprocmask.c: New file.
8851         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8852         __SIGRTMIN+1.
8853         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8854         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8855         in this case.
8856
8857 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8858
8859         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8860         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8861
8862         * sysdeps/unix/sysv/linux/unregister-atfork.c
8863         (__unregister_atfork): Don't free memory not allocated dynamically.
8864
8865         * semaphore.h: Remove __THROW marker from cancellation points.
8866         * nptl/sysdeps/pthread/pthread.h: Likewise.
8867
8868 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8869
8870         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8871         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8872         __THROW.
8873
8874 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8875
8876         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8877
8878 2003-04-15  Roland McGrath  <roland@redhat.com>
8879
8880         * forward.c (__pthread_unwind): Tweak to avoid warning.
8881
8882 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8883
8884         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8885
8886 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8887
8888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8889         overflow CFA advance instructions.
8890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8891
8892 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8893
8894         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8895         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8896         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8897         defined.
8898
8899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8900         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8902         DW_CFA_advance_loc for .Laddl-.Lsubl.
8903
8904 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8905
8906         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8907         position-independent unwind data for static libraries.
8908         Add missing unwind info.  Add comments.
8909
8910         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8911         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8912         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8914
8915 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8916
8917         * Makefile: Make sure all cancellation points are compiled with
8918         exception and asynchronous unwind tables.
8919
8920         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8921         which mishandles loading of global object addresses in PIC.
8922         (THREAD_SETMEM_NC): Likewise.
8923
8924 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8925
8926         * pthread.h: Define new data structure for cleanup buffer.  Declare
8927         new cleanup handler interfaces.
8928         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8929         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8930         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8931         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8932         it.  Declare old cleanup handler installation functions.
8933         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8934         handling.
8935         * cleanup_defer.c: Likewise.
8936         * cleanup_compat.c: New file.  Old cleanup code.
8937         * cleanup_def_compat.c: New file.  Old cleanup code.
8938         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8939         if own thread descriptor.
8940         * unwind.c: New file.
8941         * forward.c: Add __pthread_unwind.
8942         * init.c (pthread_functions): Add __pthread_unwind.
8943         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8944         Add ptr___pthread_unwind.
8945         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8946         and unwind function.
8947         * Makefile (libpthread-routines): Add cleanup_compat,
8948         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
8949         table generation if necessary.
8950         * version.c: Record whether unwind support is compiled in.
8951         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8952         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8953         handler interfaces.
8954         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8955         complication to generate unwind information for syscall wrappers.
8956         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8957         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8958         __cleanup_fct_attribute.
8959
8960         * Makefile: Add rules to build and run tst-cleanup0.
8961         * tst-cleanup0.c: New file.
8962         * tst-cleanup0.expect: New file.
8963
8964         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
8965         caller.  Optimize to avoid often unecessary local variable.
8966
8967 2003-04-11  Roland McGrath  <roland@redhat.com>
8968
8969         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8970         sets variable `multidir'; include that.
8971         (generated): Add it.
8972         ($(objpfx)$(multidir)/crti.o): New target.
8973         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8974
8975 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8976
8977         * tst-attr2.c (do_test): Add cast to avoid warning.
8978         * tst-mutex4.c (do_test): Likewise.
8979
8980 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
8981
8982         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8983         in child.
8984
8985 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8986
8987         * Makefile (tests): Add tst-detach1.
8988         * tst-detach1.c: New file.
8989
8990 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8991
8992         * sysdeps/pthread/pthread.h: Remove duplicate
8993         pthread_cleanup_{push,pop} definitions.
8994
8995         * tst-barrier2.c: Eliminate warnings.
8996         * tst-cancel4.c: Likewise.
8997         * tst-cond4.c: Likewise.
8998         * tst-cond6.c: Likewise.
8999         * tst-detach1.c: Likewise.
9000         * tst-rwlock4.c: Likewise.
9001         * tst-rwlock6.c: Likewise.
9002         * tst-rwlock7.c: Likewise.
9003         * tst-sem3.c: Likewise.
9004         * tst-spin2.c: Likewise.
9005         * tst-umask1.c: Likewise.
9006
9007 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9008
9009         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9010
9011 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9012
9013         * descr.h (struct pthread): Move cancelhandling member to the front.
9014
9015 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9016
9017         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9018         malloc_parent, and malloc_child statically.
9019         (__register_atfork_malloc): New function.
9020         (free_mem): Don't free any of the malloc_* variables on the list.
9021         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9022         Define HAVE_register_atfork_malloc.
9023
9024 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9025
9026         * sysdeps/pthread/createthread.c (create_thread): Add some more
9027         comments explaining when to set multiple_threads and when not.
9028
9029         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9030         THREAD_ATOMIC_BIT_SET if not already defined.
9031         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9032         THREAD_ATOMIC_BIT_SET:
9033         * sysdeps/x86_64/tls.h: Likewise.
9034         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9035         THREAD_ATOMIC_CMPXCHG_VAL.
9036         (_pthread_cleanup_pop_restore): Likewise.
9037         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9038         (__pthread_enable_asynccancel_2): Likewise.
9039         (__pthread_disable_asynccancel): Likewise.
9040         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9041         (__libc_disable_asynccancel): Likewise.
9042         * init.c (sigcancel_handler): Likewise.
9043         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9044         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9045
9046 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9047
9048         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9049         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9050         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9051         * Makefile (tests): Add tst-cancel11.
9052         * tst-cancel11.c: New file.
9053
9054 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9055
9056         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9057         round, not the first.  Use specific_used flag instead of local
9058         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9059         (__free_tcb): Don't call deallocate_tsd here.
9060         (start_thread): Call deallocate_tsd here.
9061         * pthread_setspecific.c: Set specific_used flag really only when
9062         needed.
9063         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9064         * tst-tsd3.c: New file.
9065         * tst-tsd4.c: New file.
9066
9067 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9068
9069         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9070         Use atomic_exchange_and_add instead of __lll_add.
9071         (__lll_mutex_timedlock): Likewise.
9072         Patch by Ian Wienand.
9073
9074 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9075
9076         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9077         (SINGLE_THREAD_P): Fix typo.
9078         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9079
9080 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9081
9082         * Makefile (tests): Add tst-align.
9083         * tst-align.c: New file.
9084         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9085
9086         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9087         function correctly.
9088
9089         * tst-tsd2.c: Add casts to avoid warnings.
9090
9091 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9092
9093         * descr.h (struct pthread): Move most often used elements to the front.
9094
9095 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9096
9097         * Makefile (libpthread-routines): Add pthread_atfork.
9098         (libpthread-static-only-routines): Add pthread_atfork.
9099
9100 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9101
9102         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9103         of TLS_DTV_AT_TP.
9104         (INSTALL_DTV): Add parens.
9105         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9106         Use passed descr instead of THREAD_SELF.
9107         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9108         (__lll_mutex_timedlock_wait): Correct expected value after
9109         spurious wakeup.
9110         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9111         Release lock before waking up the waiters.
9112         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9113         criteria.  Reorderstruct passed to cleanup handler.  Fix
9114         handling of cancellation and failung pthread_mutex_unlock call.
9115         Use __pthread_enable_asynccancel_2 instead of
9116         __pthread_enable_asynccancel.
9117         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9118         Return result of lock re-get if it fails.
9119         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9120         for __pthread_cleanup_push.
9121         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9122         completely broken rwlock implementation.
9123         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9124         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9125         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9126         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9127         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9128         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9129         versioned_symbol macro.
9130         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9131         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9132
9133 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9134
9135         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9136         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9137         and __helper_tid.
9138         (struct timer): Remove th and bar field.
9139         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9140         debugging code.  Create only one helper thread.
9141         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9142         helper thread.
9143         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9144         Renamed.  Define statically.  Use thread info from siginfo.
9145         (__helper_once): New variable.
9146         (__helper_tid): New variable.
9147         (__reset_helper_control): New function.
9148         (__start_helper_thread): New function.
9149
9150         * pthread_create.c (start_thread): Don't use setjmp inside
9151         __builtin_expect to work around gcc bug.
9152
9153         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9154         timer_delete syscall fails, but not with ENOSYS, set
9155         __no_posix_timers.
9156
9157         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9158         (timer_settime): Fix typo.
9159         * sysdeps/unix/sysv/linux/timer_getoverr.c
9160         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9161
9162 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9163
9164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9165         offset of cleanupbuf.__prev.
9166
9167 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9168
9169         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9170         of included file.
9171
9172 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9173
9174         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9175         NULL provide default definition to syscall.
9176
9177 2003-03-25  Roland McGrath  <roland@redhat.com>
9178
9179         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9180         (timer_id2ptr): Fix typo.
9181
9182 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9183
9184         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9185         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9186         * sysdeps/ia64/pthreaddef.h: Likewise.
9187         * sysdeps/powerpc/pthreaddef.h: Likewise.
9188         * sysdeps/s390/pthreaddef.h: Likewise.
9189         * sysdeps/sh/pthreaddef.h: Likewise.
9190         * sysdeps/x86_64/pthreaddef.h: Likewise.
9191         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9192         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9193         being changed.
9194         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9195         SIGTIMER is not unblocked.
9196         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9197         RT signal taken.
9198         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9199         be send.
9200         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9201         pass pointer through as ID.
9202         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9203         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9204         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9205         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9206         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9207         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9208         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9209         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9210         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9211         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9212         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9213         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9214         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9215         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9216         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9217         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9218         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9219         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9220         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9221         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9222         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9223         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9224         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9225         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9226         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9227         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9228         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9229         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9230         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9231         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9232         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9233         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9234         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9235
9236         * pthreadP.h: Remove FRAME_LEFT definition.
9237         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9238         already left frame.  Programs which have this problem are not POSIX
9239         compliant.
9240         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9241
9242 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9243
9244         * sysdeps/pthread/tst-timer.c: Check return values of the
9245         functions we test.
9246
9247 2003-03-23  Roland McGrath  <roland@redhat.com>
9248
9249         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9250         * tst-tls3mod.c: Likewise.
9251         * tst-tls1.c: Likewise.
9252         * tst-tls2.c: Likewise.
9253
9254         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9255         undefined behavior.
9256
9257         * tst-join5.c (tf1, tf2): Add a cast.
9258
9259         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9260
9261         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9262         Don't test anything.
9263         * tst-cond4.c: Likewise.
9264         * tst-cond6.c: Likewise.
9265         * tst-flock2.c: Likewise.
9266         * tst-mutex4.c: Likewise.
9267         * tst-rwlock4.c: Likewise.
9268         * tst-signal1.c: Likewise.
9269         * tst-spin2.c: Likewise.
9270         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9271
9272         * tst-mutex4.c: Use test-skeleton.c.
9273         * tst-spin2.c: Likewise.
9274         * tst-sysconf.c: Likewise.
9275         * tst-barrier2.c: Likewise.
9276         * tst-cond4.c: Likewise.
9277         * tst-cond6.c: Likewise.
9278         * tst-rwlock4.c: Likewise.
9279         * tst-unload.c: Likewise.
9280         * tst-flock2.c (do_test): Use return instead of exit.
9281
9282 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9283
9284         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9285
9286 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9287
9288         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9289         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9290         instead of __lll_compare_and_swap.
9291         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9292         Likewise.
9293         Removed definition if __lll_compare_and_swap.
9294
9295         * cancellation.c: Adjust for new form of compare&exchange macros.
9296         * cleanup_defer.c: Likewise.
9297         * init.c: Likewise.
9298         * libc-cancellation.c: Likewise.
9299         * old_pthread_cond_broadcast.c: Likewise.
9300         * old_pthread_cond_signal.c: Likewise.
9301         * old_pthread_cond_timedwait.c: Likewise.
9302         * old_pthread_cond_wait.c: Likewise.
9303         * pthread_cancel.c: Likewise.
9304         * pthread_create.c: Likewise.
9305         * pthread_detach.c: Likewise.
9306         * pthread_join.c: Likewise.
9307         * pthread_key_delete.c: Likewise.
9308         * pthread_setcancelstate.c: Likewise.
9309         * pthread_setcanceltype.c: Likewise.
9310         * pthread_timedjoin.c: Likewise.
9311         * pthread_tryjoin.c: Likewise.
9312         * sysdeps/pthread/createthread.c: Likewise.
9313
9314 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9315
9316         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9317         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9318         definitions.  Replace uses with calls to atomic_* functions.
9319         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9320         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9321         __lll_test_and_set calls with atomic_exchange_and_add and
9322         atomic_exchange calls respectively.
9323         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9324         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9325         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9326         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9327         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9328         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9329         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9330
9331         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9332         returns the old value.
9333
9334 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9335
9336         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9337         int for variable OLDVAL and correct inline assembler contraint.
9338         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9339         type int for variable OLD.
9340
9341         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9342         only for s390-32.
9343         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9344         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9345         instead of multiple_threads field in the TCB.
9346
9347 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9348
9349         * sysdeps/i386/i686/bits/atomic.h: Removed.
9350         * sysdeps/i386/i586/bits/atomic.h: Removed.
9351         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9352         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9353         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9354         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9355         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9356         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9357         * atomic.h: Removed.  Moved to glibc.
9358
9359         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9360         support for clock selection.
9361
9362         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9363         signalling waiters.
9364
9365 2003-03-18  Roland McGrath  <roland@redhat.com>
9366
9367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9368         Add __lll_rel_instr first.  Add memory clobber.
9369         (lll_mutex_unlock): Use __lll_test_and_set.
9370         From Paul Mackerras <paulus@samba.org>.
9371
9372         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9373         unconditionally.
9374         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9375         (SINGLE_THREAD_P):  Add `header.' prefix.
9376         From Paul Mackerras <paulus@samba.org>.
9377
9378         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9379         pthread_timedjoin_np to ...
9380         (libpthread: GLIBC_2.3.3): ... here.
9381         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9382
9383         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9384         Avoid shadowing VAL variable.
9385
9386         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9387         New macro.
9388
9389 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9390
9391         * Makefile (tests): Add tst-cond11.
9392         * tst-cond11.c: New file.
9393
9394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9395         struct passed to cleanup handler to eliminate one more
9396         instruction.
9397         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9398
9399         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9400         (pthrad_cond_t): Replace __unused field with __clock.
9401
9402         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9403         waken all waiters in cleanup handler.
9404         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9406
9407         * pthread_condattr_getclock.c: New file.
9408         * pthread_condattr_setclock.c: New file.
9409         * sysdeps/pthread/pthread.h: Declare these new functions.
9410         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9411         * Makefile (libpthread-routines): Add the new functions.
9412         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9413         Renamed field to value.  Document use of the bits.
9414         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9415         change.
9416         * pthread_condattr_setpshared.c: Likewise.
9417         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9418         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9419         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9420         Add __clock field.
9421         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9422         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9423         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9424         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9425         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9426         Implement clock selection.
9427         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9428         * pthread-errnos.sym: Add ENOSYS.
9429         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9430         _POSIX_CLOCK_SELECTION.
9431         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9432
9433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9434         invalid .size directive.
9435
9436 2003-03-17  Roland McGrath  <roland@redhat.com>
9437
9438         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9439         Formatting tweaks.
9440
9441 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9442
9443         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9444         Use __lll_add instead of spelling it out.  Use protected symbol names.
9445         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9446         Use __lll_add.
9447         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9448         Renamed from lll_compare_and_swap.  Use new name where necessary.
9449         (__lll_add): Defined.
9450         (__lll_dec_if_positive): Defined.
9451         (__lll_test_and_set): Defined.
9452         * sysdeps/ia64/pthread_spin_init.c: Removed.
9453         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9454         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9455         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9456         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9457         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9458         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9459         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9460         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9461         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9462         __sync_lock_release_si.
9463         Patch by Jakub Jelinek.
9464
9465         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9466         Fix timeout handling.
9467         (__lll_timedwait_tid): Likewise.
9468         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9469         Patch by Jakub Jelinek.
9470
9471         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9472
9473 2003-03-17  Roland McGrath  <roland@redhat.com>
9474
9475         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9476         * sysdeps/pthread/pthread_spin_init.c: New file.
9477         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9478         * sysdeps/powerpc/Makefile: New file.
9479         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9480         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9481         * sysdeps/powerpc/pthreaddef.h: New file.
9482         * sysdeps/powerpc/tcb-offsets.sym: New file.
9483         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9484         * sysdeps/powerpc/tls.h: New file.
9485         * sysdeps/powerpc/bits/atomic.h: New file.
9486         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9487         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9488         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9489
9490         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9491         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9492         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9493         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9494         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9495         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9496         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9497         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9498         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9499         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9500         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9501         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9502         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9503         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9504         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9505
9506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9507         not gettimeofday.
9508         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9509         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9510         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9511         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9512         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9513
9514 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9515
9516         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9517         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9518         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9520         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9521
9522 2003-03-16  Roland McGrath  <roland@redhat.com>
9523
9524         * tst-fork4.c: Include <string.h>.
9525         * tst-signal2.c: Likewise.
9526         * tst-mutex5.c (do_test): exit -> return.
9527         * tst-mutex2.c: Include <stdlib.h>.
9528
9529 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9530
9531         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9532         (__lll_mutex_timedlock_wait): Correct expected value after
9533         spurious wakeup.  Otherwise we would never wait again.
9534
9535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9536         zone versus inline asm stupidity.  Use correct instructions.
9537
9538         * tst-rwlock6.c: Add some more status output.
9539
9540 2003-03-15  Roland McGrath  <roland@redhat.com>
9541
9542         * sysdeps/pthread/configure.in: New file.
9543         * sysdeps/pthread/configure: New file (generated).
9544
9545 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9546
9547         * allocatestack.c (allocate_stack): Store the exact stack size of
9548         user allocated stacks.
9549
9550 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9551
9552         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9553         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9554         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9555         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9556         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9557         Use `header.' prefix.
9558         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9559
9560 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9561
9562         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9563         __builtin_frame_address, use stack pointer.
9564
9565         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9566         instead of __builtin_frame_pointer.
9567
9568 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9569
9570         * tst-basic1.c (do_test): Add cast to avoid warning.
9571         * tst-basic2.c (do_test): Likewise.
9572
9573         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9574         amount of stack correction.
9575
9576         * tst-fork4.c: Use test-skeleton.c.
9577
9578 2003-03-14  Roland McGrath  <roland@redhat.com>
9579
9580         * init.c: Fix typo "#eli" for "#else".
9581
9582 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9583
9584         * allocatestack.c (__stack_user): Use hidden_data_def.
9585         * pthread_create.c (__pthread_keys): Likewise.
9586
9587         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9588
9589 2003-03-14  Roland McGrath  <roland@redhat.com>
9590
9591         * tst-fork4.c: New file.
9592         * Makefile (tests): Add it.
9593
9594         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9595         we always define the padding space.
9596         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9597         stopped supporting its own extensions fully.
9598         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9599         struct also called `header', so `header.multiple_threads' is the field
9600         name to use on all machines.
9601         * allocatestack.c (allocate_stack): Use `header.' prefix.
9602         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9603         * pthread_create.c (__pthread_create_2_1): Likewise.
9604         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9605         (THREAD_SELF): Likewise.
9606         * sysdeps/x86_64/tls.h: Likewise.
9607         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9608         (SINGLE_THREAD_P): Likewise.
9609         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9610         (SINGLE_THREAD_P): Likewise.
9611         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9612         (SINGLE_THREAD_P): Likewise.
9613
9614         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9615         value directly.
9616
9617 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9618
9619         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9620         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9621
9622         * pthread_create.c (start_thread): setjmp is expected to return 0.
9623
9624         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9625         (THREAD_GETMEM_NC): Likewise.
9626
9627 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9628
9629         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9630         and the size of the stack which must be allocated is a multiple,
9631         allocate one more page.
9632         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9633         MULTI_PAGE_ALIASING.
9634
9635 2003-03-13  Roland McGrath  <roland@redhat.com>
9636
9637         * pthread_create.c (start_thread): Set EXITING_BIT after the
9638         event-reporting (and destructors), not before.
9639
9640 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9641
9642         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9643         lll_futex_wake): Declare register variables as long int instead of
9644         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9645         Make syscall arguments clobbered by the syscall.
9646         (lll_futex_wait): Define using lll_futex_timed_wait.
9647
9648         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9649         to void *.
9650
9651         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9652         PPID if [! NDEBUG].
9653
9654         * allocatestack.c (nptl_ncreated): Only declare if
9655         COLORING_INCREMENT != 0.
9656
9657         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9658         (__libc_enable_asynccancel_2): Remove prototype.
9659
9660         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9661         ctid to match kernel.
9662
9663 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9664
9665         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9666         libc_multiple_threads.
9667         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9668         __libc_multiple_threads to...
9669         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9670
9671         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9672         versioning.
9673         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9674         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9675
9676         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9677         (__pthread_once_internal): Define.
9678
9679         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9680         macros instead of .symver directly.
9681         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9682         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9683
9684         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9685         * sysdeps/x86_64/tcb-offsets.sym: New file.
9686         * sysdeps/x86_64/Makefile: New file.
9687
9688         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9690         to access own pthread_t in TCB.
9691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9692         Likewise.
9693         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9694         Likewise.
9695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9696
9697 2003-03-12  Roland McGrath  <roland@redhat.com>
9698
9699         * pthread-errnos.sym: New file.
9700         * Makefile (gen-as-const-headers): New variable, list that file.
9701         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9702         header <pthread-errnos.h> instead of defining errno values here.
9703         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9704         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9705         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9706         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9707         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9708         Likewise.
9709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9710         Likewise.
9711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9713         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9714         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9715         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9716         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9717         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9718         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9720         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9721         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9722         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9723         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9724         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9725         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9726         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9727         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9728         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9729         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9730         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9731         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9732         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9733         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9734         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9735         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9736         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9737         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9738
9739         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9740         CLONE_CHILD_SETTID worked.
9741
9742 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9743
9744         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9745         file.
9746         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9747         file.
9748
9749         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9750         (pthread_cond_t): Add padding.
9751
9752         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9753         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9754         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9755
9756         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9757         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9758         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9759         (__pthread_rwlock_timedrdlock): Likewise.
9760         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9761         (__pthread_rwlock_wrlock): Likewise.
9762         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9763         (__pthread_rwlock_rdlock): Likewise.
9764
9765         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9766
9767         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9768         result of lock re-get if it fails.
9769
9770 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9771
9772         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9774         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9775         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9776         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9777         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9778         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9779         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9780         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9781         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9782
9783         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9784         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9785
9786         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9787         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9788         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9789         (create_thread): Likewise.
9790         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9791         * init.c (__pthread_initialize_minimal_internal): Initialize
9792         __libc_multiple_threads_ptr if necessary.
9793         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9794         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9795         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9796         __libc_multiple_threads.
9797         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9798         necessary.
9799
9800         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9801         (THREAD_SETMEM_NC): Likewise.
9802
9803         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9804         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9805         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9806         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9807
9808         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9809         Eliminate one entire instruction.
9810
9811         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9812         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9813         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9814         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9815         instead of __pthread_enable_asynccancel.
9816         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9817         (__pthread_cond_wait): Likewise.
9818         * sysdeps/pthread/pthread_cond_timedwait.c
9819         (__pthread_cond_timedwait): Likewise.
9820         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9821
9822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9823         (__condvar_cleanup): Wake up all waiters in case we got signaled
9824         after being woken up but before disabling asynchronous
9825         cancellation.
9826         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9827         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9828         (__condvar_cleanup): Likewise.
9829
9830         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9831         Make it an error if architecture has no #if case.  Add x86-64.
9832
9833         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9834         pt-initfini.s generation.
9835
9836         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9837         (TLS_INIT_TP): Fix typo.
9838
9839 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9840
9841         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9842         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9843
9844         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9845         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9846         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9847         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9848         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9849         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9850         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9851         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9852
9853 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9854
9855         * sysdeps/pthread/pthread_cond_timedwait.c
9856         (__pthread_cond_timedwait): Return the result of the final
9857         locking.  If it succeeds, the regular function return value.
9858
9859         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9860         Return result of the final locking.
9861         * version.c (__nptl_main): Work around problems with the strange
9862         INTERNAL_SYSCALL macro on ppc32.
9863         * init.c (__pthread_initialize_minimal_internal): Unblock
9864         SIGCANCEL in case the parent blocked it.
9865         Reported by Paul Mackerras <paulus@samba.org>.
9866
9867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9870
9871 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9872
9873         * sysdeps/pthread/pthread_cond_timedwait.c
9874         (__pthread_cond_timedwait): Unlock and fail if
9875         __pthread_mutex_unlock_internal failed.
9876
9877         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9878         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9879         Use ARCH_CLONE.
9880         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9881         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9882         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9883         ALLOCATE_STACK): New macros.
9884         (TLS_TPADJ): New macro.
9885         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9886         (allocate_stack): Handle TLS_DTV_AT_TP and
9887         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9888         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9889         Don't set PD->self.
9890         * init.c [__ia64__] (__NR_set_tid_address): Define.
9891
9892         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9893         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9894         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9895         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9896         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9897         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9898         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9899         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9900         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9901         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9902         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9903         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9904         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9905         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9906         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9907         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9908         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9909         * sysdeps/ia64/bits/atomic.h: New file.
9910         * sysdeps/ia64/Makefile: New file.
9911         * sysdeps/ia64/pthread_spin_init.c: New file.
9912         * sysdeps/ia64/pthread_spin_lock.c: New file.
9913         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9914         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9915         * sysdeps/ia64/pthreaddef.h: New file.
9916         * sysdeps/ia64/tcb-offsets.sym: New file.
9917         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9918         * sysdeps/ia64/tls.h: New file.
9919
9920         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9921         to syscall instead of no arguments.
9922
9923 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9924
9925         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9926         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9927         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9928         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9929
9930         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9931         unused code.
9932
9933         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9934
9935         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9936         lowlevelbarrier.sym.
9937         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9938         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9939         Include lowlevelbarrier.h and don't define offsets locally.
9940         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9941
9942         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9943         (__lll_mutex_lock_wait): Reverse order of first two parameters.
9944         (__lll_mutex_timedlock_wait): Likewise.
9945         (lll_mutex_lock): Adjust asm for that.
9946         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
9947         (lll_lock): Adjust asm for operand order change.
9948         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9949         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9950
9951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9952         Reverse order of parameters.
9953         (__lll_timedwait_tid): Remove regparms attribute.
9954         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9955         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9956
9957         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9958         (__lll_timedwait_tid): Remove one unnecessary instruction.
9959
9960         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9961         __lll_mutex_timedlock_wait only for NOT_IN_libc.
9962         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9963         lowlevelmutex.S.
9964
9965         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9966         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9967         for NOT_IN_libc.
9968         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9969         lowlevellock.S.
9970
9971         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9972         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
9973         for libc.so.
9974         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9975         define LOCK here (if UP is not defined).  The actual code is in
9976         lowlevelmutex.S.
9977
9978         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9979         LOCK is already defined.  Don't define lll_unlock_wake_cb and
9980         __lll_timedwait_tid for libc.so.
9981         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9982         define LOCK here (if UP is not defined).  The actual code is in
9983         lowlevellock.S.
9984
9985         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9986         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9987         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9988         instead of lowlevelsem.h.
9989         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9990         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9991         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9992
9993         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9994         lowlevelrwlock.sym.
9995         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9996         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9997         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9998
9999         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10000         register loading.
10001         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10002         last changed.  D'oh.
10003
10004         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10005
10006         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10007         of __libc_locking_needed.
10008         (lll_trylock): Initialize %eax to zero.
10009
10010         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10011         pthread_cond_t definition.
10012
10013 2003-03-10  Roland McGrath  <roland@redhat.com>
10014
10015         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10016         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10017         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10018         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10019         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10020
10021         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10022         Instead of setting PD->multiple_threads, set globals
10023         __pthread_multiple_threads and __libc_multiple_threads.
10024         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10025         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10026         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10027
10028         * descr.h (struct pthread): Conditionalize first member on
10029         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10030         containing an anonymous tcbhead_t.  Move `list' member out.
10031         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10032         * allocatestack.c: Remove use of `header.data.' prefix.
10033         * pthread_create.c: Likewise.
10034         * init.c (__pthread_initialize_minimal_internal): Likewise.
10035         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10036         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10037         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10038         * sysdeps/x86_64/tls.h: Likewise.
10039         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10040         (SINGLE_THREAD_P): Likewise.
10041         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10042         (SINGLE_THREAD_P): Likewise.
10043         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10044         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10045
10046 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10047
10048         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10049
10050         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10051         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10052
10053         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10054         leftovers from the ia32 code.
10055
10056         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10057         memory load.
10058         (clear_once_control): Don't load %esi.
10059
10060         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10061         handling.
10062
10063         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10064
10065         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10066         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10067
10068         * Makefile (tests): Add tst-cond10.
10069         * tst-cond10.c: New file.
10070
10071 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10072
10073         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10074         * tst-signal3.c (do_test): Likewise.
10075         * tst-sem5.c (do_test): Likewise.
10076         * tst-kill6.c (do_test): Likewise.
10077         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10078
10079         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10080         of inc/dec.
10081         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10082         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10083         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10084         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10086         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10088         Likewise.
10089         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10090         Likewise.
10091         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10092         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10096         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10097         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10098         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10099
10100         * allocatestack.c (allocate_stack): If mprotect() fails free the
10101         TLS memory.
10102
10103 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10104
10105         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10106
10107         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10108         lll_wake_tid.  This was used only to work around kernel limits in
10109         the early days.
10110         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10111         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10112         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10113         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10114
10115         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10116         (__pthread_initialize_minimal_internal): Change initialization of
10117         __static_tls_align_m1 appropriately.
10118         * pthreadP.h (__static_tls_align_m1): Renamed from
10119         __static_tls_align.
10120         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10121         instead of __static_tls_align-1.
10122
10123 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10124
10125         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10126
10127         * pthread_create.c: Define __pthread_keys using nocommon
10128         attribute, not by placing it explicitly in bss.
10129         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10130
10131         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10132         Use it in mmap call to allocate stacks.
10133
10134         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10135
10136         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10137         result of the thread function.
10138
10139 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10140
10141         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10142         version is just fine.
10143
10144         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10145         (__pthread_child_handler): Renamed from pthread_child_handler,
10146         exported, and marked hidden.  Change all users.
10147         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10148         free __pthread_child_handler from child list.
10149
10150 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10151
10152         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10153
10154         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10155         Fix handling of cancellation and failing pthread_mutex_unlock call.
10156         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10157         (__pthread_cond_wait): Likewise.
10158
10159         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10160         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10161         lll_futex_timed_wait call.
10162         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10163         (pthread_rwlock_timedwrlock): Likewise.
10164
10165         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10166         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10167         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10168
10169         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10170         check of lll_futex_wake return value.
10171
10172 2003-03-03  Roland McGrath  <roland@redhat.com>
10173
10174         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10175
10176         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10177         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10178         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10179
10180 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10181
10182         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10183         error for CPU clocks.
10184
10185         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10186         _POSIX_MONOTONIC_CLOCK.
10187         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10188
10189         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10190         recent kernels.
10191
10192 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10193
10194         * descr.h (struct pthread): Move cleanup field to the front.
10195
10196 2003-03-01  Roland McGrath  <roland@redhat.com>
10197
10198         * sem_open.c (sem_open): Braino fix.
10199
10200 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10201
10202         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10204         __pthread_cleanup_pop functionality.
10205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10206
10207         * descr.h (struct pthread): Move tid field to the front now that
10208         it is often used.
10209
10210         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10211         (__lll_mutex_timedlock_wait): Remove.
10212         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10213         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10214         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10215         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10216         (lll_unlock_wake_cb): Don't save and restore %esi.
10217         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10218         %esi.
10219         (__lll_timedwait_tid): Add alignment.
10220         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10221         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10222         %esi.
10223         (__lll_timedwait_tid): Removed.
10224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10225         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10226         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10227         (pthread_barrier_wait): Don't save, load, and restore %esi for
10228         last thread.
10229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10230         (__pthread_cond_signal): Don't save, load, and restore %esi.
10231         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10232         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10233         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10234         Don't save, load, and restore %esi.
10235
10236 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10237
10238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10239         Release lock before waking up the waiters.
10240
10241         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10242
10243         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10244         (reader_thread): Likewise.
10245
10246         * sysdeps/pthread/pthread_rwlock_unlock.c
10247         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10248         to wake up readers if there are none.
10249
10250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10251         Release internal lock before wake threads.
10252
10253 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10254
10255         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10256         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10257         predefined.
10258         * tst-rwlock9.c: Likewise.
10259         * tst-rwlock10.c: New file.
10260         * tst-rwlock11.c: New file.
10261
10262         * Makefile (tests): Add tst-dlsym1.
10263         * tst-dlsym1.c: New file.
10264
10265         * init.c (__pthread_initialize_minimal_internal): Set
10266         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10267         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10268
10269 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10270
10271         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10272
10273         * tst-cond2.c: Fix sychronization with child.
10274
10275         * tst-rwlock8.c (reader_thread): Remove unused variable.
10276
10277         * Makefile: Add rules to build and run tst-tls3.
10278         * tst-tls3.c: New file.
10279         * tst-tls3mod.c: New file.
10280
10281         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10282         * tst-rwlock8.c: New file.
10283         * tst-rwlock9.c: New file.
10284         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10285         complete broken rwlock implementation.
10286         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10287         Likewise.
10288         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10289         Likewise.
10290         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10291         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10292         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10293         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10294         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10295         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10296         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10297
10298 2003-02-23  Roland McGrath  <roland@redhat.com>
10299
10300         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10301
10302 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10303
10304         * Makefile (tests): Add tst-context1.
10305         * tst-context1.c: New file.
10306
10307         * Makefile (tests): Add tst-tls1 and tst-tls2.
10308         * tst-tls1.c: New file.
10309         * tst-tls2.c: New file.
10310
10311         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10312         for failed cmpxchg.
10313
10314         * pthread_create.c (start_thread): Set EXITING_BIT early.
10315
10316         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10317         (THREAD_GETMEM_NC): Likewise.
10318
10319 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10320
10321         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10322         off 3 more bytes by using offset-less instructions when possible.
10323
10324         * Makefile: Add dependency for $(objpfx)version.d.
10325
10326         * eintr.c (eintr_source): Add unnecessary return but the compiler
10327         insists.
10328
10329         * tst-kill3.c: Include <unistd.h>.
10330
10331 2003-02-21  Roland McGrath  <roland@redhat.com>
10332
10333         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10334
10335 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10336
10337         * Makefile (tests): Add tst-eintr1.
10338         (distribute): Add eintr.c.
10339         * tst-eintr1.c: New file.
10340         * eintr.c: New file.
10341
10342         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10343
10344         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10345         Disallow sending SIGCANCEL.
10346
10347         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10348         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10349         * tst-kill1.c: New file.
10350         * tst-kill2.c: New file.
10351         * tst-kill3.c: New file.
10352         * tst-kill5.c: New file.
10353         * tst-kill6.c: New file.
10354         * tst-basic7.c: Renamed to...
10355         * tst-kill4.c: ...this.
10356
10357 2003-02-21  Roland McGrath  <roland@redhat.com>
10358
10359         * Makefile (install-lib-ldscripts): New variable.
10360
10361 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10362
10363         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10364         * pthread_cancel.c: Use INVALID_TD_P.
10365         * pthread_detach.c: Likewise.
10366         * pthread_getschedparam.c: Likewise.
10367         * pthread_setschedparam.c: Likewise.
10368         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10369         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10370         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10371         * pthread_timedjoin.c: Likewise.
10372
10373         * tst-basic7.c: Include <signal.h>.
10374
10375         * pthread_join.c (pthread_join): Limited checking for invalid
10376         descriptors.
10377         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10378
10379 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10380
10381         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10382         beginning of the loop.  Clear the entire first block of TSD.
10383         * Makefile (tests): Add tst-key4.
10384         * tst-key4.c: New file.
10385
10386 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10387
10388         * Makefile (tests): Add tst-basic7.
10389         * tst-basic7.c: New file.
10390
10391         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10392         Add some more __builtin_expect.
10393
10394         * pthreadP.h: Define dummy version of DEBUGGING_P.
10395
10396 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10397
10398         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10399         _POSIX_THREAD_PRIORITY_SCHEDULING.
10400         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10401         _XOPEN_REALTIME_THREADS.
10402         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10403
10404         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10405         kernel returns EINVAL for PID <= 0, work around it.
10406
10407         * Makefile (tests): Add tst-signal5.
10408         * tst-signal5.c: New file.
10409
10410         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10411         and LOGIN_NAME_MAX.
10412
10413         * tst-cancel1.c (tf): Block all signals.
10414
10415         * Makefile (tests): Add tst-basic6.
10416         * tst-basic6.c: New file.
10417
10418         * tst-basic1.c: Add test for process ID.
10419
10420         * Makefile (tests): Add tst-cancel10.
10421         * tst-cancel10.c: New file.
10422
10423         * Makefile (tests): Add tst-signal4.
10424         * tst-signal4.c: New file.
10425
10426         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10427         __sigismember instead of sigismember.  Add __builtin_expect.
10428
10429 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10430
10431         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10432         pthread_setcancelstate, and pthread_rwlock_setpshared.
10433
10434         * tst-cancel7.c (do_test): Make sure the pid file exists before
10435         canceling the thread.
10436
10437         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10438         pthread_rwlock_timedrdlock tests.
10439         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10440         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10441         Check for invalid tv_nsec field.
10442         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10443         Likewise.
10444
10445         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10446         recursive mutex of overflow.
10447
10448         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10449
10450         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10451         going into an endless loop.
10452         * Makefile (tests): Add tst-cancel9.
10453         * tst-cancel9.c: New file.
10454
10455         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10456
10457 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10458
10459         * tst-mutex5.c (do_test): Add more timedlock tests.
10460
10461         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10462         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10463
10464         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10465         use INLINE_SYSCALL.  Error number is returned, not -1.
10466
10467         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10468         and __deallocate_stack with internal_function.
10469         * pthread_create.c: Adjust definitions appropriately.
10470         * allocatestack.c: Likewise.
10471
10472         * pthread_join.c: Add one more __builtin_expect.
10473         * pthread_timedjoin.c: Likewise.
10474
10475         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10476         not data of sequence number does not match.
10477         Add one __builtin_expect.
10478
10479         * Makefile (tests): Add tst-clock1.
10480         * tst-clock1.c: New file.
10481
10482         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10483         negative arguments.
10484         * Makefile (tests): Add tst-basic5.
10485         * tst-basic5.c: New file.
10486
10487 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10488
10489         * Makefile (tests): Add tst-basic4.
10490         * tst-basic4.c: New file.
10491
10492         * pthreadP.h: Add declaraction for __nptl_nthreads.
10493         * pthread_create.c: Define __nptl_nthreads
10494         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10495         after thread is done.  If then zero, call exit(0).
10496         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10497         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10498         * init.c (pthread_functions): Initialize ptr_nthreads.
10499         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10500         (__reclaim_stacks): Decrement __nptl_nthreads.
10501         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10502         Define.
10503         * Makefile (tests): Add tst-basic3.
10504         * tst-basic3.c: New file.
10505
10506         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10507         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10508         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10509         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10510         if asynchronous canceling is enabled.
10511         * pthread_join.c (pthread_join): When recognizing circular joins,
10512         take into account the other thread might be already canceled.
10513         * Makefile (tests): Add tst-join5.
10514         * tst-join5.c: New file.
10515
10516         * Makefile (tests): Add tst-join4.
10517         * tst-join4.c: New file.
10518
10519 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10520
10521         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10522
10523 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10524
10525         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10526         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10527         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10528         warning.
10529         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10530         to avoid warning.
10531         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10532         error if lll_futex_wake failed.
10533
10534 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10535
10536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10537         handling of cancellation and failung pthread_mutex_unlock call.
10538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10539         * Makefile (tests): Add tst-cond8 and tst-cond9.
10540         * tst-cond8.c: New file.
10541         * tst-cond9.c: New file.
10542
10543         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10544
10545         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10546         non-standard initializers with __USE_GNU.
10547
10548         * Makefile (tests): Add tst-cleanup3.
10549         * tst-cleanup3.c: New file.
10550
10551 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10552
10553         * Makefile (tests): Add tst-attr1 and tst-attr2.
10554         * tst-attr1.c: New file.
10555         * tst-attr2.c: New file.
10556
10557         * Makefile: Add rules to build and run tst-atfork2 test.
10558         * tst-atfork2.c: New file.
10559         * tst-atfork2mod.c: New file.
10560
10561         * sysdeps/unix/sysv/linux/unregister-atfork.c
10562         (__unregister_atfork): Free the memory allocated for the handlers
10563         after removing them from the lists.
10564
10565         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10566         cleanup function.
10567
10568         * tst-atfork1.c (do_test): Wait for the child we forked.
10569         Report error in child.
10570
10571         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10572
10573         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10574
10575 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10576
10577         * Makefile (tests): Add tst-cancel8.
10578         * tst-cancel8.c: New file.
10579
10580         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10581         clearing of control variable.
10582         * Makefile (tests): Add tst-once3 and tst-once4.
10583         * tst-once3.c: New file.
10584         * tst-once4.c: New file.
10585
10586 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10587
10588         * sysdeps/sh/Makefile: New file.
10589         * sysdeps/sh/bits/atomic.h: New file.
10590         * sysdeps/sh/pthread_spin_init.c: New file.
10591         * sysdeps/sh/pthread_spin_lock.c: New file.
10592         * sysdeps/sh/pthread_spin_trylock.S: New file.
10593         * sysdeps/sh/pthread_spin_unlock.S: New file.
10594         * sysdeps/sh/pthreaddef.h: New file.
10595         * sysdeps/sh/tcb-offsets.sym: New file.
10596         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10597         * sysdeps/sh/tls.h: New file.
10598         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10599         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10600         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10601         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10602         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10603         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10604         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10605         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10606         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10607         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10608         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10609         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10610         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10611         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10612         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10613         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10614         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10615         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10616         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10617         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10618         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10619         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10620         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10621         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10622         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10623         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10624         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10625         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10626         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10627         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10628
10629 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10630
10631         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10632         according to POSIX.
10633
10634         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10635
10636 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10637
10638         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10639         (TLS_GET_FS): New #define.
10640         (TLS_SET_FS): New #define.
10641         Correct value of __NR_set_thread_area.
10642
10643         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10644
10645 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10646
10647         * Makefile (tests): Add tst-popen1.
10648         * tst-popen1.c: New file.
10649
10650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10651         but inactive generalization.
10652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10654         Minor optimization, remove one instruction.
10655         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10656
10657 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10658
10659         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10660
10661 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10662
10663         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10664         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10665         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10666         * sysdeps/pthread/pthread_cond_signal.c: New file.
10667         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10668         * sysdeps/pthread/pthread_cond_wait.c: New file.
10669         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10670         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10671         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10672         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10673         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10674         * sysdeps/s390/Makefile: New file.
10675         * sysdeps/s390/bits/atomic.h: New file.
10676         * sysdeps/s390/pthread_spin_init.c: New file.
10677         * sysdeps/s390/pthread_spin_lock.c: New file.
10678         * sysdeps/s390/pthread_spin_trylock.c: New file.
10679         * sysdeps/s390/pthread_spin_unlock.c: New file.
10680         * sysdeps/s390/pthreaddef.h: New file.
10681         * sysdeps/s390/tcb-offsets.sym: New file.
10682         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10683         * sysdeps/s390/tls.h: New file.
10684         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10685         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10686         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10687         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10688         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10689         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10690         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10691         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10692         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10693         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10694         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10695         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10696         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10697         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10698         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10699         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10700         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10701         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10702         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10703         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10704         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10705         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10706         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10707
10708 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10709
10710         * atomic.h: Add a couple more default implementations.
10711         (atomic_compare_and_exchange_acq): Use
10712         __arch_compare_and_exchange_32_acq in return value definition.  It
10713         always exists.
10714         (atomic_bit_set): Renamed from atomic_set_bit.
10715         Add missing atomic_ prefixes.
10716
10717         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10718         thread library is available, use correct value to mark initialized
10719         once variable.
10720
10721 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10722
10723         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10724         __sysconf to determine pagesize.
10725
10726         * pthread_create.c: Include <atomic.h>.
10727         * allocatestack.c (allocate_stack): Implement coloring of the
10728         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10729         size minus one.  Adjust users.
10730         * sysdeps/i386/i686/Makefile: New file.
10731
10732 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10733
10734         * allocatestack.c: Improve comment throughout the file.
10735
10736         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10737         (__lll_lock_wait): Add branch prediction.
10738         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10739         (__lll_lock_wait): Likewise.
10740         (lll_unlock_wake_cb): Removed.
10741
10742 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10743
10744         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10745         _POSIX_THREAD_PRIORITY_SCHEDULING.
10746
10747 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10748
10749         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10750         Fix return type of ptr___pthread_getspecific.
10751
10752 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10753
10754         * Makefile (tests): Add tst-umask1.
10755         (tst-umask1-ARGS): Define.
10756         * tst-umask1.c: New file.
10757
10758 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10759
10760         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10761         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10762         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10763         pthread_rwlock_unlock.
10764         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10765         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10766         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10767         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10768         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10769         New file.
10770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10771         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10772         New file.
10773         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10774         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10775         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10776         New file.
10777         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10778         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10779         New file.
10780         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10781         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10782         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10783         New file.
10784         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10785         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10786         New file.
10787         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10788
10789         * Makefile (libpthread-routines): Remove lowlevelcond and
10790         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10791         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10792         and pthread_cond_broadcast.
10793         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10794         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10795         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10796         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10797         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10798         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10799         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10800         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10801         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10802         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10803         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10804         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10805         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10807         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10808         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10809         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10810         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10811         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10812         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10813         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10814         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10815         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10816         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10817         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10818         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10819         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10820         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10821         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10822         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10823         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10824
10825         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10826         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10827         of the code is moved to ...
10828         * sysdeps/pthread/createthread.c: ...here.  New file.
10829
10830 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10831
10832         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10833         (__new_sem_post): Clear %eax before returning.
10834         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10835
10836         * Makefile (tests): Add tst-cleanup2.
10837         * tst-cleanup2.c: New file.
10838
10839         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10840         Interpret first parameter correctly.
10841
10842 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10843
10844         * Makefile (headers): Add bits/semaphore.h.
10845
10846 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10847
10848         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10849         if not SHARED.
10850
10851 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10852
10853         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10854         must be used and mapping failed.
10855         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10856
10857         * Makefile (CFLAGS-pthread_self.os): Define this, not
10858         CFLAGS-pthread_self.c.
10859
10860 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10861
10862         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10863         lll_unlock_wake_cb.
10864
10865         * Makefile (libpthread-routines): Add version.  Add rules to build
10866         version.os and banner.h.
10867         * version.c: New file.
10868
10869 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10870
10871         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10872         the alias unconditional.
10873         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10874
10875 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10876
10877         * Makefile (CFLAGS-pthread_self.c): New definition.
10878
10879 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10880
10881         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10882         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10883         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10884         * init.c (__pthread_initialize_minimal_internal): Likewise.
10885
10886 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10887
10888         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10889
10890         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10891         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10892         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10893         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10894         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10895         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10896
10897 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10898
10899         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10900         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10901         * tst-cancel-wrappers.sh: Remove all exceptions.
10902
10903 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10904
10905         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10906         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10907
10908         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10909         Use __libc_pthread_functions array if SHARED.
10910
10911         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10912         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10913
10914         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10915         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10916         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10917         __libc_ptf_call instead of __libc_maybe_call.
10918         (PTF): New #define.
10919         (__libc_cleanup_region_start): Wrap function name with PTF call.
10920         (__libc_cleanup_region_end): Likewise.
10921         (__libc_cleanup_end): Likewise.
10922
10923         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10924         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10925         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10926         * pthreadP.h: Add prototypes.
10927
10928         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10929         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10930         __pthread_rwlock_unlock aliases.
10931         * pthreadP.h: Add prototypes for new aliases.
10932
10933         * pthreadP.h (struct pthead_functions): Moved to...
10934         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10935         * init.c (pthread_functions): Add initializers for new elements.
10936
10937         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10938         __pthread_cleanup_pop_restore aliases.
10939         * pthreadP.h: Add prototypes.
10940
10941         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10942         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10943         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10944         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10945         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10946         * pthreadP.h: Adjust prototypes and callers.
10947
10948 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
10949
10950         * Makefile (tests): Add tst-cancel7.
10951         (tst-cancel7-ARGS): New variable.
10952         * tst-cancel7.c: New file.
10953
10954         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10955         around gcc defficiencies.
10956         * old_pthread_cond_signal.c: Likewise.
10957         * old_pthread_cond_timedwait.c: Likewise.
10958         * old_pthread_cond_wait.c: Likewise.
10959
10960         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10961
10962 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10963
10964         * Makefile (tests): Add tst-cond7.
10965         * tst-cond7.c: New file.
10966
10967         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10968         (condvar_cleanup): Get condvar address from the right place.
10969
10970         * atomic.h: Correct definitions of atomic_full_barrier,
10971         atomic_read_barrier, atomic_write_barrier.
10972
10973         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10974         race-free.
10975         * old_pthread_cond_signal.c: Likewise.
10976         * old_pthread_cond_timedwait.c: Likewise.
10977         * old_pthread_cond_wait.c: Likewise.
10978
10979 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
10980
10981         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10982
10983 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10984
10985         * pthreadP.h (pthread_cond_2_0_t): New type.
10986         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10987         Use new type for the 2.0 condvar function prototypes.
10988         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10989         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10990         parameter.
10991         * old_pthread_cond_destroy.c: Likewise.
10992         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10993         * old_pthread_cond_signal.c: Likewise.
10994         * old_pthread_cond_timedwait.c: Likewise.
10995         * old_pthread_cond_wait.c: Likewise.
10996
10997         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10998         (__pthread_cond_wait): Don't save cancellation mode and seq value
10999         in same location.
11000
11001         * herrno.c (__h_errno_location): Don't define as weak.
11002
11003 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11004
11005         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11006         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11007         and pthread_cond_wait.
11008         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11009         Renamed to...
11010         (__pthread_cond_broadcast_2_0): ... this.
11011         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11012         Renamed to...
11013         (__pthread_cond_destroy_2_0): ... this.
11014         * old_pthread_cond_init.c (__old_pthread_cond_init):
11015         Renamed to...
11016         (__pthread_cond_init_2_0): ... this.
11017         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11018         Renamed to...
11019         (__pthread_cond_signal_2_0): ... this.
11020         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11021         Renamed to...
11022         (__pthread_cond_wait_2_0): ... this.
11023         * pthread_cond_destroy.c: Include shlib-compat.h.
11024         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11025         * pthread_cond_init.c: Include shlib-compat.h.
11026         (pthread_cond_init): Change strong_alias into versioned_symbol.
11027         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11028         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11029         fields.
11030         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11031         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11032         __pthread_cond_wait_2_0): New prototypes.
11033         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11034         __old_pthread_cond_init, __old_pthread_cond_signal,
11035         __old_pthread_cond_wait): Removed.
11036         * init.c: Include shlib-compat.h.
11037         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11038         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11039         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11040         ptr___pthread_cond_*_2_0 fields.
11041         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11042         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11043
11044         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11045         LIBC_SIGACTION was not yet defined.
11046         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11047         [!defined LIBC_SIGACTION] (__sigaction): New function and
11048         libc_hidden_weak.
11049         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11050         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11051
11052 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11053
11054         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11055
11056 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11057
11058         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11059         New, larger type definition.
11060         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11061         implementation.
11062         * Versions [libpthread]: Add definitions for new pthread_cond_*
11063         interfaces for version GLIBC_2.3.2.
11064         * pthread_cond_init.c: Update initialization for new type definition.
11065         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11066         pthread_cond_timedwait, pthread_cond_signal, and
11067         pthread_cond_broadcast.  Add old_pthread_cond_init,
11068         old_pthread_cond_destroy, old_pthread_cond_wait,
11069         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11070         old_pthread_cond_broadcast.
11071         * old_pthread_cond_broadcast.c: New file.
11072         * old_pthread_cond_destroy.c: New file.
11073         * old_pthread_cond_init.c: New file.
11074         * old_pthread_cond_signal.c: New file.
11075         * old_pthread_cond_timedwait.c: New file.
11076         * old_pthread_cond_wait.c: New file.
11077         * pthreadP.h: Add prototypes for the compatibility interfaces.
11078
11079         * pthread_cond_destroy.c: Don't include <errno.h>.
11080
11081 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11082
11083         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11084         unnecessary zero offset when addressing MUTEX.
11085
11086 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11087
11088         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11089         __register_atfork.
11090         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11091         for __register_atfork.
11092
11093 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11094
11095         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11096         instead of ASSEMBLER test macro.
11097
11098         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11099         __libc_current_sigrtmax): Add libc_hidden_def.
11100
11101         * sysdeps/pthread/list.h: Remove assert.h include.
11102
11103 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11104
11105         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11106         __pthread_initialize_minimal_internal not
11107         __pthread_initialize_minimal.
11108
11109 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11110
11111         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11112         __pthread_initialize_minimal as hidden.
11113
11114         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11115         constructor.
11116
11117 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11118
11119         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11120         $(common-objpfx)format.lds, include that into the output script.
11121         Fix comment.
11122         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11123
11124 2002-12-28  Andreas Jaeger  <aj@suse.de>
11125
11126         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11127         nsec resolution changes.
11128         (xstat64_conv): Likewise.
11129         (xstat32_conv): Likewise.
11130         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11131         struct kernel_stat.
11132         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11133         structs stat and stat64.
11134         * time/time.h (__timespec_defined): Define for __USE_MISC.
11135         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11136
11137 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11138
11139         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11140         argument.
11141         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11142         (pthread_exit): Use strong_alias to avoid warnings.
11143         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11144         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11145         ptr___pthread_attr_init_2_*.
11146         * init.c (pthread_functions): Adjust.
11147
11148 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11149
11150         * forward.c: Make all functions available by default again.  It
11151         caused too much trouble.
11152
11153         * pt-siglongjmp.c: Removed.
11154
11155 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11156
11157         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11158         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11159         * sysdeps/i386/Makefile: New file.
11160         * sysdeps/i386/tcb-offsets.sym: New file.
11161         * sysdeps/pthread/tcb-offsets.h: New file.
11162         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11163         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11164
11165         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11166         __register_atfork...
11167         (GLIBC_2.3.2): ...here.
11168
11169 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11170
11171         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11172         pthread_attr_setstackaddr with __attribute_deprecated__.
11173
11174 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11175
11176         * pt-system.c (system): Remove cancellation handling.
11177         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11178         cancellation routines.
11179
11180 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11181
11182         * descr.h: Include <dl-sysdep.h>.
11183         (struct pthread): Move header.data.list to the back of the struct.
11184         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11185         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11186         (SYSINFO_OFFSEET): Likewise.
11187
11188 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11189
11190         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11191         Define.
11192         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11193         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11194         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11195         (USE_DL_SYSINFO): Undef.
11196
11197 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11198
11199         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11200         $(common-objpfx)libc.so.
11201         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11202         it is bigger than pipe buffer size even on arches with bigger
11203         page size.
11204         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11205
11206 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11207
11208         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11209         correct errno access for case that USE___THREAD is not defined.
11210
11211 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11212
11213         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11214         Patch by Marijn Ros <marijn@mad.scientist.com>.
11215
11216 2002-12-22  Roland McGrath  <roland@redhat.com>
11217
11218         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11219
11220 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11221
11222         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11223
11224 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11225
11226         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11227         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11228         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11229
11230         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11231         of int $0x80.
11232         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11233         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11234         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11235         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11236         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11238         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11239         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11240
11241         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11242         sysenter.
11243         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11244
11245         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11246
11247         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11248         in new TCB.
11249         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11250         that sysinfo is properly initialized.
11251         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11252         to 1 only for ld.so.
11253
11254         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11255         RTLD_CORRECT_DYNAMIC_WEAK.
11256
11257 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11258
11259         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11260         Use return 0 as 6th argument to FORWARD4.
11261         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11262
11263 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11264
11265         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11266         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11267         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11268         (INIT_SYSINFO): New #define.
11269         (TLS_TP_INIT): Use INIT_SYSINFO.
11270         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11271         At test to make sure SYSINFO_OFFSET value is correct.
11272         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11273
11274 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11275
11276         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11277         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11278         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11279         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11280         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11281         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11282         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11283
11284 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11285
11286         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11287         macro instead of using int $0x80 directly.
11288
11289         * sysdeps/pthread/bits/stdio-lock.h: New file.
11290         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11291         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11292         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11293         * Makefile (routines): Add libc-lowlevelmutex.
11294
11295         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11296         __i686.get_pc_thunk.dx.
11297
11298 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11299
11300         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11301         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11302         ($(objpfx)tst-cancel-wrappers.out): New rule.
11303         * tst-cancel-wrappers.sh: New test.
11304         * tst-locale1.c: Include signal.h.
11305         (uselocale): Test static linking of __libc_current_sigrt*.
11306
11307 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11308
11309         * Makefile (tests): Add tst-cancel6.
11310         * tst-cancel6.c: New file
11311
11312 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11313
11314         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11315         Define meaningfully for assembler as well.
11316         * pthreadP.h (struct pthread_functions): Remove
11317         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11318         and ptr_pthread_attr_init_2_1 fields.
11319         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11320         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11321         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11322         (FORWARD3): Define using FORWARD4.
11323         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11324         versions.
11325         * pt-system.c: Remove duplicate stdlib.h include.
11326
11327 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11328
11329         * sem_init.c: Define sem_init@GLIBC_2.0.
11330         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11331         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11332
11333         * flockfile.c: Moved to...
11334         * sysdeps/pthread/flockfile.c: ...here.  New file.
11335         * funlockfile.c: Moved to...
11336         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11337         * ftrylockfile.c: Moved to...
11338         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11339
11340 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11341
11342         * libc-cancellation.c: Guard both function with
11343         #if !defined NOT_IN_libc.
11344         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11345         automatically provided pthread wrappers.
11346         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11347         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11348         nor in libpthread.
11349         * pt-open.c: Removed.
11350         * pt-fcntl.c: Removed.
11351         * pt-fsync.c: Removed.
11352         * pt-lseek.c: Removed.
11353         * pt-msgrcv.c: Removed.
11354         * pt-msgsnd.c: Removed.
11355         * pt-msync.c: Removed.
11356         * pt-nanosleep.c: Removed.
11357         * pt-open64.c: Removed.
11358         * pt-pause.c: Removed.
11359         * pt-pread.c: Removed.
11360         * pt-pread64.c: Removed.
11361         * pt-pwrite.c: Removed.
11362         * pt-pwrite64.c: Removed.
11363         * pt-read.c: Removed.
11364         * pt-recv.c: Removed.
11365         * pt-recvfrom.c: Removed.
11366         * pt-recvmsg.c: Removed.
11367         * pt-send.c: Removed.
11368         * pt-sendto.c: Removed.
11369         * pt-sigtimedwait.c: Removed.
11370         * pt-sigwait.c: Removed.
11371         * pt-wait.c: Removed.
11372         * pt-waitpid.c: Removed.
11373         * pt-write.c: Removed.
11374         * pt-accept.c: Removed.
11375         * pt-close.c: Removed.
11376         * pt-connect.c: Removed.
11377         * pt-lseek64.c: Removed.
11378         * pt-sendmsg.c: Removed.
11379         * pt-tcdrain.c: Removed.
11380
11381 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11382
11383         * init.c (__pthread_initialize_minimal_internal): Renamed from
11384         __pthread_initialize_minimal.  Make old name an alias.  This
11385         converts a normal relocation into a relative relocation.
11386
11387         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11388
11389         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11390         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11391         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11392         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11393         pt-sigwaitinfo, pt-waitid, and pt-writev.
11394         * pt-creat.c: Removed.
11395         * pt-poll.c: Removed.
11396         * pt-pselect.c: Removed.
11397         * pt-readv.c: Removed.
11398         * pt-select.c: Removed.
11399         * pt-sigpause.c: Removed.
11400         * pt-sigsuspend.c: Removed.
11401         * pt-sigwaitinfo.c: Removed.
11402         * pt-waitid.c: Removed.
11403         * pt-writev.c: Removed.
11404
11405         * init.c (pthread_functions): New variable.
11406         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11407         (or NULL) to __libc_pthread_init.
11408         * forward.c: Rewrite to use __libc:pthread_functions array to get
11409         function addresses.
11410         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11411         prototype.
11412         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11413         Take new parameter.  Copy content of variable pointed to by it
11414         to __libc_pthread_init.
11415
11416         * pthreadP.h (struct pthread_functions): New type.
11417         (__libc_pthread_init): Declare.
11418
11419         * pthread_attr_destroy.c: Add namespace protected alias.
11420         * pthread_attr_getdetachstate.c: Likewise.
11421         * pthread_attr_getinheritsched.c: Likewise.
11422         * pthread_attr_getschedparam.c: Likewise.
11423         * pthread_attr_getschedpolicy.c: Likewise.
11424         * pthread_attr_getscope.c: Likewise.
11425         * pthread_attr_setdetachstate.c: Likewise.
11426         * pthread_attr_setinheritsched.c: Likewise.
11427         * pthread_attr_setschedparam.c: Likewise.
11428         * pthread_attr_setschedpolicy.c: Likewise.
11429         * pthread_attr_setscope.c: Likewise.
11430         * pthread_cond_broadcast.c: Likewise.
11431         * pthread_cond_destroy.c: Likewise.
11432         * pthread_cond_init.c: Likewise.
11433         * pthread_cond_signal.c: Likewise.
11434         * pthread_cond_wait.c: Likewise.
11435         * pthread_condattr_destroy.c: Likewise.
11436         * pthread_condattr_init.c: Likewise.
11437         * pthread_equal.c: Likewise.
11438         * pthread_exit.c: Likewise.
11439         * pthread_getschedparam.c: Likewise.
11440         * pthread_self.c: Likewise.
11441         * pthread_setcancelstate.c: Likewise.
11442         * pthread_setschedparam.c: Likewise.
11443         * pthread_mutex_destroy.c: Likewise.
11444         * pthread_mutex_init.c: Likewise.
11445         * pthreadP.h: Add prototypes for the aliases.
11446
11447         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11448         multiple_threads member in correct TCB to 1.
11449
11450         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11451         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11452         member of thread decriptor, otherwise return unconditionally 1.
11453
11454 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11455
11456         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11457         regular Linux version.  Remove file.
11458         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11459         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11460         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11461         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11462         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11463         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11464         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11465         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11466         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11467         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11468         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11469         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11470         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11471         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11472         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11473         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11474         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11475         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11476         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11477         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11478         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11479         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11480         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11481         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11482         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11483         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11484         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11485         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11486         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11487         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11488
11489 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11490
11491         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11492         * sysdeps/unix/sysv/linux/open.c: Removed.
11493         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11494         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11495         * sysdeps/unix/sysv/linux/msync.c: Removed.
11496         * sysdeps/unix/sysv/linux/read.c: Removed.
11497         * sysdeps/unix/sysv/linux/close.c: Removed.
11498         * sysdeps/unix/sysv/linux/creat.c: Removed.
11499         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11500         * sysdeps/unix/sysv/linux/pause.c: Removed.
11501         * sysdeps/unix/sysv/linux/select.c: Removed.
11502         * sysdeps/unix/sysv/linux/write.c: Removed.
11503
11504 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11505
11506         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11507         element in TCB to see whether locking is needed.
11508
11509         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11510         MULTIPLE_THREADS_OFFSET value is correct.
11511
11512         * sysdeps/unix/sysv/linux/close.c: New file.
11513         * sysdeps/unix/sysv/linux/connect.S: New file.
11514         * sysdeps/unix/sysv/linux/creat.c: New file.
11515         * sysdeps/unix/sysv/linux/fsync.c: New file.
11516         * sysdeps/unix/sysv/linux/llseek.c: New file.
11517         * sysdeps/unix/sysv/linux/lseek.c: New file.
11518         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11519         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11520         * sysdeps/unix/sysv/linux/msync.c: New file.
11521         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11522         * sysdeps/unix/sysv/linux/open.c: New file.
11523         * sysdeps/unix/sysv/linux/open64.c: New file.
11524         * sysdeps/unix/sysv/linux/pause.c: New file.
11525         * sysdeps/unix/sysv/linux/poll.c: New file.
11526         * sysdeps/unix/sysv/linux/pread.c: New file.
11527         * sysdeps/unix/sysv/linux/pread64.c: New file.
11528         * sysdeps/unix/sysv/linux/pselect.c: New file.
11529         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11530         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11531         * sysdeps/unix/sysv/linux/readv.c: New file.
11532         * sysdeps/unix/sysv/linux/recv.S: New file.
11533         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11534         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11535         * sysdeps/unix/sysv/linux/select.c: New file.
11536         * sysdeps/unix/sysv/linux/send.S: New file.
11537         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11538         * sysdeps/unix/sysv/linux/sendto.S: New file.
11539         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11540         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11541         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11542         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11543         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11544         * sysdeps/unix/sysv/linux/system.c: New file.
11545         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11546         * sysdeps/unix/sysv/linux/wait.c: New file.
11547         * sysdeps/unix/sysv/linux/waitid.c: New file.
11548         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11549         * sysdeps/unix/sysv/linux/writev.c: New file.
11550         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11551
11552         * pt-readv.c: Fix comment.
11553
11554 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11555
11556         * tst-cleanup1.c: Include stdlib.h.
11557
11558         * tst-cancel5.c: New test.
11559         * Makefile (tests): Add tst-cancel5.
11560         (tst-cancel5): Link against libc.so libpthread.so in that order.
11561
11562 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11563
11564         * forward.c (test_loaded): Prevent recursive calls.
11565
11566         * Makefile (routines): Add libc-cancellation.
11567         * libc-cancellation.c: New file.
11568         * descr.h (struct pthread): Add multiple_threads field.
11569         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11570         new thread descriptor to 1.
11571         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11572         Initialize multiple_thread field after successful thread creation.
11573         * cancellation.c (__do_cancel): Move to pthreadP.h.
11574         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11575         (__pthread_disable_asynccancel): Add internal_function attribute.
11576         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11577         * pthread_setcancelstate.c: Likewise.
11578         * pthread_setcanceltype.c: Likewise.
11579         * pthread_exit.c: Likewise.
11580         * pthreadP.h (CANCELLATION_P): Likewise.
11581         (__do_cancel): Define as static inline.
11582         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11583         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11584         declarations.
11585         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11586         fields.  Define MULTIPLE_THREADS_OFFSET.
11587         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11588         declaration.
11589         * sysdeps/unix/sysv/linux/accept.S: New file.
11590         * sysdeps/unix/sysv/linux/read.c: New file.
11591         * sysdeps/unix/sysv/linux/write.c: New file.
11592         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11593         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11594         initialization of __libc_locking_needed.
11595         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11596         __libc_locking_needed, use multiple_threads field in TCB.
11597         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11598
11599 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11600
11601         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11602         version.
11603         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11604
11605         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11606         access to __libc_locking_needed for PIC.
11607
11608 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11609
11610         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11611         declare for libc.so.
11612         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11613         expression.
11614         (__libc_lock_lock): Put into statement expression.
11615         (__libc_lock_unlock): Remove trailing semicolon.
11616         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11617
11618 2002-12-12  Roland McGrath  <roland@redhat.com>
11619
11620         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11621         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11622
11623 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11624
11625         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11626         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11627         Initialize __libc_locking_needed.
11628         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11629         instead of __register_pthread_fork_handler.
11630         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11631         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11632         fork-gen with libc_pthread_init.
11633         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11634         of __register_pthread_fork_handler.
11635         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11636         of __register_pthread_fork_handler.
11637         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11638         __libc_locking_needed to determine whether lock prefix can be avoided.
11639         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11640
11641 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11642
11643         * Makefile (tests): Add tst-cleanup1.
11644         * tst-cleanup1.c: New file.
11645         * cancellation.c (__cleanup_thread): Removed.
11646         (__do_cancel): Remove call to __cleanup_thread.
11647         * pthreadP.h: Remove __cleanup_thread prorotype.
11648
11649         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11650         Remember function and argument even if cancellation handler
11651         function is not available.
11652         (__libc_cleanup_region_end): Execute registered function directly if
11653         pthread functions are not available.
11654         (__libc_cleanup_end): Likewise.
11655
11656         * init.c (__pthread_initialize_minimal): Fix initialization in
11657         static lib by preventing gcc from being too clever.
11658
11659 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11660
11661         * init.c (__pthread_initialize_minimal): Remove unneccesary
11662         sigaddset call.
11663
11664         * Makefile (tests): We can run tst-locale2 now.
11665
11666 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11667
11668         * Versions: Remove duplicated sigwait entry.
11669
11670 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11671
11672         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11673         inside libpthread.
11674
11675         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11676
11677         * pthreadP.h: Declare __pthread_enable_asynccancel and
11678         __pthread_disable_asynccancel.
11679         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11680         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11681         * cancellation.c (__pthread_enable_asynccancel): New function.
11682         (__pthread_disable_asynccancel): New function.
11683         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11684         * pt-close.c: Likewise.
11685         * pt-connect.c: Likewise.
11686         * pt-creat.c: Likewise.
11687         * pt-fcntl.c: Likewise.
11688         * pt-fsync.c: Likewise.
11689         * pt-lseek.c: Likewise.
11690         * pt-lseek64.c: Likewise.
11691         * pt-msgrcv.c: Likewise.
11692         * pt-msgsnd.c: Likewise.
11693         * pt-msync.c: Likewise.
11694         * pt-nanosleep.c: Likewise.
11695         * pt-open.c: Likewise.
11696         * pt-open64.c: Likewise.
11697         * pt-pause.c: Likewise.
11698         * pt-poll.c: Likewise.
11699         * pt-pread.c: Likewise.
11700         * pt-pread64.c: Likewise.
11701         * pt-pselect.c: Likewise.
11702         * pt-pwrite.c: Likewise.
11703         * pt-pwrite64.c: Likewise.
11704         * pt-read.c: Likewise.
11705         * pt-readv.c: Likewise.
11706         * pt-recv.c: Likewise.
11707         * pt-recvfrom.c: Likewise.
11708         * pt-recvmsg.c: Likewise.
11709         * pt-select.c: Likewise.
11710         * pt-send.c: Likewise.
11711         * pt-sendmsg.c: Likewise.
11712         * pt-sendto.c: Likewise.
11713         * pt-sigpause.c: Likewise.
11714         * pt-sigsuspend.c: Likewise.
11715         * pt-sigtimedwait.c: Likewise.
11716         * pt-sigwait.c: Likewise.
11717         * pt-sigwaitinfo.c: Likewise.
11718         * pt-system.c: Likewise.
11719         * pt-tcdrain.c: Likewise.
11720         * pt-wait.c: Likewise.
11721         * pt-waitid.c: Likewise.
11722         * pt-waitpid.c: Likewise.
11723         * pt-write.c: Likewise.
11724         * pt-writev.c: Likewise.
11725         * pthread_join.c: Likewise.
11726         * pthread_timedjoin.c: Likewise.
11727
11728         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11729         (__xpg_sigpause): New function.
11730         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11731
11732 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11733
11734         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11735
11736         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11737         _GI_pthread_cleanup_pop to pthreadP.h.
11738
11739         * ftrylockfile.c: Use _IO_lock_trylock instead of
11740         pthread_mutex_trylock.
11741
11742         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11743         (CANCEL_RESET): Likewise.
11744         (__pthread_setcanceltype_): Declare.
11745         (__pthread_mutex_lock_internal): Declare.
11746         (__pthread_mutex_unlock_internal): Declare.
11747         (__pthread_once_internal): Declare.
11748         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11749         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11750
11751         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11752         and pthread_mutex_unlock.
11753         * pthread_cond_wait.c: Likewise.
11754         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11755         * pthread_mutex_unlock.c: Likewise.
11756
11757         * pthread_setcanceltype.c: Add additional alias
11758         __pthread_setcanceltype.
11759
11760         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11761         * sem_open.c (sem_open): Likewise.
11762         Use __libc_open, __libc_write, and __libc_close instead of
11763         open, write, and close respectively.
11764
11765         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11766         Rewrite as statement expression since it must return a value.
11767
11768         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11769         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11770         __pthread_kill.
11771
11772         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11773         alias __pthread_once_internal.
11774
11775         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11776
11777 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11778
11779         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11780         * tst-stdio1.c: New file.
11781         * tst-stdio2.c: New file.
11782
11783         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11784
11785         * Makefile (tests): Comment out tst-locale2 for now.
11786         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11787
11788         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11789         -D_IO_MTSAFE_IO.
11790         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11791         Use _IO_lock_init instead of explicit assignment.
11792
11793         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11794         Define __libc_lock_* and __libc_lock_recursive macros with
11795         lowlevellock macros, not pthread mutexes.
11796
11797         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11798         of pthread_mutex_lock.
11799         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11800         instead of pthread_mutex_unlock.
11801
11802 2002-12-06  Roland McGrath  <roland@redhat.com>
11803
11804         * allocatestack.c (__stack_user): Use uninitialized defn.
11805         * init.c (__pthread_initialize_minimal): Initialize it here.
11806
11807 2002-12-05  Roland McGrath  <roland@redhat.com>
11808
11809         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11810         string.
11811         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11812
11813         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11814         missing & here too.
11815
11816 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11817
11818         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11819         lowlevellock.
11820         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11821         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11822         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11823         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11824         for __libc_lock_* macros.
11825         * Makefile (routines): Add libc-lowlevellock.
11826
11827 2002-10-09  Roland McGrath  <roland@redhat.com>
11828
11829         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11830         Under [__PIC__], call the function via the pointer fetched for
11831         comparison rather than a call by name that uses the PLT.
11832         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11833         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11834         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11835         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11836         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11837
11838 2002-12-04  Roland McGrath  <roland@redhat.com>
11839
11840         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11841
11842         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11843         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11844
11845         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11846
11847 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11848
11849         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11850         a completely opaque, non-integer type.
11851         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11852
11853 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11854
11855         * sysdeps/i386/tls.h: Include stdlib.h.
11856         * sysdeps/x86_64/tls.h: Likewise.
11857
11858 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11859
11860         * Makefile (tests): Add tst-locale2.
11861         (tests-static): Likewise.
11862         * tst-locale2.c: New file.
11863
11864         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11865         volatile and add memory clobbers to lock operations.
11866
11867 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11868
11869         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11870         * sysdeps/i386/i486/bits/atomic.h: New file.
11871         * sysdeps/i386/i586/bits/atomic.h: New file.
11872         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11873         include i486 version.
11874         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11875         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11876         Patch by Marijn Ros <marijn@mad.scientist.com>.
11877
11878         * allocatestack.c (get_cached_stack): Don't crash if we first
11879         found a stack with a larger size then needed.
11880         Reported by Hui Huang <hui.huang@sun.com>.
11881
11882         * Makefile (tests): Add tst-sysconf.
11883         * tst-sysconf.c: New file.
11884
11885         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11886         PTHREAD_THREADS_MAX.
11887
11888 2002-12-02  Roland McGrath  <roland@redhat.com>
11889
11890         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11891         Declare using hidden_proto instead of attribute_hidden, so there are
11892         non-.hidden static symbols for gdb to find.
11893         (__pthread_keys): Likewise.
11894         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11895         * allocatestack.c (__stack_user): Likewise.
11896         * pthread_create.c (__pthread_keys): Likewise.
11897         (__nptl_threads_events, __nptl_last_event): Make these static instead
11898         of hidden.
11899         * pthread_key_create.c (__pthread_pthread_keys_max,
11900         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11901
11902 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11903
11904         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11905         statically.
11906         * tst-locale1.c: New file.
11907
11908         * pthread_cond_timedwait.c: Include <stdlib.h>.
11909
11910         * Makefile (tests): Add tst-fork2 and tst-fork3.
11911         * tst-fork2.c: New file.
11912         * tst-fork3.c: New file.
11913
11914 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11915
11916         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11917
11918         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11919         require it to 200112L.
11920
11921         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11922         instruction only if HAVE_CMOV is defined.
11923         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11924
11925         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11926
11927         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11928
11929         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11930
11931         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11932
11933 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11934
11935         * sysdeps/x86_64/bits/atomic.h: New file.
11936
11937         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11938         16-bit operations.
11939
11940         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11941         possible since gettid cannot fail.
11942
11943         * sysdeps/x86_64/pthreaddef.h: New file.
11944
11945         * sysdeps/i386/pthreaddef.h (gettid): Removed.
11946
11947         * sysdeps/x86_64/pthread_spin_init.c: New file.
11948         * sysdeps/x86_64/pthread_spin_lock.c: New file.
11949         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11950         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11951
11952         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11953         Add missing lock prefix.  Minute optimization.
11954
11955         * tst-spin2.c (main): Also check successful trylock call.
11956
11957         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11958         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
11959
11960         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11961         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
11962
11963         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
11964         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11965         value in case of an error.  Add support for INTERNAL_SYSCALL.
11966
11967         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11968         value in case of an error.
11969
11970         * sysdeps/x86_64/tls.h: New file.
11971
11972 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11973
11974         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
11975         takes the array member name and the index as parameters.
11976         (THREAD_SETMEM_NC): Likewise.
11977         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11978         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11979         interfaces.
11980
11981         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11982         to decide which code to use.
11983         (THREAD_SETMEM_NC): Likewise.
11984
11985         * allocatestack.c (queue_stack): Don't remove stack from list here.
11986         Do it in the caller.  Correct condition to prematurely terminate
11987         loop to free stacks.
11988         (__deallocate_stack): Remove stack from list here.
11989
11990 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11991
11992         * Makefile (tests): Add tst-stack1.
11993         * tst-stack1.c: New file.
11994
11995         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11996         provided stack.
11997
11998         * pthread_attr_getstack.c: Return bottom of the thread area.
11999
12000 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12001
12002         * Makefile (libpthread-routines): Add pt-allocrtsig and
12003         pthread_kill_other_threads.
12004         * pt-allocrtsig.c: New file.
12005         * pthread_kill_other_threads.c: New file.
12006         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12007         all three functions.
12008         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12009         allocrtsig.
12010         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12011         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12012         and __libc_allocate_rtsig_private.
12013         * Versions (libpthread): Export pthread_kill_other_threads_np,
12014         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12015
12016 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12017
12018         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12019         the end of the stack.  Adjust computations.
12020         When mprotect call fails dequeue stack and free it.
12021         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12022         attribute.
12023         * pthread_getattr_np.c: Likewise.
12024
12025         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12026         surprises.
12027
12028 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12029
12030         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12031         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12032
12033 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12034
12035         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12036         * pthread_setspecific.c: Likewise.
12037
12038 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12039
12040         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12041         definitions.  Get them from the official place.
12042         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12043
12044         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12045         Use new CLONE_ flags in clone() calls.
12046
12047         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12048         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12049
12050         * Versions: Add pthread_* functions for libc.
12051         * forward.c: New file.
12052
12053         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12054         errno-loc.
12055         * herrno.c: New file.
12056         * res.c: New file.
12057
12058         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12059         sem_trywait, and sem_timedwait.  Add herrno and res.
12060         * sem_init.c: Don't initialize lock and waiters members.
12061         * sem_open.c: Likewise.
12062         * sem_post.c: Removed.
12063         * sem_wait.c: Removed.
12064         * sem_trywait.c: Removed.
12065         * sem_timedwait.c: Removed.
12066         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12067         Includes full implementations of sem_post, sem_wait, sem_trywait,
12068         and sem_timedwait.
12069         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12070         for new implementation.
12071         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12072         and waiters fields.
12073
12074         * tst-sem3.c: Improve error message.
12075         * tst-signal3.c: Likewise.
12076
12077         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12078         to tell the kernel about the termination futex and to initialize tid
12079         member.  Don't initialize main_thread.
12080         * descr.h (struct pthread): Remove main_thread member.
12081         * cancelllation.c (__do_cancel): Remove code handling main thread.
12082         The main thread is not special anymore.
12083
12084         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12085         size of the stacks to stack_cache_actsize.
12086
12087         * pt-readv.c: Add missing "defined".
12088         * pt-sigwait.c: Likewise.
12089         * pt-writev.c: Likewise.
12090
12091 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12092
12093         * Versions: Export __connect from libpthread.
12094         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12095
12096         * Makefile (libpthread-routines): Add pt-raise.
12097         * sysdeps/unix/sysv/linux/raise.c: New file.
12098         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12099         * sysdeps/generic/pt-raise.c: New file.
12100
12101         * pthread_cond_init.c: Initialize all data elements of the condvar
12102         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12103
12104         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12105         * pthread_create.c: Likewise.
12106
12107         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12108         * tst-key1.c: New file.
12109         * tst-key2.c: New file.
12110         * tst-key3.c: New file.
12111
12112         * Versions: Export pthread_detach for version GLIBC_2.0.
12113         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12114
12115 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12116
12117         * pthread_key_create.c: Terminate search after an unused key was found.
12118         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12119
12120         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12121         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12122
12123 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12124
12125         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12126         dynamic lookup for errno in PIC.
12127
12128         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12129         release the stack lock as soon as possible.
12130         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12131         the static TLS block.
12132         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12133
12134         * cancellation.c: Renamed from cancelation.c.
12135         * Makefile: Adjust accordingly.
12136         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12137         * cleanup_defer.c: Use CANCELLATION_P.
12138         * pthread_testcancel.c: Likewise.
12139         * descr.h: Fix spelling in comments.
12140         * init.c: Likewise.
12141         * pthread_getattr_np.c: Likewise.
12142         * pthread_getschedparam.c: Likewise.
12143         * pthread_setschedparam.c: Likewise.
12144         * Versions: Likewise.
12145
12146         * pt-pselect.c: New file.
12147         * Makefile (libpthread-routines): Add pt-pselect.
12148         * Versions: Add pselect.
12149
12150         * tst-cancel4.c: New file.
12151         * Makefile (tests): Add tst-cancel4.
12152
12153 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12154
12155         * pthread_mutex_lock.c: Always record lock ownership.
12156         * pthread_mutex_timedlock.c: Likewise.
12157         * pthread_mutex_trylock.c: Likewise.
12158
12159         * pt-readv.c: New file.
12160         * pt-writev.c: New file.
12161         * pt-creat.c: New file.
12162         * pt-msgrcv.c: New file.
12163         * pt-msgsnd.c: New file.
12164         * pt-poll.c: New file.
12165         * pt-select.c: New file.
12166         * pt-sigpause.c: New file.
12167         * pt-sigsuspend.c: New file.
12168         * pt-sigwait.c: New file.
12169         * pt-sigwaitinfo.c: New file.
12170         * pt-waitid.c: New file.
12171         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12172         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12173         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12174         * Versions: Add all the new functions.
12175
12176         * tst-exit1.c: New file.
12177         * Makefile (tests): Add tst-exit1.
12178
12179         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12180
12181 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12182
12183         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12184
12185         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12186         call.  pthread_join is an official cancellation point.
12187         * pthread_timedjoin.c: Likewise.
12188
12189         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12190         and the condvar's mutex are retrieved.
12191         * pthread_cond_timedwait.c: Likewise.
12192         Reported by dice@saros.East.Sun.COM.
12193
12194 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12195
12196         * pthreadP.h: Cut out all type definitions and move them...
12197         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12198         * pthreadP.h: Include <internaltypes.h>.
12199
12200         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12201         performance tweaks.
12202
12203         * sem_trywait.c: Shuffle #includes around to get right order.
12204         * sem_timedwait.c: Likewise.
12205         * sem_post.c: Likewise.
12206         * sem_wait.c: Likewise.
12207
12208         * nptl 0.3 released.
12209
12210         * Makefile (tests): Add tst-signal3.
12211         * tst-signal3.c: New file.
12212
12213 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12214
12215         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12216         the asms modify the sem object.
12217         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12218
12219         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12220         the actual members.
12221         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12222         * semaphoreP.h: Include pthreadP.h.
12223         * sem_getvalue.c: Adjust to sem_t change.
12224         * sem_init.c: Likewise.
12225         * sem_open.c: Likewise.
12226         * sem_post.c: Likewise.
12227         * sem_timedwait.c: Likewise.
12228         * sem_trywait.c: Likewise.
12229         * sem_wait.c: Likewise.
12230
12231 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12232
12233         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12234         * tst-basic2.c: New file.
12235         * tst-exec1.c: New file.
12236         * tst-exec2.c: New file.
12237         * tst-exec3.c: New file.
12238
12239         * tst-fork1.c: Remove extra */.
12240
12241         * nptl 0.2 released.  The API for IA-32 is complete.