Move CL entry
[glibc.git] / nptl / ChangeLog
blob4c56f13609d9e261c90d81faaa93e39c94bc69d0
1 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
3         [BZ #14132]
4         * nptl-init.c (pthread_functions): Remove use of INTUSE and
5         _internal aliases.
6         (__pthread_initialize_minimal_internal): Likewise.
7         * sem_open.c: Likewise.
8         * sem_unlink.c: Likewise.
9         * pthreadP.h: Replace _internal aliases by hidden_proto
10         declarations.
11         * pthread_getspecific.c: Replace _internal alias by hidden_def.
12         * pthread_key_create.c: Likewise.
13         * pthread_mutex_destroy.c: Likewise.
14         * pthread_mutex_init.c: Likewise.
15         * pthread_mutex_lock.c: Likewise.
16         * pthread_mutex_unlock.c: Likewise.
17         * pthread_once.c: Likewise.
18         * pthread_rwlock_rdlock.c: Likewise.
19         * pthread_rwlock_unlock.c: Likewise.
20         * pthread_rwlock_wrlock.c: Likewise.
21         * pthread_setspecific.c: Likewise.
22         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
23         Likewise.
24         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
25         Likewise.
26         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
27         Likewise.
28         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
29         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
30         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
31         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
32         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
33         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
34         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
35         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
36         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
37         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
38         Likewise.
39         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
40         Likewise.
41         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
42         Likewise.
44 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
46         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
47         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
49         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
50         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
51         directives.
52         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
53         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
54         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
55         (pthread_barrier_wait): Likewise.
56         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
57         (__pthread_cond_broadcast): Likewise.
58         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
59         (__pthread_cond_signal): Likewise.
60         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
61         (__pthread_cond_timedwait): Likewise.
62         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
63         Likewise.
64         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
65         (__pthread_rwlock_rdlock): Likewise.
66         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
67         (pthread_rwlock_timedrdlock): Likewise.
68         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
69         (pthread_rwlock_timedwrlock): Likewise.
70         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
71         (__pthread_rwlock_unlock): Likewise.
72         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
73         (__pthread_rwlock_wrlock): Likewise.
74         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
75         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
76         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
77         Likewise.
78         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
80 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
82         [BZ #12416]
83         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
84         __libc_stack_end rounded to the end of containing page as the
85         real stack end.
87 2012-05-25  Rayson Ho  <rho@redhat.com>
89         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
90         probes for i386.
91         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
92         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
93         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
94         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
95         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
96         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
97         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
98         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
100 2012-05-25  Rayson Ho  <rho@redhat.com>
101             Roland McGrath  <roland@hack.frob.com>
103         * DESIGN-systemtap-probes.txt: New file.
104         * pthread_cond_broadcast.c: SystemTap probes.
105         * pthread_cond_init.c: Likewise.
106         * pthread_cond_signal.c: Likewise.
107         * pthread_cond_wait.c: Likewise.
108         * pthread_cond_destroy.c: Likewise.
109         * pthread_create.c: Likewise.
110         * pthread_join.c: Likewise.
111         * pthread_mutex_destroy.c: Likewise.
112         * pthread_mutex_init.c: Likewise.
113         * pthread_mutex_lock.c: Likewise.
114         * pthread_mutex_timedlock.c: Likewise.
115         * pthread_mutex_unlock.c: Likewise.
116         * pthread_rwlock_destroy.c: Likewise.
117         * pthread_rwlock_rdlock.c: Likewise.
118         * pthread_rwlock_unlock.c: Likewise.
119         * pthread_rwlock_wrlock.c: Likewise.
120         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
121         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
127         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
129 2012-05-24  Roland McGrath  <roland@hack.frob.com>
131         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
133 2012-05-17  Andreas Jaeger  <aj@suse.de>
135         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
136         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
137         only for older kernels.
139 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
141         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
142         not define.
144 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
146         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
147         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
148         (lll_robust_lock): Likewise.
149         (lll_cond_lock): Likewise.
150         (lll_robust_cond_lock): Likewise.
151         (lll_timedlock): Likewise.
152         (lll_robust_timedlock): Likewise.
153         (lll_unlock): Likewise.
154         (lll_robust_unlock): Likewise.
156 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
159         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
161 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
163         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
164         on NWAITERS.
165         (__gcc_personality_v0): Replace 8-byte data alignment with
166         LP_SIZE alignment and .quad with ASM_ADDR.
168 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
170         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
171         on NWAITERS.
172         (__gcc_personality_v0): Replace 8-byte data alignment with
173         LP_SIZE alignment and .quad with ASM_ADDR.
175 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
177         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
178         NWAITERS, which is unsigned long int.
180 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
182         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
183         (__gcc_personality_v0): Replace 8-byte data alignment with
184         LP_SIZE alignment and .quad with ASM_ADDR.
186 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
189         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
190         __vdso_clock_gettime pointer into RAX_LP.
191         (__gcc_personality_v0): Replace 8-byte data alignment with
192         LP_SIZE alignment and .quad with ASM_ADDR.
194 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
197         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
198         __vdso_clock_gettime pointer into RAX_LP.
199         (__gcc_personality_v0): Replace 8-byte data alignment with
200         LP_SIZE alignment and .quad with ASM_ADDR.
202 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
205         LP_OP(cmp) and R8_LP on dep_mutex pointer.
207 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
209         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
210         to update pointer in memory.  Load pointer into RDI_LP.
212 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
214         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
215         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
216         of 8.
217         (LLL_STUB_UNWIND_INFO_END): Likewise.
218         (lll_timedlock): Load timeout pointer into RDX_LP.
219         (lll_robust_timedlock): Likewise.
221 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
222             Jakub Jelinek  <jakub@redhat.com>
224         [BZ #13613]
225         * Makefile (tests): Add test cases.
226         * descr.h (struct pthread): Add a comment describing multiple_threads.
227         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
228         single-process case.
229         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
230         before setting cancelstate of the thread.
231         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
232         (__libc_multiple_threads): Add explanatory comment.
233         * tst-cancel-self-cancelstate.c: New test case.
234         * tst-cancel-self-canceltype.c: Likewise.
235         * tst-cancel-self-cleanup.c: Supporting file for test cases.
236         * tst-cancel-self-testcancel.c: New test case.
237         * tst-cancel-self.c: Likewise.
238         * vars.c: Expand comment to include single-process case.
240 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
242         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
243         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
244         to 32 bytes.
246 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
248         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
249         New.
250         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
251         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
253 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
255         * shlib-versions: Move x86_64-.*-linux.* entry to ...
256         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
257         * sysdeps/x86_64/x32/shlib-versions: New file.
259 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
261         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
262         __SIZEOF_PTHREAD_XXX_T.
263         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
264         (pthread_mutex_t): Likewise.
265         (pthread_rwlock_t): Likewise.
266         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
267         is defined.
269 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
271         * sysdeps/x86_64/x32/tls.h: New file.
273 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
275         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
276         integer.
277         (THREAD_SETMEM_NC): Likewise.
279 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
281         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
282         mov/%0.
284 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
286         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
287         (__cleanup_fct_attribute): Check __x86_64__ instead of
288         __WORDSIZE.
290 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
292         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
293         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
294         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
295         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
296         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
298 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
300         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
301         instead of __WORDSIZE.
303 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
305         [BZ #3748]
306         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
308 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
310         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
311         (__pthread_cond_timedwait): Use CFI directives.
312         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
313         (__pthread_cond_wait): Likewise.
314         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
315         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
317 2012-05-03  David S. Miller  <davem@davemloft.net>
319         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
320         always have to return 0, especially for the pthread_spin_init
321         alias.
322         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
323         newline.
324         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
325         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
327 2012-05-02  David S. Miller  <davem@davemloft.net>
329         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
330         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
331         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
332         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
333         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
334         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
335         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
336         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
337         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
338         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
339         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
340         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
341         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
342         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
343         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
344         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
345         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
346         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
348 2012-05-02  Allan McRae  <allan@archlinux.org>
350         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
351         (LDFLAGS-tst-cancel24): Likewise.
353 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
355         * sysdeps/i386/pthread_spin_lock.S: New.
356         * sysdeps/i386/pthread_spin_lock.c: Delete.
357         * sysdeps/x86_64/pthread_spin_lock.S: New.
358         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
360 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
362         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
363         run when cross-compiling.
365 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
367         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
368         instead of libgcc_s.h.
370 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
372         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
374 2012-03-27  David S. Miller  <davem@davemloft.net>
376         * tst-cond16.c (do_test): Use a thread stack size which is either
377         PTHREAD_STACK_MIN or the page size, whichever is larger.
378         * tst-cond18.c (do_test): Likewise.
380 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
382         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
383         register char * __asm__("rsp") to get stack frame.
385 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
387         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
388         __NR_futex directly.
390 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
392         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
393         _Unwind_Ptr first.
395 2012-03-16  David S. Miller  <davem@davemloft.net>
397         [BZ #13844]
398         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
399         instead of "...".
400         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
401         Delete, not needed.
403 2012-03-15  David S. Miller  <davem@davemloft.net>
405         [BZ #13844]
406         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
408 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
410         [BZ #13673]
411         * pt-crti.S: Replace FSF snail mail address with URL.
413 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
415         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
416         Do not define before including <time.h>.
418 2012-03-08  David S. Miller  <davem@davemloft.net>
420         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
422 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
424         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
425         Check for timestamp before the Epoch.
427         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
428         updating nwaiters.
430         * tst-sem13.c (do_test): Add another test case.
431         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
432         Fix updating nwaiters.
434 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
436         [BZ #10545]
437         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
438         link test to a compile test.
439         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
440         <stdio.h>.
441         * sysdeps/pthread/configure: Regenerated.
443 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
445         * Makefile (distribute): Remove variable.
447 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
449         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
450         superfluous assignment.
451         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
452         Likewise.
453         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
454         (sem_timedwait): Likewise.
456 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
458         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
459         installed headers to...
460         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
462 2012-03-06  David S. Miller  <davem@davemloft.net>
464         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
465         atomic_increment and remove unused local variable.
466         (__old_sem_post): Likewise.
468 2012-02-27  David S. Miller  <davem@davemloft.net>
470         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
471         non-existing __pthread_attr.
472         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
473         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
474         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
475         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
478 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
480         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
482         * sysdeps/pthread/pthread.h: Define __need_timespec before including
483         <time.h>.
484         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
485         union.
486         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
487         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
488         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
489         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
490         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
492 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
494         [BZ #13695]
495         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
496         pt-initfini.s.
497         [crti.S not in sysdirs] (omit-deps): Do not append.
498         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
499         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
500         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
501         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
502         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
503         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
504         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
505         [crti.S in sysdirs] (extra-objs): Append unconditionally.
506         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
507         unconditionally.
508         * sysdeps/pthread/pt-initfini.c: Remove file.
510 2012-02-16  Richard Henderson  <rth@twiddle.net>
512         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
513         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
515 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
517         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
519 2012-02-16  David S. Miller  <davem@davemloft.net>
521         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
523 2012-02-15  Marek Polacek  <polacek@redhat.com>
525         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
527 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
529         Replace FSF snail mail address with URLs, as per GNU coding standards.
531 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
533         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
535 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
537         Support crti.S and crtn.S provided directly by architectures.
538         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
539         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
540         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
541         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
542         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
543         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
544         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
545         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
546         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
547         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
548         * pt-crti.S: New file.
549         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
551 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
554         macros for PIC register setup.
555         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
556         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
557         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
558         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
559         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
561 2012-01-11  Marek Polacek  <polacek@redhat.com>
563         * forward.c (FORWARD_NORETURN): Define macro.
564         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
565         (__pthread_exit): Likewise.
567 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
569         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
571         * pthreadP.h: Add noreturn to __pthread_exit.
572         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
574 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
576         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
577         Call pthread_attr_setstacksize() with result of
578         __pthread_get_minstack() to account for application TLS usage.
580 2012-01-08  Marek Polacek  <polacek@redhat.com>
582         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
584 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
586         [BZ #13553]
587         * pthreadP.h: Use const instead of __const.
588         * semaphore.h: Likewise.
589         * sysdeps/pthread/bits/libc-lock.h: Likewise.
590         * sysdeps/pthread/bits/sigthread.h: Likewise.
591         * sysdeps/pthread/pthread.h: Likewise.
593         * Makefile: Remove elf=yes test, only ELF is supported.
595         * shlib-versions: Remove entries for ports architectures.
597         In case anyone cares, the IA-64 architecture could move to ports.
598         * sysdeps/ia64/*: Removed.
599         * sysdeps/unix/sysv/linux/ia64/*: Removed.
601 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
603         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
604         __pthread_get_minstack.
605         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
607         [BZ #13088]
608         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
609         through __pthread_get_minstack.
610         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
611         directly from _rtld_global_ro.
612         (__pthread_get_minstack): New function.
613         * pthreadP.h: Declare __pthread_get_minstack.
614         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
616 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
618         [BZ #13515]
619         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
620         Correct reading name from file.
622 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
624         * allocatestack.c (allocate_stack): Return errno on failure.
626 2011-12-14  Jeff Law  <law@redhat.com>
628         [BZ #5245]
629         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
631 2011-11-28  Andreas Schwab  <schwab@redhat.com>
633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
634         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
635         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
637 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
639         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
640         /proc/self/maps.
642 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
644         [BZ #13358]
645         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
646         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
647         path for kernels with FUTEX_CLOCK_REALTIME.
648         Debugged by H.J. Lu <hjl.tools@gmail.com>.
650 2011-10-27  Andreas Schwab  <schwab@redhat.com>
652         [BZ #13344]
653         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
654         for memory synchronization functions.
655         * semaphore.h: Likewise.
657 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
659         * tst-cancel7.c: Avoid warning.
660         * tst-mutex6.c: Likewise.
661         * tst-mutex9.c: Likewise.
662         * tst-mutexpi6.c: Likewise.
664 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
666         * sysdeps/i386/tls.h: Remove #include <list.h>.
668 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
670         * pthread_create.c (start_thread): Call __ctype_init.
672 2011-09-15  Andreas Schwab  <schwab@redhat.com>
674         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
675         defined.
676         (list_add): Add atomic_write_barrier.
677         * descr.h: Define __need_list_t before including <list.h>.
678         * nptl-init.c: Include <list.h>
679         * allocatestack.c: Likewise.
681 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
683         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
684         * sysdeps/ia64/tls.h: Likewise.
685         * sysdeps/powerpc/tls.h: Likewise.
686         * sysdeps/s390/tls.h: Likewise.
687         * sysdeps/sh/tls.h: Likewise.
688         * sysdeps/sparc/tls.h: Likewise.
689         * sysdeps/x86_64/tls.h: Likewise.
691 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
693         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
695         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
696         !USE___THREAD.
697         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
698         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
699         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
700         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
701         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
702         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
703         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
704         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
705         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
706         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
707         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
708         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
710         * tst-tls1.c: Support for __thread is now mandatory.
711         * tst-tls2.c: Likewise.
712         * tst-tls3.c: Likewise.
713         * tst-tls3mod.c: Likewise.
714         * tst-tls4.c: Likewise.
715         * tst-tls4moda.c: Likewise.
716         * tst-tls4modb.c: Likewise.
717         * tst-tls5.h: Likewise.
719 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
721         [BZ #12403]
722         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
723         (pthread_rwlock_timedwrlock): Use correct macro in test.
724         Patch by H.J. Lu <hongjiu.lu@intel.com>.
726 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
728         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
729         use gettimeofday vsyscall, just call gettimeofday.
730         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
731         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
732         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
733         Likewise.
734         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
735         Likewise.
736         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
737         Simplify __vdso_clock_gettime use.
739 2011-09-05  David S. Miller  <davem@davemloft.net>
741         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
742         New function.
743         (sem_timedwait): Call it to force an exception region around
744         the async cancel enable and the futex operation.
745         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
746         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
747         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
748         (__new_sem_wait): Call it to force an exception region around
749         the async cancel enable and the futex operation.
750         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
751         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
753 2011-08-31  Andreas Schwab  <schwab@redhat.com>
755         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
756         thread is woken up.
758 2011-08-20  David S. Miller  <davem@davemloft.net>
760         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
762 2011-08-14  Roland McGrath  <roland@hack.frob.com>
764         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
765         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
767 2011-08-08  Andreas Schwab  <schwab@redhat.com>
769         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
770         stack.
771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
772         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
774 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
776         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
777         barrier.
778         (__gcc_personality_v0): Likewise.
779         (_Unwind_ForcedUnwind): Likewise.
780         (_Unwind_GetCFA): Likewise.
782 2011-07-14  Roland McGrath  <roland@hack.frob.com>
784         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
785         UINTMAX_C.
787 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
789         * nptl-init.c (__nptl_set_robust): New function.
790         (pthread_functions): Add reference.
791         * npthreadP.h: Declare __nptl_set_robust.
792         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
793         ptr_set_robust member.
794         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
795         child if threads are used.
797 2011-06-14  Andreas Jaeger  <aj@suse.de>
799         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
801 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
803         [BZ #386]
804         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
806 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
808         [BZ #12650]
809         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
810         clearing memory.
811         Patch partly by Robert Rex <robert.rex@exasol.com>.
813 2011-01-19  Roland McGrath  <roland@redhat.com>
815         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
816         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
817         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
818         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
819         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
820         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
822 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
824         * Makefile (test-extras): Add tst-cleanup4aux.
826 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
828         [BZ #10563]
829         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
830         (__SETXID_2): Likewise.
831         (__SETXID_3): Likewise.
833 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
835         [BZ #10484]
836         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
837         * alloca_cutoff.c: Add libc_hidden_def.
839 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
841         [BZ #12113]
842         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
843         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
844         of "struct pthread".
846 2010-09-21  Andreas Schwab  <schwab@redhat.com>
848         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
849         [!__EXCEPTIONS]: Mangle local variable not_first_call.
850         (pthread_cleanup_push_defer_np): Likewise.
852 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
854         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
855         small.
857 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
858             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
861         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
863 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
865         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
867 2010-05-01  Alan Modra  <amodra@gmail.com>
869         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
870         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
871         to save temps.  Correct cfi for possible later frame manipulation.
872         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
873         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
874         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
875         (DOCARGS_6, UNDOCARGS_6): Likewise.
876         (CENABLE, CDISABLE): Add nops for non-shared calls.
878 2010-07-06  Andreas Schwab  <schwab@redhat.com>
880         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
881         Fix type mismatch.
883 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
885         * tst-abstime.c (do_test): Some more cleanups
887 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
889         * tst-abstime.c: Correct testing and add test for sem_timedwait.
891 2010-07-01  Andreas Schwab  <schwab@redhat.com>
892             Ulrich Drepper  <drepper@redhat.com>
894         * Makefile (tests): Add tst-abstime.
895         * tst-abstime.c: New file.
896         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
897         (__lll_timedlock_wait): Check for timestamp before the Epoch.
898         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
899         (__lll_timedlock_wait): Likewise.
900         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
901         (__lll_robust_timedlock_wait): Likewise.
902         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
903         (__pthread_cond_timedwait): Likewise.
904         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
905         (pthread_rwlock_timedrdlock): Likewise.
906         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
907         (pthread_rwlock_timedwrlock): Likewise.
908         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
909         Likewise.
911 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
913         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
915 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
917         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
918         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
920 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
922         [BZ #11390]
923         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
924         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
925         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
926         pthread_setname.
927         * Makefile (libpthread-routines): Add pthread_getname and
928         pthread_setname.
929         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
931 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
933         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
934         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
935         * sysdeps/pthread/Makefile: Remove csu section and rt section's
936         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
938 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
940         * pthread_cond_timedwait.c: Add check for
941         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
942         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
943         INTERNAL_SYSCALL.
945 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
947         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
948         and the call fails wake eventually waiting setxid threads.  Don't free
949         stack here if we try starting a thread.
950         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
951         if the clone call failed.
953 2010-03-08  Andreas Schwab  <schwab@redhat.com>
955         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
956         * allocatestack.c (get_cached_stack): Set setxid_futex.
957         (allocate_stack): Likewise.
959 2010-03-05  Andreas Schwab  <schwab@redhat.com>
960             Ulrich Drepper  <drepper@redhat.com>
962         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
963         it is creating a thread or it is just being created.
964         * pthread_create.c (start_thread): Wake setxid thread if it is
965         waiting.
966         (__pthread_create_2_1): Initialize setxid_futex.
967         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
968         is waiting.
970 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
973         Fix unwind info.
974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
976 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
979         Fix pthread_cond_timedwait with requeue-PI.
980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
981         Fix pthread_cond_wait with requeue-PI.
983 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
985         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
986         and pthread_mutexattr_setrobust for GLIBC_2.12.
987         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
988         * pthread_mutexattr_getrobust.c: Define alias
989         pthread_mutexattr_getrobust.
990         * pthread_mutexattr_setrobust.c: Define alias
991         pthread_mutexattr_setrobust.
993 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
995         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
997 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
999         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1001 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1003         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1004         call __gmon_start__.
1005         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1007 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1009         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1010         using memset.
1012 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1014         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1015         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1016         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1017         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1018         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1020         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1023 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1025         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1026         Don't update nwaiters after invalid timeout is recognized.
1028 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1030         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1031         __gmon_start__.
1033 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1035         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1036         THREAD_SELF->cancelhandling after returning from futex call.
1038 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1040         * tst-sem13.c: New file.
1041         * Makefile (tests): Add tst-sem13.
1043 2009-11-22  Roland McGrath  <roland@redhat.com>
1045         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1046         instead of recapitulating its contents.
1048 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1051         optimizations and cleanups.
1053 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1056         Remove redundant code. Fix cfi offsets.
1057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1058         Fix cfi offsets.
1060 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1062         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1063         reduce size of unwind info.
1065         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1066         cfi directives.
1067         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1068         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1070 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1072         [BZ #4457]
1073         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1074         LIBGCC_S_SO.
1075         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1077 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1079         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1081         [BZ #3270]
1082         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1083         steps to avoid races with creation and terminations.
1084         * nptl-init.c (sighandler_setxid): Adjust.
1085         Patch by Daniel Jacobowitz.
1087 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1089         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1091 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1092             Joseph Myers  <joseph@codesourcery.com>
1094         [BZ #7094]
1095         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1096         Initialize the sigev_notify field for newly created timer to make sure
1097         the timer gets deleted from the active timer's list upon timer_delete.
1099 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1101         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1102         Correct a logic error.
1104 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1106         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1107         of the field in local variables.
1108         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1109         variable and don't unconditionally clear it.
1111 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1113         * pthread_create.c (start_thread): Hint to the kernel that memory for
1114         the stack can be reused.  We do not mark all the memory.  The part
1115         still in use and some reserve are kept.
1117 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1119         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1121 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1124         directives.
1126 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1129         directives.
1130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1132 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1135         (__pthread_cond_signal): Don't clobber register used for syscall
1136         number.
1138 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1140         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1141         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1143         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1144         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1145         register.
1147 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1149         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1150         enabled by the special *_asynccancel functions.
1151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1154         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1156 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1158         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1159         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1160         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1161         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1162         since we can assume the special __*_{en,dis}able_asynccancel
1163         functions.
1164         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1165         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1166         and PTHREAD_CANCELED.
1168 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1170         * descr.h: Better definition of *_BITMASK macros for cancellation.
1172 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1174         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1176         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1177         dynamic linker might have to save.
1178         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1179         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1180         printing.
1182         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1184 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1186         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1187         New function.
1188         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1189         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1191         requeue_pi for robust mutexes.
1192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1194         Don't only skip __pthread_mutex_cond_lock.  Call instead
1195         __pthread_mutex_cond_lock_adjust.
1196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1198         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1199         optimization of PI mutex handling.
1201 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1203         [BZ #10418]
1204         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1205         instead of of _acq variants of cmpxchg.
1207 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1209         * sysdeps/x86_64/configure.in: New file.
1211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1212         path when not using absolute timeout futex.
1214 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1216         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1217         optimizations of last changes.
1218         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1220 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1222         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1223         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1224         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1225         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1228         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1232         (__pthread_cond_timedwait): Make more robust.
1234 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1236         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1237         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1238         directly use absolute timeout.
1240         * tst-sem5.c (do_test): Add test for premature timeout.
1241         * Makefile: Linu tst-sem5 with librt.
1243         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1244         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1245         directly use absolute timeout.
1246         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1247         (pthread_rwlock_timedrdlock): Likewise.
1249         * tst-cond11.c (run_test): Add test to check that the timeout is
1250         long enough.
1252         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1253         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1254         directly use absolute timeout.
1256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1257         (__pthread_cond_wait): Convert to using exception handler instead of
1258         registered unwind buffer.
1259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1260         (__pthread_cond_timedwait): Likewise.
1262 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1264         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1265         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1266         use absolute timeout.
1268         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1269         handling of uncontested semaphore.
1271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1272         (__condvar_cleanup): Rewrite to use cfi directives instead of
1273         hand-coded unwind tables.
1274         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1275         Likewise.
1276         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1277         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1278         Likewise.
1280 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1282         * Makefile (libpthread-routines): Add pthread_sigqueue.
1283         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1284         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1285         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1287 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1289         [BZ #10262]
1290         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1291         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1292         cannot be assumed.
1293         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1295 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1297         * libc-cancellation.c: Move __libc_cleanup_routine to...
1298         * libc-cleanup.c: ...here.  New file.
1299         * Makefile (routines): Add libc-cleanup.
1301         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1302         test.
1303         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1304         * sysdeps/pthread/librt-cancellation.c: Likewise.
1306         [BZ #9924]
1307         * nptl-init.c: Renamed from init.c.
1308         * Makefile: Change all occurences of init.c to nptl-init.c.
1310 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1312         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1313         to test when deciding on the delay.
1314         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1315         * pthread_cancel.c: Close race between deciding on sending a signal
1316         and setting the CANCELING_BIT bit.
1318         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1319         thread is canceled.
1320         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1322 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1324         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1325         is available.
1326         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1327         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1328         * sysdeps/i386/tls.h: Likewise.
1329         (tcbhead_t): Add __private_tm member.
1331 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1333         * sem_open.c (sem_open): Rewrite initialization of initsem to
1334         avoid warnings.
1336         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1337         Avoid warning by using may_alias attribute on ptrhack.
1339 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1341         [BZ #10090]
1342         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1343         Check policy and priority for validity.
1344         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1346 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1349         (__pthread_cond_timedwait): Change to use cfi directives instead of
1350         hand-coded unwind sections.
1352 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1354         * init.c (nptl_freeres): Compile only for SHARED.
1356 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1358         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1359         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1360         FUTEX_BITSET_MATCH_ANY.
1362 2009-02-27  Roland McGrath  <roland@redhat.com>
1364         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1365         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1367 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1369         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1370         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1371         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1372         200112L to 200809L.
1374 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1376         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1377         POSIX 2008.
1379 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1381         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1382         Unify name of include protector macro.
1384 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1386         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1387         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1389 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1391         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1392         pointer variables.
1394         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1395         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1396         * init.c (nptl_freeres): New function.
1397         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1398         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1399         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1400         variable.
1401         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1402         load DSO.  Assign last.
1403         (__unwind_freeres): New function.
1405         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1406         for better debugging.  No need to use stack_list_add here.
1408 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1410         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1411         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1412         instead of computing relative timeout.
1413         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1414         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1416 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1418         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1420 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1422         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1423         (list_add_tail): Removed.
1425 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1427         * (in_flight_stack): New variable.
1428         (stack_list_del): New function.  Use instead of list_del.
1429         (stack_list_add): New function.  Use instead of list_add when adding to
1430         stack_cache and stack_used lists.
1431         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1432         when the fork call interrupted another thread.
1434 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1436         * init.c (__pthread_initialize_minimal_internal): Optimize test
1437         FUTEX_CLOCK_REALTIME a bit.
1439 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1441         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1442         only passing five parameters to FUTEX_WAIT_BITSET call.
1444         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1445         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1446         instead of computing relative timeout.
1448 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1450         * init.c (__pthread_initialize_minimal_internal): Check for
1451         FUTEX_CLOCK_REALTIME flag.
1452         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1453         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1454         relative timeout.
1456         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1457         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1458         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1459         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1460         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1461         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1463 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1465         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1466         loop body instead of ; to avoid gcc warnings.
1467         (pthread_cleanup_pop_restore_np): Likewise.
1468         Patch by Caolán McNamara <caolanm@redhat.com>.
1470 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1472         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1473         fast path here, for robust/PI/PP mutexes call
1474         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1475         of ifs according to their probability.
1476         (__pthread_mutex_lock_full): New function.
1477         * pthread_mutex_unlock.c: Include assert.h.
1478         (__pthread_mutex_unlock_usercnt): Handle only the
1479         fast path here, for robust/PI/PP mutexes call
1480         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1481         of ifs according to their probability.
1482         (__pthread_mutex_unlock_full): New function.
1483         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1484         (__pthread_mutex_lock_full): Define.
1486 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1488         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1489         implementation.  Add necessary padding and.
1490         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1491         words.
1493 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1495         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1496         and FUTEX_WAKE_BITSET.
1498 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1500         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1501         and FUTEX_WAKE_BITSET.
1502         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1503         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1504         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1505         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1507 2008-11-25  Roland McGrath  <roland@redhat.com>
1509         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1510         Subdirectories moved to ports repository as
1511         sysdeps/.../nptl subdirectories.
1513 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1515         [BZ #7008]
1516         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1517         of old value.
1518         * pthread_cond_init.c (__pthread_cond_init): Fix
1519         cond->__data.__nwaiters initialization.
1520         * Makefile (tests): Add tst-cond23.
1521         * tst-cond23.c: New test.
1523 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1525         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1526         arguments.
1527         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1528         arguments.
1530 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1532         [BZ #6955]
1533         * pthread_mutex_lock.c: Add support for private PI mutexes.
1534         * pthread_mutex_timedlock.c: Likewise.
1535         * pthread_mutex_trylock.c: Likewise.
1536         * pthread_mutex_unlock.c: Likewise.
1537         Patch mostly by Ben Jackson <ben@ben.com>.
1539 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1541         [BZ #6843]
1542         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1543         Increase stack size for helper thread.
1545 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1547         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1548         assembly with a clobber list for access registers a0 and a1.
1550 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1552         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1553         to force runp->refcntr to be read from memory.
1555 2008-09-08  Richard Guenther  <rguenther@suse.de>
1557         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1558         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1559         lll_timedlock, lll_robust_timedlock, lll_unlock,
1560         lll_robust_unlock): Promote private to int.
1562 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1564         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1565         ARCH_RETRY_MMAP definitions.
1566         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1567         Define MAP_STACK when not defined.
1568         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1569         handling of ARCH_RETRY_MMAP.
1571 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1573         * tst-align2.c (f): Print message that f is reached.
1575 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1577         [BZ #6740]
1578         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1579         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1581 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1583         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1584         SOCK_CLOEXEC if possible.
1586 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1588         * Makefile (tests): Add tst-rwlock2a.
1589         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1590         * tst-rwlock2a.c: New file.
1592 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1594         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1596 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1598         * sysdeps/pthread/pthread.h: Fix typo in comment.
1600 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1602         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1603         of CPU set to the kernel.
1605 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1607         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1608         cfi directives.
1609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1613         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1614         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1616 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1618         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1619         cfi directives.
1620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1621         Likewise.
1622         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1623         Likewise.
1624         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1625         Likewise.
1627 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1629         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1631 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1633         David S. Miller  <davem@davemloft.net>
1635         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1637 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1639         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1640         __pshared correctly.
1641         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1642         Likewise.
1643         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1644         Likewise.
1645         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1646         Likewise.
1647         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1648         Likewise.
1649         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1651 2008-04-14  David S. Miller  <davem@davemloft.net>
1653         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1654         (__old_sem_wait): Fix argument to lll_futex_wait().
1656 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1658         * pthread_create.c: Require pthread_mutex_trylock and
1659         pthread_key_delete for libgcc.
1661 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1663         [BZ #6020]
1664         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1665         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1666         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1668 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1670         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1671         <linux/limits.h> has defined it.
1672         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1673         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1674         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1675         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1677 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1679         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1680         of ASSEMBLER.
1681         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1682         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1684 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1686         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1687         HAVE_DL_DISCOVER_OSVERSION.
1688         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1689         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1691 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1693         [BZ #5778]
1694         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1695         _POSIX_CHOWN_RESTRICTED value to zero.
1697 2008-01-31  Roland McGrath  <roland@redhat.com>
1699         * Makefile (omit-deps): Variable removed.
1701 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1703         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1704         unnecessary addr32 prefix.
1706 2008-01-29  Roland McGrath  <roland@redhat.com>
1708         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1710 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1712         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1714 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1716         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1717         a scratch register.
1718         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1719         (__lll_lock_wait_private): Fix typo.
1720         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1721         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1722         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1723         Adjust XADD use.
1724         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1725         (pthread_rwlock_timedrdlock): Return correct return value.
1726         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1727         (pthread_rwlock_timedwrlock): Likewise.
1729 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1731         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1732         thread returns the program exits with an error code.
1734 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1736         * pthread-errnos.sym: Add EOVERFLOW.
1737         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1738         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1739         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1740         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1742 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1744         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1745         parameter.  Passed it as permission to mmap.
1746         * allocatestack.c (allocate_stack): Pass prot as second parameter
1747         to ARCH_RETRY_MMAP.
1749 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1751         * tst-basic7.c: Allocate memory for the stack.
1753         [BZ #5465]
1754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1755         (__pthread_cond_timedwait): Don't use VDSO.
1756         Patch by Michal Januszewski.
1758 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1760         [BZ #5455]
1761         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1762         Allow label before pthread_cleanup_pop.
1763         (pthread_cleanup_pop_restore_np): Likewise.
1765 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1767         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1768         Store 2 before returning ETIMEDOUT.
1770 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1772         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1773         Store 2 before returning ETIMEDOUT.
1774         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1775         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1776         (__lll_lock_wait_private): Optimize.
1777         (__lll_lock_wait): Likewise.
1779 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1781         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1782         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1783         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1785 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
1787         [BZ #5240]
1788         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1789         If we time out, try one last time to lock the futex to avoid
1790         losing a wakeup signal.
1791         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1792         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1794         [BZ #5245]
1795         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1796         if necessary.
1798 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
1800         [BZ #5245]
1801         * allocatestack.c (allocate_stack): Change ENOMEM error in case
1802         mmap failed to EAGAIN.
1803         * Makefile (tests): Add tst-basic7.
1804         * tst-basic7.c: New file.
1806 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
1808         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1809         Use __linkin_atfork.
1811 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1813         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1814         missing line continuations.
1815         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1816         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1818 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1820         [BZ #5220]
1821         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1822         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1823         (struct timer): Add next element.
1824         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1825         enqueue timer structure into __active_timer_sigev_thread list.
1826         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1827         remove timer struct from __active_timer_sigev_thread.
1828         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1829         Before using timer structure make sure it is still on the
1830         __active_timer_sigev_thread list.  Keep lock until done.
1831         Define __active_timer_sigev_thread and
1832         __active_timer_sigev_thread_lock.
1834 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
1836         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1837         Redefine thread_atfork for use of ATFORK_MEM.
1838         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1839         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1840         function.
1841         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1842         Use atomic operation when removing first element of list.
1844 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
1846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1847         routine instead of an alias to __new_sem_post.
1849 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1851         * init.c (__pthread_initialize_minimal): Initialize word to appease
1852         valgrind.
1854 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1856         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1857         libc.so just clear NAME.
1858         (__libc_rwlock_fini): Nop inside of libc.so.
1859         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1860         all zeros.
1862 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1864         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1865         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1866         unlocking failed.
1867         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1869 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1871         [BZ #4938]
1872         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1873         reclaimed stack if necessary.
1874         * Makefile (tests): Add tst-tsd6.
1875         * tst-tsd6.c: New file.
1877 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1879         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1880         Add private argument.
1882 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1885         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1887 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1889         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1890         (__lll_robust_timedlock): Pass private as last argument to
1891         __lll_robust_timedlock_wait.
1892         (__lll_unlock): Fix a pasto.
1894 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1896         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1897         sparc_old_sem): New structs.
1898         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1899         (__sem_wait_cleanup): New function.
1900         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1901         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1902         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1903         lll_futex_wait.
1904         (__old_sem_wait): New function.
1905         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1906         nptl/sysdeps/unix/sysv/linux/sparc version.
1907         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1908         Likewise.
1909         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1910         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1911         (__new_sem_trywait): Use sparc_old_sem structure.
1912         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1913         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1914         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1915         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1916         lll_futex_timed_wait.
1917         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1918         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1919         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1920         lll_futex_wake.
1921         (__old_sem_post): New function.
1922         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1923         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1924         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1925         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1926         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1927         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1929 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1931         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1932         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1933         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1934         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1935         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1936         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1937         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1938         Use FUTEX_WAKE_OP.
1939         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1940         kernel-features.h and tcb-offsets.h.
1941         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1942         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1943         process private.
1944         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1945         tcb-offsets.h.
1946         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1947         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1948         process private.
1949         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1950         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1953         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1957 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1959         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1960         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1961         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1962         lll_futex_timed_wait.
1964         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1965         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1966         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1967         __lll_robust_unlock, __lll_wait_tid): Likewise.
1969 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1971         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1972         Fix a pasto.
1973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1974         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1975         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1976         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1978         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1979         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1981         kernel-features.h.
1982         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1983         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1984         process private.  Switch DW_CFA_advance_loc1 and some
1985         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1986         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1987         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1988         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1989         process private.  Switch DW_CFA_advance_loc{1,2} and some
1990         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1991         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1992         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1993         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1994         Likewise.
1995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1998         Likewise.
1999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2000         (__pthread_cond_broadcast): Compare %r8 instead of
2001         dep_mutex-cond_*(%rdi) with $-1.
2002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2003         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2004         of oring.
2006 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2008         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2010 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2012         * allocatestack.c: Include kernel-features.h.
2013         * pthread_create.c: Likewise.
2014         * pthread_mutex_init.c: Likewise.
2015         * init.c: Likewise.
2016         * pthread_cond_timedwait.c: Likewise.
2017         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2018         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2019         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2020         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2021         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2023         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2024         Likewise.
2025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2026         Likewise.
2027         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2028         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2029         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2030         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2032 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2034         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2035         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2036         byte elements.  One of them is the new __shared element.
2037         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2038         adjust names of other padding elements.
2039         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2040         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2041         byte elements.  One of them is the new __shared element.
2042         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2043         adjust names of other padding elements.
2044         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2045         Renamed __pad1 element to __shared, adjust names of other padding
2046         elements.
2047         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2048         (pthread_rwlock_t): Likewise.
2049         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2050         typo.
2052 2007-08-09  Anton Blanchard  <anton@samba.org>
2054         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2056 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2058         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2059         <kernel-features.h>.
2060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2062 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2064         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2065         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2066         dealing with robust mutexes.
2067         * pthread_mutex_timedlock.c: Likewise.
2068         * pthread_mutex_trylock.c: Likewise.
2069         * pthread_mutex_unlock.c: Likewise.
2070         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2072 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2074         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2075         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2076         (PTHREAD_MUTEX_PSHARED): Define.
2077         * pthread_mutex_init.c (__pthread_mutex_init): Set
2078         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2079         mutexes.
2080         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2081         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2082         as second argument to lll_lock.
2083         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2084         instead of its __data.__lock field.
2085         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2086         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2087         to lll_robust_lock.
2088         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2089         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2090         instead of mutex->__data.__kind directly, pass
2091         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2092         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2093         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2094         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2095         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2096         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2097         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2098         of mutex->__data.__kind directly.
2099         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2100         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2101         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2102         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2103         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2104         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2105         and lll_futex_wake.
2106         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2107         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2108         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2109         directly.
2110         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2111         Take mutex as argument instead of its __data.__lock field, pass
2112         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2113         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2114         __data.__lock field.
2115         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2116         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2117         to lll_robust_cond_lock.
2118         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2119         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2120         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2121         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2122         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2123         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2124         lll_futex_wait.
2125         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2126         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2127         lll_futex_wake.
2128         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2129         pshared variable, pass it to lll_lock, lll_unlock,
2130         lll_futex_timedwait and lll_futex_wake.
2131         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2132         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2133         and lll_futex_wake.
2134         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2135         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2136         macro.
2137         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2138         lll_futex_wake_unlock): Likewise.
2139         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2140         Likewise.
2141         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2142         lll_futex_wake_unlock): Likewise.
2143         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2144         Likewise.
2145         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2146         lll_futex_wake_unlock): Likewise.
2147         (lll_futex_wake): Fix a typo.
2148         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2149         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2150         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2151         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2152         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2154         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2155         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2157         (__pthread_cond_timedwait): Likewise.
2158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2159         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2161 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2163         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2164         Don't use CGOTSETUP and CGOTRESTORE macros.
2165         (CGOTSETUP, CGOTRESTORE): Remove.
2166         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2167         @local symbol.
2169 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2171         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2172         definitions for private futexes.
2173         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2174         kernel-features.h and lowlevellock.h.  Use private futexes if
2175         they are available.
2176         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2177         (__lll_mutex_lock_wait): Rename to
2178         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2179         (__lll_mutex_timedlock_wait): Rename to ...
2180         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2181         Don't compile in for libc.so.
2182         (__lll_mutex_unlock_wake): Rename to ...
2183         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2184         (__lll_timedwait_tid): Use __NR_gettimeofday.
2185         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2186         the header from assembler.  Renamed all lll_mutex_* resp.
2187         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2188         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2189         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2190         Define.
2191         (__lll_lock_wait_private): Add prototype.
2192         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2193         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2194         __lll_unlock_wake): Likewise.
2195         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2196         if private is constant LLL_PRIVATE.
2197         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2198         lll_timedlock, lll_robust_timedlock): Add private argument.
2199         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2200         if private is constant LLL_PRIVATE.
2201         (lll_robust_unlock, lll_robust_dead): Add private argument.
2202         (lll_lock_t): Remove.
2203         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2204         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2205         lll_cond_wake, lll_cond_broadcast): Remove.
2206         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2207         kernel-features.h and lowlevellock.h.
2208         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2209         (LOAD_FUTEX_WAIT): Define.
2210         (__lll_robust_mutex_lock_wait): Rename to ...
2211         (__lll_robust_lock_wait): ... this.  Add private argument.
2212         Use LOAD_FUTEX_WAIT macro.
2213         (__lll_robust_mutex_timedlock_wait): Rename to ...
2214         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2215         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2216         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2217         lowlevellock.h.
2218         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2219         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2220         __lll_mutex_{lock,unlock}_*.
2221         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2222         lowlevellock.h and pthread-errnos.h.
2223         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2224         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2225         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2226         __lll_mutex_{lock,unlock}_*.
2227         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2228         lowlevellock.h and pthread-errnos.h.
2229         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2230         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2231         __lll_mutex_{lock,unlock}_*.
2232         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2233         lowlevellock.h.
2234         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2235         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2236         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2237         (__condvar_tw_cleanup): Likewise.
2238         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2239         lowlevellock.h.
2240         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2241         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2242         __lll_mutex_{lock,unlock}_*.
2243         ( __condvar_w_cleanup): Likewise.
2244         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2245         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2247         lowlevellock.h.
2248         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2249         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2250         __lll_mutex_{lock,unlock}_*.
2251         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2252         lowlevellock.h.
2253         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2254         FUTEX_PRIVATE_FLAG): Remove.
2255         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2256         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2257         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2258         lowlevellock.h.
2259         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2260         FUTEX_PRIVATE_FLAG): Remove.
2261         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2262         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2263         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2264         lowlevellock.h.
2265         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2266         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2267         __lll_mutex_{lock,unlock}_*.
2268         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2269         lowlevellock.h.
2270         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2271         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2272         __lll_mutex_{lock,unlock}_*.
2273         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2274         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2275         (__new_sem_post): Use standard initial exec code sequences.
2276         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2277         lowlevellock.h.
2278         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2279         FUTEX_PRIVATE_FLAG): Remove.
2280         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2281         exec code sequences.
2282         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2283         (__new_sem_trywait): Use standard initial exec code sequences.
2284         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2285         (__new_sem_wait): Use standard initial exec code sequences.
2287 2007-07-31  Anton Blanchard  <anton@samba.org>
2289         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2290         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2291         atomic_full_barrier.
2293 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2295         * allocatestack.c (stack_cache_lock): Change type to int.
2296         (get_cached_stack, allocate_stack, __deallocate_stack,
2297         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2298         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2299         as second argument to lll_lock and lll_unlock macros on
2300         stack_cache_lock.
2301         * pthread_create.c (__find_in_stack_list): Likewise.
2302         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2303         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2304         as second argument.
2305         * descr.h (struct pthread): Change lock and setxid_futex field
2306         type to int.
2307         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2308         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2309         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2310         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2311         Likewise.
2312         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2313         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2314         * pthreadP.h (__attr_list_lock): Change type to int.
2315         * pthread_attr_init.c (__attr_list_lock): Likewise.
2316         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2317         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2318         lll_{,un}lock.
2319         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2320         also for lll_futex_{wake,wait}.
2321         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2322         a pointer to const.
2323         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2324         LLL_SHARED as second argument to lll_{,un}lock.
2325         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2326         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2327         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2328         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2329         Likewise.
2330         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2331         as second argument to lll_{,un}lock macros on pd->lock.
2332         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2333         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2334         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2335         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2336         Likewise.
2337         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2338         Likewise.
2339         * pthread_once.c (once_lock): Change type to int.
2340         (__pthread_once): Pass LLL_PRIVATE as second argument to
2341         lll_{,un}lock macros on once_lock.
2342         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2343         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2344         rwlock->__data.__shared as second argument to them and similarly
2345         for lll_futex_w*.
2346         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2347         Likewise.
2348         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2349         Likewise.
2350         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2351         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2352         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2353         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2354         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2355         to lll_{,un}lock macros on __sem_mappings_lock.
2356         * sem_open.c (check_add_mapping): Likewise.
2357         (__sem_mappings_lock): Change type to int.
2358         * semaphoreP.h (__sem_mappings_lock): Likewise.
2359         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2360         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2361         instead of lll_*mutex_*, pass LLL_SHARED as last
2362         argument.
2363         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2364         pass LLL_SHARED as last argument.
2365         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2366         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2367         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2368         pass LLL_SHARED as last argument.
2369         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2370         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2371         LLL_SHARED as last argument.
2372         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2373         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2374         Similarly.
2375         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2376         __libc_lock_lock_recursive, __libc_lock_unlock,
2377         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2378         argument to lll_{,un}lock.
2379         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2380         _IO_lock_unlock): Likewise.
2381         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2382         compound literal.
2383         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2384         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2385         __fork_lock.
2386         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2387         free_mem): Likewise.
2388         (__fork_lock): Change type to int.
2389         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2390         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2391         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2392         lll_futex_wake.
2393         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2394         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2395         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2396         New function.
2397         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2398         pass it through to lll_futex_*wait, only compile in when
2399         IS_IN_libpthread.
2400         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2401         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2402         argument and pass it through to lll_futex_*wait.
2403         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2404         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2405         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2406         inline functions to __lll_* resp. __lll_robust_*.
2407         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2408         (lll_mutex_dead): Add private argument.
2409         (__lll_lock_wait_private): New prototype.
2410         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2411         __lll_robust_lock_timedwait): Add private argument to prototypes.
2412         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2413         call __lll_lock_wait_private, otherwise pass private to
2414         __lll_lock_wait.
2415         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2416         __lll_robust_timedlock): Add private argument, pass it to
2417         __lll_*wait functions.
2418         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2419         call __lll_unlock_wake_private, otherwise pass private to
2420         __lll_unlock_wake.
2421         (__lll_robust_unlock): Add private argument, pass it to
2422         __lll_robust_unlock_wake.
2423         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2424         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2425         argument, pass it through to __lll_* inline function.
2426         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2427         (lll_lock_t): Remove.
2428         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2429         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2430         lll_cond_wake, lll_cond_broadcast): Remove.
2431         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2432         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2433         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2434         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2435         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2436         the header from assembler.  Renamed all lll_mutex_* resp.
2437         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2438         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2439         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2440         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2441         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2442         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2443         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2444         Remove prototype.
2445         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2446         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2447         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2448         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2449         MULTIPLE_THREADS_OFFSET as another asm operand.
2450         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2451         MULTIPLE_THREADS_OFFSET as last asm operand, call
2452         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2453         otherwise pass private as another argument to __lll_lock_wait.
2454         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2455         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2456         private as another argument to __lll_*lock_wait call.
2457         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2458         MULTIPLE_THREADS_OFFSET as another asm operand, call
2459         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2460         otherwise pass private as another argument to __lll_unlock_wake.
2461         (lll_robust_unlock): Add private argument, pass private as another
2462         argument to __lll_unlock_wake.
2463         (lll_robust_dead): Add private argument, use __lll_private_flag
2464         macro.
2465         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2466         LLL_MUTEX_LOCK_INITIALIZER.
2467         (lll_lock_t): Remove.
2468         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2469         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2470         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2471         lll_cond_wake, lll_cond_broadcast): Remove.
2472         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2473         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2474         2007-05-2{3,9} changes.
2475         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2476         kernel-features.h and lowlevellock.h.
2477         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2478         (LOAD_FUTEX_WAIT): Rewritten.
2479         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2480         define.
2481         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2482         (__lll_mutex_lock_wait): Rename to ...
2483         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2484         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2485         (__lll_mutex_timedlock_wait): Rename to ...
2486         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2487         contains private argument.  Don't compile in for libc.so.
2488         (__lll_mutex_unlock_wake): Rename to ...
2489         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2490         Don't compile in for libc.so.
2491         (__lll_timedwait_tid): Use __NR_gettimeofday.
2492         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2493         kernel-features.h and lowlevellock.h.
2494         (LOAD_FUTEX_WAIT): Define.
2495         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2496         define.
2497         (__lll_robust_mutex_lock_wait): Rename to ...
2498         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2499         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2500         macro.
2501         (__lll_robust_mutex_timedlock_wait): Rename to ...
2502         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2503         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2504         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2505         lowlevellock.h.
2506         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2507         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2508         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2509         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2510         to __lll_lock_wait in %edx.
2511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2512         Include lowlevellock.h and pthread-errnos.h.
2513         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2514         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2515         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2516         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2517         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2518         __lll_unlock_wake.
2519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2520         Include lowlevellock.h and pthread-errnos.h.
2521         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2522         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2523         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2524         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2525         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2526         __lll_unlock_wake.
2527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2528         Include lowlevellock.h.
2529         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2530         Don't define.
2531         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2532         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2533         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2534         __lll_unlock_wake.  Use __NR_gettimeofday.
2535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2536         Include lowlevellock.h.
2537         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2538         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2539         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2540         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2541         and __lll_unlock_wake.
2542         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2543         Include lowlevellock.h.
2544         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2545         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2546         MUTEX(%ebx) address in %edx rather than %ecx to
2547         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2548         and __lll_unlock_wake.  Move return value from %ecx to %edx
2549         register.
2550         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2551         Include lowlevellock.h.
2552         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2553         Don't define.
2554         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2555         MUTEX(%ebp) address in %edx rather than %ecx to
2556         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2557         and __lll_unlock_wake.  Move return value from %ecx to %edx
2558         register.  Use __NR_gettimeofday.
2559         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2560         Include lowlevellock.h.
2561         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2562         Don't define.
2563         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2564         MUTEX(%ebp) address in %edx rather than %ecx to
2565         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2566         and __lll_unlock_wake.  Move return value from %ecx to %edx
2567         register.  Use __NR_gettimeofday.
2568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2569         Include lowlevellock.h.
2570         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2571         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2572         MUTEX(%edi) address in %edx rather than %ecx to
2573         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2574         and __lll_unlock_wake.
2575         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2576         Include lowlevellock.h.
2577         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2578         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2579         MUTEX(%ebx) address in %edx rather than %ecx to
2580         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2581         and __lll_unlock_wake.  Move return value from %ecx to %edx
2582         register.
2583         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2584         lowlevellock.h.
2585         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2586         define.
2587         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2588         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2589         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2590         lowlevellock.h.
2591         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2592         (sem_timedwait): Use __NR_gettimeofday.
2593         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2594         lowlevellock.h.
2595         (LOCK): Don't define.
2596         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2597         lowlevellock.h.
2598         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2599         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2600         are waiters.
2601         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2602         2007-05-2{3,9} changes.
2603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2604         kernel-features.h and lowlevellock.h.
2605         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2606         (LOAD_FUTEX_WAIT): Rewritten.
2607         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2608         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2609         (__lll_mutex_lock_wait): Rename to ...
2610         (__lll_lock_wait): ... this.  %esi is now private argument.
2611         Don't compile in for libc.so.
2612         (__lll_mutex_timedlock_wait): Rename to ...
2613         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2614         Don't compile in for libc.so.
2615         (__lll_mutex_unlock_wake): Rename to ...
2616         (__lll_unlock_wake): ... this.  %esi contains private argument.
2617         Don't compile in for libc.so.
2618         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2619         kernel-features.h and lowlevellock.h.
2620         (LOAD_FUTEX_WAIT): Define.
2621         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2622         (__lll_robust_mutex_lock_wait): Rename to ...
2623         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2624         Use LOAD_FUTEX_WAIT macro.
2625         (__lll_robust_mutex_timedlock_wait): Rename to ...
2626         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2627         private, use LOAD_FUTEX_WAIT macro.
2628         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2629         lowlevellock.h.
2630         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2631         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2632         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2633         __lll_lock_wait and __lll_unlock_wake.
2634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2635         Include lowlevellock.h and pthread-errnos.h.
2636         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2637         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2638         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2639         pass LLL_SHARED in %esi to both __lll_lock_wait and
2640         __lll_unlock_wake.
2641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2642         Include lowlevellock.h and pthread-errnos.h.
2643         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2644         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2645         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2646         pass LLL_SHARED in %esi to both __lll_lock_wait and
2647         __lll_unlock_wake.
2648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2649         Include lowlevellock.h.
2650         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2651         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2652         pass LLL_SHARED in %esi to both __lll_lock_wait and
2653         __lll_unlock_wake.
2654         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2655         Include lowlevellock.h.
2656         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2657         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2658         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2659         and __lll_unlock_wake.
2660         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2661         Include lowlevellock.h.
2662         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2663         Don't define.
2664         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2665         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2666         and __lll_unlock_wake.
2667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2668         Include lowlevellock.h.
2669         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2670         Don't define.
2671         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2672         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2673         and __lll_unlock_wake.
2674         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2675         Include lowlevellock.h.
2676         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2677         Don't define.
2678         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2679         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2680         and __lll_unlock_wake.
2681         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2682         Include lowlevellock.h.
2683         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2684         Don't define.
2685         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2686         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2687         and __lll_unlock_wake.
2688         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2689         Include lowlevellock.h.
2690         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2691         Don't define.
2692         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2693         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2694         and __lll_unlock_wake.
2695         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2696         lowlevellock.h.
2697         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2698         define.
2699         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2700         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2701         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2702         lowlevellock.h.
2703         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2704         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2705         lowlevellock.h.
2706         (LOCK): Don't define.
2707         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2708         lowlevellock.h.
2709         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2710         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2711         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2712         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2713         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2714         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2715         (__lll_lock_wait_private): New function.
2716         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2717         it to lll_futex_*wait.  Don't compile in for libc.so.
2718         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2719         Remove.
2720         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2721         (struct sparc_pthread_barrier): Remove.
2722         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2723         struct sparc_pthread_barrier.  Pass
2724         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2725         and lll_futex_wait macros.
2726         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2727         Remove.
2728         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2729         Include sparc pthread_barrier_wait.c instead of generic one.
2731 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2733         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2735         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2736         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2737         %ecx.
2738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2739         (pthread_rwlock_timedwrlock): Likewise.
2740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2741         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2743 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2745         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2747 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2749         * tst-locale2.c (useless): Add return statement.
2751 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2753         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2754         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2755         * pthread_create.c (start_thread): Likewise.
2756         * init.c (sighandler_setxid): Likewise.
2757         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2758         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2759         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2760         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2761         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2762         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2763         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2764         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2765         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2766         Likewise.
2767         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2768         Likewise.
2769         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2770         Likewise.
2771         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2772         __rtld_notify): Likewise.
2773         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2774         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2775         __pthread_once): Likewise.
2776         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2777         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2778         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2779         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2780         (lll_futex_wait): Add private argument, define as wrapper around
2781         lll_futex_timed_wait.
2782         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2783         use __lll_private_flag macro.
2784         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2785         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2786         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2787         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2788         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2789         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2790         (lll_futex_wait): Add private argument, define as wrapper around
2791         lll_futex_timed_wait.
2792         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2793         use __lll_private_flag macro.
2794         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2795         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2796         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2797         Define.
2798         (lll_futex_timed_wait, lll_futex_wake): Use it.
2799         (lll_private_futex_wait, lll_private_futex_timed_wait,
2800         lll_private_futex_wake): Removed.
2801         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2802         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2803         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2804         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2805         (lll_futex_wait): Add private argument, define as wrapper around
2806         lll_futex_timed_wait.
2807         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2808         use __lll_private_flag macro.
2809         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2810         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2811         to lll_futex_*.
2812         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2813         (lll_private_futex_wait, lll_private_futex_timed_wait,
2814         lll_private_futex_wake): Removed.
2815         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2816         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2817         (lll_private_futex_wait, lll_private_futex_timed_wait,
2818         lll_private_futex_wake): Removed.
2819         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2820         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2821         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2822         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2823         (lll_futex_wait): Add private argument, define as wrapper around
2824         lll_futex_timed_wait.
2825         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2826         use __lll_private_flag macro.
2827         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2828         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2829         to lll_futex_*.
2830         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2831         Define.
2832         (lll_futex_timed_wait, lll_futex_wake): Use it.
2833         (lll_private_futex_wait, lll_private_futex_timed_wait,
2834         lll_private_futex_wake): Removed.
2836 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
2838         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2839         of the structure for sparc32.
2841 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
2843         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2845 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2847         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2848         code used when private futexes are assumed.
2849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2850         Likewise.
2852 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2854         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2855         (__lll_private_flag): Define.
2856         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2857         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2858         __lll_private_flag.
2859         (lll_private_futex_wait, lll_private_futex_timedwait,
2860         lll_private_futex_wake): Define as wrapper around non-_private
2861         macros.
2862         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2863         (__lll_private_flag): Define.
2864         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2865         (lll_private_futex_wait, lll_private_futex_timedwait,
2866         lll_private_futex_wake): Define as wrapper around non-_private
2867         macros.
2869 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2871         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2872         parameter to lll_futex_wait call.
2873         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2875         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2876         Replace lll_futex_wait with lll_private_futex_wait.
2877         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2878         Add LLL_SHARED parameter to lll_futex_wake().
2880         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2881         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2882         lll_private_futex_wake.
2883         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2884         bit from private parm before syscall.
2885         (lll_futex_timed_wait): Likewise.
2886         (lll_futex_wake): Likewise.
2887         (lll_futex_wake_unlock): Likewise.
2888         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2889         (lll_robust_mutex_unlock): Likewise.
2890         (lll_mutex_unlock_force): Likewise.
2891         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2893 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2896         compilation when unconditionally using private futexes.
2897         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2898         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2899         Likewise.
2900         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2901         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2903 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2905         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2906         Define.
2908 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2910         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2911         kernel-features.h.
2913 2007-05-16  Roland McGrath  <roland@redhat.com>
2915         * init.c (__nptl_initial_report_events): New variable.
2916         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2917         to that.
2919 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2921         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2922         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2924 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2926         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2927         implementation.
2929 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2931         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2932         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2933         * pthread_mutex_timedlock.c: Likewise.
2934         * pthread_mutex_trylock.c: Likewise.
2935         * pthread_mutex_unlock.c: Likewise.
2937 2007-06-17  Andreas Schwab  <schwab@suse.de>
2939         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2940         sections.
2942 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2944         * allocatestack.c (allocate_stack): Make code compile if
2945         __ASSUME_PRIVATE_FUTEX is set.
2947 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2949         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2950         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2952         (__pthread_rwlock_wrlock): Likewise.
2953         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2954         (pthread_rwlock_timedrdlock): Likewise.
2955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2956         (pthread_rwlock_timedwrlock): Likewise.
2957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2958         (__pthread_rwlock_unlock): Likewise.
2960 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2962         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2963         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2964         Split __flags into __flags, __shared, __pad1 and __pad2.
2965         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2966         futexes if they are available.
2967         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2968         in libc-lowlevellock.S allow using private futexes.
2969         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2970         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2971         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2972         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2973         lll_private_futex_timed_wait and lll_private_futex_wake.
2974         (lll_robust_mutex_unlock): Fix typo.
2975         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2976         field in futex command setup.
2977         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2978         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2979         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2980         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2981         if they are available.  Remove clear_once_control.
2982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2983         futexes if they are available.
2984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2985         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2986         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2987         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2988         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2989         Wake only when there are waiters.
2990         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2991         support.  Indicate that there are waiters.  Remove unnecessary
2992         extra cancellation test.
2993         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2994         left-over duplication of __sem_wait_cleanup.
2996 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2998         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2999         parameter to lll_futex_wait, lll_futex_timed_wait, and
3000         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3001         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3002         lll_private_futex_wake.
3003         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3004         * allocatestack.c: Adjust use of lll_futex_* macros.
3005         * init.c: Likewise.
3006         * lowlevellock.h: Likewise.
3007         * pthread_barrier_wait.c: Likewise.
3008         * pthread_cond_broadcast.c: Likewise.
3009         * pthread_cond_destroy.c: Likewise.
3010         * pthread_cond_signal.c: Likewise.
3011         * pthread_cond_timedwait.c: Likewise.
3012         * pthread_cond_wait.c: Likewise.
3013         * pthread_create.c: Likewise.
3014         * pthread_mutex_lock.c: Likewise.
3015         * pthread_mutex_setprioceiling.c: Likewise.
3016         * pthread_mutex_timedlock.c: Likewise.
3017         * pthread_mutex_unlock.c: Likewise.
3018         * pthread_rwlock_timedrdlock.c: Likewise.
3019         * pthread_rwlock_timedwrlock.c: Likewise.
3020         * pthread_rwlock_unlock.c: Likewise.
3021         * sysdeps/alpha/tls.h: Likewise.
3022         * sysdeps/i386/tls.h: Likewise.
3023         * sysdeps/ia64/tls.h: Likewise.
3024         * sysdeps/powerpc/tls.h: Likewise.
3025         * sysdeps/pthread/aio_misc.h: Likewise.
3026         * sysdeps/pthread/gai_misc.h: Likewise.
3027         * sysdeps/s390/tls.h: Likewise.
3028         * sysdeps/sh/tls.h: Likewise.
3029         * sysdeps/sparc/tls.h: Likewise.
3030         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3031         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3032         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3033         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3034         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3035         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3036         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3037         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3038         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3039         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3040         Likewise.
3041         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3042         * sysdeps/x86_64/tls.h: Likewise.
3044 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3046         * pthread_getattr_np.c: No need to install a cancellation handler,
3047         this is no cancellation point.
3048         * pthread_getschedparam.c: Likewise.
3049         * pthread_setschedparam.c: Likewise.
3050         * pthread_setschedprio.c: Likewise.
3051         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3052         lll_unlock_wake_cb.
3053         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3054         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3055         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3056         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3057         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3058         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3059         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3060         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3061         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3062         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3063         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3064         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3066         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3067         whether there are more than one thread makes no sense here since
3068         we only call the slow path if the locks are taken.
3069         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3071         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3072         COND_NWAITERS_SHIFT.
3073         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3074         COND_CLOCK_BITS.
3075         * pthread_cond_init.c: Likewise.
3076         * pthread_cond_timedwait.c: Likewise.
3077         * pthread_cond_wait.c: Likewise.
3078         * pthread_condattr_getclock.c: Likewise.
3079         * pthread_condattr_setclock.c: Likewise.
3080         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3082         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3083         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3086 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3088         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3089         unistd.h.
3091         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3092         insn suffix.
3093         (THREAD_GSCOPE_GET_FLAG): Remove.
3094         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3095         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3096         changes.
3097         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3098         (THREAD_GSCOPE_GET_FLAG): Remove.
3099         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3100         instead of THREAD_GSCOPE_GET_FLAG.
3101         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3102         it.
3103         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3104         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3105         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3106         THREAD_GSCOPE_WAIT): Define.
3107         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3108         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3109         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3110         THREAD_GSCOPE_WAIT): Define.
3111         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3112         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3113         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3114         THREAD_GSCOPE_WAIT): Define.
3115         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3116         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3117         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3118         THREAD_GSCOPE_WAIT): Define.
3120 2007-05-24  Richard Henderson  <rth@redhat.com>
3122         * descr.h (struct pthread): Add header.gscope_flag.
3123         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3124         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3125         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3126         THREAD_GSCOPE_WAIT): Define.
3128 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3130         * init.c: Make it compile with older kernel headers.
3132         * tst-initializers1.c: Show through exit code which test failed.
3134         * pthread_rwlock_init.c: Also initialize __shared field.
3135         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3136         element in rwlock structure into four byte elements.  One of them is
3137         the new __shared element.
3138         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3139         Likewise.
3140         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3141         __shared, adjust names of other padding elements.
3142         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3143         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3144         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3145         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3146         FUTEX_PRIVATE_FLAG.
3147         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3148         futex to use private operations if possible.
3149         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3150         Likewise.
3151         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3152         Likewise.
3153         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3154         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3155         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3157         Likewise.
3158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3159         Likewise.
3160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3161         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3163 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3165         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3166         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3167         * pthread_rwlock_timedrdlock.c: Likewise.
3168         * pthread_rwlock_tryrdlock.c: Likewise.
3170         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3171         optimization.
3173         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3174         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3175         duplication of __sem_wait_cleanup.
3177         * allocatestack.c: Revert last change.
3178         * init.c: Likewise.
3179         * sysdeps/i386/tls.h: Likewise.
3180         * sysdeps/x86_64/tls.h: Likewise.
3181         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3182         header structure.
3183         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3185         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3186         Add private field.
3187         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3188         * pthread_barrier_init.c: Set private flag if pshared and private
3189         futexes are supported.
3190         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3191         private field in futex command setup.
3192         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3194 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3196         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3197         support.
3198         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3199         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3200         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3201         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3202         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3204         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3205         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3206         fields in the structure.
3207         (__old_sem_init): New function.
3208         * sem_open.c: Initialize all fields of the structure.
3209         * sem_getvalue.c: Adjust for renamed element.
3210         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3211         (gen-as-const-headers): Add structsem.sym.
3212         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3213         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3214         struct new_sem.  Add struct old_sem.
3215         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3216         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3217         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3218         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3219         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3220         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3221         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3222         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3223         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3224         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3225         * tst-sem10.c: New file.
3226         * tst-sem11.c: New file.
3227         * tst-sem12.c: New file.
3228         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3229         of struct sem.
3231 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3232             Jakub Jelinek  <jakub@redhat.com>
3234         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3235         Move __pthread_enable_asynccancel right before futex syscall.
3236         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3237         Likewise.
3239 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3241         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3242         THREAD_COPY_PRIVATE_FUTEX): Define.
3243         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3244         THREAD_COPY_PRIVATE_FUTEX): Define.
3245         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3246         * init.c (__pthread_initialize_minimal_internal): Use
3247         THREAD_SET_PRIVATE_FUTEX.
3249         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3250         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3251         THREAD_GSCOPE_FLAG_WAIT): Define.
3252         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3253         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3254         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3255         PTR_DEMANGLE.
3256         (THREAD_GSCOPE_GET_FLAG): Define.
3257         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3258         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3259         instead of ->header.gscope_flag directly.
3261 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3263         * init.c (__pthread_initialize_minimal_internal): Check whether
3264         private futexes are available.
3265         * allocatestack.c (allocate_stack): Copy private_futex field from
3266         current thread into the new stack.
3267         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3268         futexes if they are available.
3269         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3270         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3271         in libc-lowlevellock.S allow using private futexes.
3272         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3273         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3274         FUTEX_PRIVATE_FLAG.
3275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3276         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3277         if they are available.
3278         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3279         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3280         * sysdeps/i386/tcb-offsets.sym: Likewise.
3281         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3282         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3284 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3286         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3287         Remove ptr_wait_lookup_done again.
3288         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3289         (__pthread_initialize_minimal_internal): Initialize
3290         _dl_wait_lookup_done pointer in _rtld_global directly.
3291         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3292         Remove code to code _dl_wait_lookup_done.
3293         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3294         encrypted for now.
3296 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3298         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3299         pthread_mutex_init failed with ENOTSUP.
3301 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3303         * allocatestack.c (__wait_lookup_done): New function.
3304         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3305         Add ptr_wait_lookup_done.
3306         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3307         * pthreadP.h: Declare __wait_lookup_done.
3308         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3309         Define macros to implement reference handling of global scope.
3310         * sysdeps/x86_64/tls.h: Likewise.
3311         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3312         Initialize GL(dl_wait_lookup_done).
3314 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3316         [BZ #4512]
3317         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3318         is detected.
3319         * pthread_mutex_timedlock.c: Likewise.
3320         * pthread_mutex_trylock.c: Likewise.
3321         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3323         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3324         * tst-robust9.c: New file.
3325         * tst-robustpi9.c: New file.
3327         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3328         unnecessary extra cancellation test.
3330 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3332         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3333         extra cancellation test.
3334         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3336 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3338         * descr.h (struct pthread): Rearrange members to fill hole in
3339         64-bit layout.
3341         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3342         (__pthread_setaffinity_new): If syscall was successful and
3343         RESET_VGETCPU_CACHE is defined, use it before returning.
3344         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3346 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3348         [BZ #4455]
3349         * tst-align2.c: Include stackinfo.h.
3350         * tst-getpid1.c: Likewise.
3352 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3354         [BZ #4455]
3355         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3356         * tst-getpid1.c (do_test): Likewise.
3358         [BZ #4456]
3359         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3360         (allocate_stack): Likewise.
3362 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3364         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3365         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3366         (__lll_robust_timedlock_wait): Likewise.
3367         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3369 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3371         [BZ #4465]
3372         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3373         * tst-cancel4.c (tf_fdatasync): New test.
3375 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3377         [BZ #4392]
3378         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3379         check mutexes like normal mutexes.
3381         [BZ #4306]
3382         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3383         Initialize the whole sigevent structure to appease valgrind.
3385 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3387         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3388         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3390 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3392         * tst-locale1.c: Avoid warnings.
3393         * tst-locale2.c: Likewise.
3395 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3397         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3398         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3400 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3402         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3403         __extern_always_inline where appropriate.
3404         * sysdeps/pthread/pthread.h: Likewise.
3406 2007-03-13  Richard Henderson  <rth@redhat.com>
3408         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3409         separate cfi regions for the two subsections.
3411 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3413         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3414         new thread, don't just decrement it.
3415         Patch by Suzuki K P <suzuki@in.ibm.com>.
3417 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3419         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3420         PTHFCT_CALL definition.
3422 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3424         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3425         available, don't use it.
3427 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3430         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3431         call into the kernel to delay.
3433 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3435         * tst-initializers1.c: We want to test the initializers as seen
3436         outside of libc, so undefined _LIBC.
3438         * pthread_join.c (cleanup): Avoid warning.
3440 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3442         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3443         (__lll_timedwait_tid): Add unwind info.
3445         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3446         function table, mangle the pointers.
3447         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3448         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3449         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3450         demangle pointers before use.
3451         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3452         demangle pointer.
3453         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3454         * sysdeps/pthread/setxid.h: Likewise.
3456 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3458         * tst-rwlock7.c: Show some more information in case of correct
3459         behavior.
3461 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3463         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3464         (lll_futex_timed_wait): Undo part of last change, don't negate
3465         return value.
3467 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3469         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3470         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3472 2006-12-28  David S. Miller  <davem@davemloft.net>
3474         * shlib-versions: Fix sparc64 linux target specification.
3476 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3478         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3479         Adjust include path for pthread_barrier_wait.c move.
3481 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3483         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3484         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3486 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3488         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3489         6 argument cancellable syscalls.
3490         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3491         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3492         6 argument cancellable syscalls.
3493         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3495 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3497         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3498         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3500 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3502         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3503         __sync_lock_release instead of __sync_lock_release_si.
3505 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3507         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3508         Define.
3509         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3510         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3511         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3512         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3513         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3514         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3515         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3516         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3517         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3518         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3519         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3521 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3523         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3524         * pthread_barrier_wait.c: ...here.
3525         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3526         * pthread_cond_broadcast.c: ...here.
3527         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3528         * pthread_cond_signal.c: ...here.
3529         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3530         * pthread_cond_timedwait.c: ...here.
3531         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3532         * pthread_cond_wait.c: ...here.
3533         * sysdeps/pthread/pthread_once.c: Move to...
3534         * pthread_once.c: ...here.
3535         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3536         * pthread_rwlock_rdlock.c: ...here.
3537         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3538         * pthread_rwlock_timedrdlock.c: ...here.
3539         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3540         * pthread_rwlock_timedwrlock.c: ...here.
3541         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3542         * pthread_rwlock_unlock.c: ...here.
3543         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3544         * pthread_rwlock_wrlock.c: ...here.
3545         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3546         * pthread_spin_destroy.c: ...here.
3547         * sysdeps/pthread/pthread_spin_init.c: Move to...
3548         * pthread_spin_init.c: ...here.
3549         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3550         * pthread_spin_unlock.c: ...here.
3551         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3552         * pthread_getcpuclockid.c: ...here.
3554         * init.c: USE_TLS support is now always enabled.
3555         * tst-tls5.h: Likewise.
3556         * sysdeps/alpha/tls.h: Likewise.
3557         * sysdeps/i386/tls.h: Likewise.
3558         * sysdeps/ia64/tls.h: Likewise.
3559         * sysdeps/powerpc/tls.h: Likewise.
3560         * sysdeps/s390/tls.h: Likewise.
3561         * sysdeps/sh/tls.h: Likewise.
3562         * sysdeps/sparc/tls.h: Likewise.
3563         * sysdeps/x86_64/tls.h: Likewise.
3565 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3567         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3568         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3569         failed.
3571         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3572         Define to THREAD_SELF->header.multiple_threads.
3573         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3574         Likewise.
3575         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3576         Likewise.
3577         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3578         (SINGLE_THREAD_P): Likewise.
3579         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3580         (SINGLE_THREAD_P): Likewise.
3581         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3582         (SINGLE_THREAD_P): Likewise.
3583         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3584         (SINGLE_THREAD_P): Likewise.
3585         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3586         Likewise.
3587         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3588         (SINGLE_THREAD_P): Likewise.
3589         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3590         (SINGLE_THREAD_P): Likewise.
3591         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3592         Likewise.
3594 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3596         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3597         by default rather than 2_3_3.
3599 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3601         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3602         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3603         atomic_* instead of catomic_* macros.
3605 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3607         [BZ #3285]
3608         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3609         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3610         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3611         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3612         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3613         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3614         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3615         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3616         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3617         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3618         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3619         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3620         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3622 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3624         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3625         cancelable syscalls with six parameters.
3627         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3628         operations instead of atomic_*.
3630 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3632         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3634 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3636         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3637         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3638         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3639         New file.
3640         * pthread_attr_setstack.c: Allow overwriting the version number of the
3641         new symbol.
3642         * pthread_attr_setstacksize.c: Likewise.
3643         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3644         it.
3645         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3646         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3648 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3650         [BZ #3251]
3651         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3652         Patch by Petr Baudis.
3654 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3656         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3658         * tst-cancel2.c (tf): Loop as long as something was written.
3660 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3662         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3663         mutexes wake all mutexes.
3664         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3665         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3666         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3668 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3670         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3671         to guarantee the thread is always canceled.
3673 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3675         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3676         Include stdlib.h.
3677         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3678         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3681         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3683 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3685         [BZ #3123]
3686         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3687         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3691         * Makefile (tests): Add tst-cond22.
3692         * tst-cond22.c: New file.
3694 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3696         [BZ #3124]
3697         * descr.h (struct pthread): Add parent_cancelhandling.
3698         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3699         cancelhandling value to child.
3700         * pthread_create.c (start_thread): If parent thread was canceled
3701         reset the SIGCANCEL mask.
3702         * Makefile (tests): Add tst-cancel25.
3703         * tst-cancel25.c: New file.
3705 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3706             Ulrich Drepper  <drepper@redhat.com>
3708         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3709         counterp if it is already zero.
3710         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3712 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3713             Roland McGrath  <roland@redhat.com>
3715         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3716         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3717         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3718         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3719         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3720         lll_robust_mutex_timedlock, lll_mutex_unlock,
3721         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3722         Add _L_*_ symbols around the subsection.
3723         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3724         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3726 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3727             Roland McGrath  <roland@redhat.com>
3729         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3730         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3731         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3732         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3733         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3734         lll_robust_mutex_timedlock, lll_mutex_unlock,
3735         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3736         Add _L_*_ symbols around the subsection.
3737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3738         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3740 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3742         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3743         change because it can disturb too much existing code.  If real hard
3744         reader preference is needed we'll introduce another type.
3745         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3746         (pthread_rwlock_timedwrlock): Likewise.
3747         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3748         Likewise.
3750 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3752         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3753         reader preference.
3754         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3755         (pthread_rwlock_timedwrlock): Likewise.
3756         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3757         Likewise.
3759 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3761         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3762         Only define ifdef SHARED.
3764 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3766         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3767         (free_stacks): ...here.
3768         (__free_stack_cache): New function.
3769         * pthreadP.h: Declare __free_stack_cache.
3770         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3771         ptr_freeres.
3772         * init.c (pthread_functions): Initialize ptr_freeres.
3773         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3774         New freeres function.
3776 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
3778         [BZ #3018]
3779         * Makefile (extra-objs): Add modules to extra-test-objs instead.
3781 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
3783         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3784         _XOPEN_REALTIME_THREADS.
3786 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
3788         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3789         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3790         HAVE_CLOCK_GETTIME_VSYSCALL.
3791         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3793 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
3795         * sysdeps/unix/sysv/linux/bits/posix_opt.h
3796         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3797         * descr.h (struct priority_protection_data): New type.
3798         (struct pthread): Add tpp field.
3799         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3800         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3801         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3802         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3803         TPP mutexes.
3804         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3805         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3806         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3807         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3808         * tpp.c: New file.
3809         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3810         boosted by TPP.
3811         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3812         * pthread_mutexattr_getprioceiling.c
3813         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3814         in the SCHED_FIFO priority range.
3815         * pthread_mutexattr_setprioceiling.c
3816         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3817         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3818         if mutex is not TPP.  Ceiling is now in __data.__lock.
3819         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3820         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3821         is now in __data.__lock.  Add locking.
3822         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3823         * Makefile (libpthread-routines): Add tpp.
3824         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3825         * tst-tpp.h: New file.
3826         * tst-mutexpp1.c: New file.
3827         * tst-mutexpp6.c: New file.
3828         * tst-mutexpp10.c: New file.
3829         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3830         * tst-mutex6.c (TEST_FUNCTION): Likewise.
3832 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3834         [BZ #2843]
3835         * pthread_join.c (pthread_join): Account for self being canceled
3836         when checking for deadlocks.
3837         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
3838         (tf1): Don't print anything after pthread_join returns, this would be
3839         another cancellation point.
3840         (tf2): Likewise.
3841         * tst-join6.c: New file.
3842         * Makefile (tests): Add tst-join6.
3844 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
3846         [BZ #2892]
3847         * pthread_setspecific.c (__pthread_setspecific): Check
3848         out-of-range index before checking for unused key.
3850         * sysdeps/pthread/gai_misc.h: New file.
3852 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3854         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3855         file.  Don't use sysctl.
3856         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3857         overwrite the file if this is likely not true.
3859 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3861         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3862         * Makefile (tests): Add tst-getpid3.
3863         * tst-getpid3.c: New file.
3865 2006-07-30  Roland McGrath  <roland@redhat.com>
3867         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3869         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3870         (pause_not_cancel): New macro.
3871         (nanosleep_not_cancel): New macro.
3872         (sigsuspend_not_cancel): New macro.
3873         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3874         nanosleep_not_cancel macro from <not-cancel.h>.
3875         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3876         macro from <not-cancel.h>.
3878 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3879             Jakub Jelinek  <jakub@redhat.com>
3881         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3882         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3883         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3884         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3885         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3886         * pthread_mutex_lock.c: Likewise.
3887         * pthread_mutex_timedlock.c: Likewise.
3888         * pthread_mutex_trylock.c: Likewise.
3889         * pthread_mutex_unlock.c: Likewise.
3890         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3891         all mutexes.
3892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3893         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3894         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3895         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3896         pthread-pi-defines.sym.
3897         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3898         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3899         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3900         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3901         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3902         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3903         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3904         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3905         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3906         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3907         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3908         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3909         * tst-mutex2.c: Likewise.
3910         * tst-mutex3.c: Likewise.
3911         * tst-mutex4.c: Likewise.
3912         * tst-mutex5.c: Likewise.
3913         * tst-mutex6.c: Likewise.
3914         * tst-mutex7.c: Likewise.
3915         * tst-mutex7a.c: Likewise.
3916         * tst-mutex8.c: Likewise.
3917         * tst-mutex9.c: Likewise.
3918         * tst-robust1.c: Likewise.
3919         * tst-robust7.c: Likewise.
3920         * tst-robust8.c: Likewise.
3921         * tst-mutexpi1.c: New file.
3922         * tst-mutexpi2.c: New file.
3923         * tst-mutexpi3.c: New file.
3924         * tst-mutexpi4.c: New file.
3925         * tst-mutexpi5.c: New file.
3926         * tst-mutexpi6.c: New file.
3927         * tst-mutexpi7.c: New file.
3928         * tst-mutexpi7a.c: New file.
3929         * tst-mutexpi8.c: New file.
3930         * tst-mutexpi9.c: New file.
3931         * tst-robust1.c: New file.
3932         * tst-robust2.c: New file.
3933         * tst-robust3.c: New file.
3934         * tst-robust4.c: New file.
3935         * tst-robust5.c: New file.
3936         * tst-robust6.c: New file.
3937         * tst-robust7.c: New file.
3938         * tst-robust8.c: New file.
3939         * Makefile (tests): Add the new tests.
3941         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3942         * pthread_mutex_destroy.c: Remove unneeded label.
3944 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3946         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3947         computations to compile time.
3949 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3951         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3953 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3955         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3957 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3959         * pthread_key_create.c (__pthread_key_create): Do away with
3960         __pthread_keys_lock.
3962         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3963         (__kernel_cpumask_size): Mark as hidden.
3964         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3966         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3967         * semaphoreP.h (__sem_mappings_lock): Likewise.
3969 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3971         * pthread_atfork.c: Mark __dso_handle as hidden.
3973 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3975         [BZ #2644]
3976         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3977         the reload problem.  Change the one path in pthread_cancel_init
3978         which causes the problem.  Force gcc to reload.  Simplify callers.
3979         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3980         (_Unwind_GetBSP): Undo last patch.
3982 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3984         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3985         function pointer is reloaded after pthread_cancel_init calls.
3987         [BZ #2644]
3988         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3989         pointers are reloaded after pthread_cancel_init calls.
3991 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3993         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3994         __always_inline.
3996 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3998         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3999         Allocate new object which is passed to timer_sigev_thread so that
4000         the timer can be deleted before the new thread is scheduled.
4002 2006-04-26  Roland McGrath  <roland@redhat.com>
4004         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4006 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4008         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4009         suffix for conditional jumps.
4010         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4011         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4012         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4013         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4014         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4015         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4017         * init.c (sigcancel_handler): Compare with correct PID even if the
4018         thread is in the middle of a fork call.
4019         (sighandler_setxid): Likewise.
4020         Reported by Suzuki K P <suzuki@in.ibm.com> .
4022 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4024         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4026 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4028         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4029         fails [Coverity CID 105].
4031 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4033         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4035 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4037         [BZ #2505]
4038         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4039         Define __lll_rel_instr using lwsync.
4041 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4043         * allocatestack.c (allocate_stack): Always initialize robust_head.
4044         * descr.h: Define struct robust_list_head.
4045         (struct pthread): Use robust_list_head in robust mutex list definition.
4046         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4047         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4048         (__pthread_initialize_minimal_internal): Register robust_list with
4049         the kernel.
4050         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4051         Declare __set_robust_list_avail.
4052         * pthread_create.c (start_thread): Register robust_list of new thread.
4053         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4054         waiters.
4055         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4056         number of users, it's unreliable.
4057         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4058         set_robust_list syscall is available.
4059         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4060         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4061         Set robust_head.list_op_pending before trying to lock a robust mutex.
4062         * pthread_mutex_timedlock.c: Likewise.
4063         * pthread_mutex_trylock.c: Likewise.
4064         * pthread_mutex_unlock.c: Likewise for unlocking.
4065         * Makefile (tests): Add tst-robust8.
4066         * tst-robust8.c: New file.
4068 2006-03-08  Andreas Schwab  <schwab@suse.de>
4070         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4071         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4073 2006-03-05  Roland McGrath  <roland@redhat.com>
4075         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4076         and $config_os doesn't match *linux*.
4078 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4080         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4081         Use __syscall_error.
4082         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4083         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4084         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4085         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4086         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4087         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4089 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4091         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4093 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4095         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4096         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4097         mutex.
4098         (__lll_robust_timedlock_wait): Likewise.
4099         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4100         (__lll_robust_lock_wait): Likewise.
4101         (__lll_robust_timedlock_wait): Likewise.
4102         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4103         (__lll_robust_lock_wait): Likewise.
4104         (__lll_robust_timedlock_wait): Likewise.
4106 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4108         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4109         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4110         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4111         lll_robust_mutex_unlock): Define.
4112         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4114 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4116         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4117         instead of <clone.S>.
4119 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4121         * Makefile (libpthread-routines): Add
4122         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4123         and pthread_mutex_[sg]etprioceiling.
4124         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4125         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4126         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4127         pthread_mutex_setprioceiling.
4128         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4129         PTHREAD_PRIO_PROTECT): New enum values.
4130         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4131         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4132         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4133         prototypes.
4134         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4135         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4136         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4137         Define.
4138         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4139         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4140         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4141         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4142         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4143         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4144         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4145         protocol mutexes.
4146         * pthread_mutex_getprioceiling.c: New file.
4147         * pthread_mutex_setprioceiling.c: New file.
4148         * pthread_mutexattr_getprioceiling.c: New file.
4149         * pthread_mutexattr_setprioceiling.c: New file.
4150         * pthread_mutexattr_getprotocol.c: New file.
4151         * pthread_mutexattr_setprotocol.c: New file.
4153 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4155         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4157 2006-02-27  Roland McGrath  <roland@redhat.com>
4159         * sysdeps/pthread/Subdirs: List nptl here too.
4160         * configure (libc_add_on_canonical): New variable.
4162         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4164         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4165         self to get main source tree's file.
4166         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4167         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4168         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4169         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4170         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4171         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4172         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4173         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4174         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4175         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4176         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4177         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4178         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4180         * Makefile: Use $(sysdirs) in vpath directive.
4182         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4183         (CPPFLAGS-timer_routines.c): Likewise.
4185         * Makeconfig (includes): Variable removed.
4187 2006-02-26  Roland McGrath  <roland@redhat.com>
4189         * sysdeps/generic/pt-raise.c: Moved to ...
4190         * pt-raise.c: ... here.
4191         * sysdeps/generic/lowlevellock.h: Moved to ...
4192         * lowlevellock.h: ... here.
4194 2006-02-23  Roland McGrath  <roland@redhat.com>
4196         * descr.h (struct pthread): Add final member `end_padding'.
4197         (PTHREAD_STRUCT_END_PADDING): Use it.
4199 2006-02-20  Roland McGrath  <roland@redhat.com>
4201         * sysdeps/mips: Directory removed, saved in ports repository.
4202         * sysdeps/unix/sysv/linux/mips: Likewise.
4204 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4206         * tst-robust1.c: Add second mutex to check that the mutex list is
4207         handled correctly.
4209 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4211         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4212         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4213         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4214         lll_robust_mutex_unlock): New macros.
4215         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4216         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4217         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4218         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4219         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4221 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4223         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4224         definitions.
4225         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4227 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4229         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4230         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4231         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4232         (lll_robust_mutex_unlock): Likewise.
4234 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4236         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4237         Set robust_list.__next rather than robust_list.
4238         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4239         (__pthread_list_t): New typedef.
4240         (pthread_mutex_t): Replace __next and __prev fields with __list.
4241         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4242         (__pthread_list_t): New typedef.
4243         (pthread_mutex_t): Replace __next and __prev fields with __list.
4244         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4245         (__pthread_list_t, __pthread_slist_t): New typedefs.
4246         (pthread_mutex_t): Replace __next and __prev fields with __list.
4247         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4248         (__pthread_list_t, __pthread_slist_t): New typedefs.
4249         (pthread_mutex_t): Replace __next and __prev fields with __list.
4250         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4251         (__pthread_list_t, __pthread_slist_t): New typedefs.
4252         (pthread_mutex_t): Replace __next and __prev fields with __list.
4253         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4254         (__pthread_slist_t): New typedef.
4255         (pthread_mutex_t): Replace __next field with __list.
4257 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4259         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4260         PTHREAD_MUTEX_OWNERDEAD.
4261         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4262         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4263         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4264         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4265         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4266         to PTHREAD_MUTEX_INCONSISTENT.
4267         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4268         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4269         * pthread_mutex_trylock.c: Likewise.
4270         * pthread_mutex_timedlock.c: Likewise.
4271         * pthread_mutex_unlock.c: Likewise.
4272         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4273         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4274         lowlevelrobustlock.sym.
4275         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4276         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4277         definitions.
4278         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4279         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4280         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4281         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4282         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4284 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4286         * allocatestack.c (allocate_stack): Initialize robust_list.
4287         * init.c (__pthread_initialize_minimal_internal): Likewise.
4288         * descr.h (struct xid_command): Pretty printing.
4289         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4290         robust_list.  Adjust macros.
4291         * pthread_create.c (start_thread): Adjust robust_list handling.
4292         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4293         but the owner for all robust mutex types.
4294         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4295         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4296         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4297         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4299         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4300         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4302 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4304         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4305         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4307 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4309         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4310         Return status.
4311         (lll_futex_timed_wait): Define.
4313 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4315         * tst-cancel4.c: Test ppoll.
4317 2006-01-18  Andreas Jaeger  <aj@suse.de>
4319         [BZ #2167]
4320         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4321         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4322         by Jim Gifford <patches@jg555.com>.
4324 2006-01-13  Richard Henderson  <rth@redhat.com>
4326         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4328 2006-01-10  Roland McGrath  <roland@redhat.com>
4330         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4331         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4332         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4333         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4334         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4335         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4336         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4337         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4338         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4339         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4341 2006-01-09  Roland McGrath  <roland@redhat.com>
4343         * tst-initializers1-c89.c: New file.
4344         * tst-initializers1-c99.c: New file.
4345         * tst-initializers1-gnu89.c: New file.
4346         * tst-initializers1-gnu99.c: New file.
4347         * Makefile (tests): Add them.
4348         (CFLAGS-tst-initializers1-c89.c): New variable.
4349         (CFLAGS-tst-initializers1-c99.c): New variable.
4350         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4351         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4353         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4354         Use __extension__ on anonymous union definition.
4355         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4356         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4357         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4358         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4359         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4361 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4363         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4364         Don't give the union a name because it changes the mangled name.
4365         Instead name the struct for __data.
4366         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4367         Likewise.
4368         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4369         Likewise.
4371 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4373         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4374         stack bias to mc_ftp field.
4376 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4378         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4379         being too clever and reloading the futex value where it shouldn't.
4381 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4383         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4384         correct type.
4386 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4388         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4389         Add cfi directives.
4391 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4393         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4394         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4395         rename in tcbhead_t.
4397         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4398         Don't give the union a name because it changes the mangled name.
4399         Instead name the struct for __data.
4400         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4401         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4402         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4403         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4404         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4405         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4407 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4409         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4410         Return status.
4411         (lll_futex_timed_wait): Define.
4412         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4413         * sysdeps/pthread/aio_misc.h: New file.
4415 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4417         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4419 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4421         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4422         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4423         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4425 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4427         * tst-cancel24.cc: Use C headers instead of C++ headers.
4429 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4431         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4432         sparc-linux configured glibc.
4433         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4434         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4435         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4436         atomic_compare_and_exchange_val_24_acq instead of
4437         atomic_compare_and_exchange_val_acq.
4438         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4439         instead of atomic_exchange_rel.
4440         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4441         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4442         file.
4443         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4444         file.
4445         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4446         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4447         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4448         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4449         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4450         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4451         New file.
4452         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4453         New file.
4454         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4455         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4456         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4457         file.
4458         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4459         file.
4460         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4462 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4464         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4465         mutex initializers.
4467 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4469         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4470         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4471         THREAD_COPY_POINTER_GUARD): Define.
4472         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4473         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4475 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4477         * version.c: Update copyright year.
4479 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4481         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4482         .eh_frame section, use cfi_* directives.
4483         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4485 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4487         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4488         now.
4490 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4492         * sysdeps/pthread/sigaction.c: Removed.
4493         * sigaction.c: New file.
4494         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4496 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4498         * Makefile (tests): Add tst-signal7.
4499         * tst-signal7.c: New file.
4501 2005-12-27  Roland McGrath  <roland@redhat.com>
4503         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4504         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4505         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4506         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4507         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4508         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4509         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4510         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4511         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4512         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4513         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4515 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4517         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4518         and __prev field to pthread_mutex_t.
4519         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4520         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4521         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4522         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4523         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4524         to pthread_mutex_t.
4526 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4528         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4529         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4530         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4531         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4532         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4533         and PTHREAD_MUTEXATTR_FLAG_BITS.
4534         * descr.h (struct pthread): Add robust_list field and define
4535         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4536         * pthread_mutexattr_getrobust.c: New file.
4537         * pthread_mutexattr_setrobust.c: New file.
4538         * pthread_mutex_consistent.c: New file.
4539         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4540         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4541         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4542         Adjust pthread_mutex_t initializers.
4543         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4544         field to pthread_mutex_t.
4545         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4546         and __prev field to pthread_mutex_t.
4547         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4548         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4549         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4550         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4551         * pthread_mutexattr_gettype.c: Likewise.
4552         * pthread_mutexattr_setpshared.c: Likewise.
4553         * pthread_mutexattr_settype.c: Likewise.
4554         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4555         Initialize mutex kind according to robust flag.
4556         * pthread_mutex_lock.c: Implement local robust mutex.
4557         * pthread_mutex_timedlock.c: Likewise.
4558         * pthread_mutex_trylock.c: Likewise.
4559         * pthread_mutex_unlock.c: Likewise.
4560         * pthread_create.c (start_thread): Mark robust mutexes which remained
4561         locked as dead.
4562         * tst-robust1.c: New file.
4563         * tst-robust2.c: New file.
4564         * tst-robust3.c: New file.
4565         * tst-robust4.c: New file.
4566         * tst-robust5.c: New file.
4567         * tst-robust6.c: New file.
4568         * tst-robust7.c: New file.
4569         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4570         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4571         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4572         tst-robust5, tst-robust6, and tst-robust7.
4574         * tst-typesizes.c: New file.
4575         * Makefile (tests): Add tst-typesizes.
4577         * tst-once3.c: More debug output.
4579 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4581         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4582         missing after last change.
4584         * version.c: Update copyright year.
4586 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4588         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4589         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4590         * pthread_mutex_trylock.c: Likewise.
4591         * pthread_mutex_timedlock.c: Likewise.
4592         * pthread_mutex_unlock.c: Likewise.
4594 2005-12-22  Roland McGrath  <roland@redhat.com>
4596         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4597         so that #include_next's search location is not reset to the -I..
4598         directory where <nptl/...> can be found.
4600 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4602         [BZ #1913]
4603         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4604         Fix unwind info.  Remove useless branch prediction prefix.
4605         * tst-cancel24.cc: New file.
4606         * Makefile: Add rules to build and run tst-cancel24.
4608 2005-12-21  Roland McGrath  <roland@redhat.com>
4610         * libc-cancellation.c: Use <> rather than "" #includes.
4611         * pt-cleanup.c: Likewise.
4612         * pthread_create.c: Likewise.
4613         * pthread_join.c: Likewise.
4614         * pthread_timedjoin.c: Likewise.
4615         * pthread_tryjoin.c: Likewise.
4616         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4617         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4618         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4619         * unwind.c: Likewise.
4621 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4623         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4624         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4625         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4626         THREAD_COPY_POINTER_GUARD): Define.
4628 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4630         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4631         rather than one.
4632         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4633         THREAD_COPY_POINTER_GUARD): Define.
4634         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4635         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4636         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4637         THREAD_COPY_POINTER_GUARD): Define.
4638         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4639         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4640         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4641         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4642         Use PTR_DEMANGLE for B0 if defined.
4644 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4646         * pthread_create.c (__pthread_create_2_1): Use
4647         THREAD_COPY_POINTER_GUARD if available.
4648         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4649         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4650         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4651         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4652         * sysdeps/x86_64/tls.h: Likewise.
4654 2005-12-15  Roland McGrath  <roland@redhat.com>
4656         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4658 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4660         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4661         sysdeps/generic.
4662         * errno-loc.c: New file.
4664 2005-12-12  Roland McGrath  <roland@redhat.com>
4666         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4667         adjustments before choosing stack size.  Update minimum stack size
4668         calculation to match allocate_stack change.
4670 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4672         * allocatestack.c (allocate_stack): Don't demand that there is an
4673         additional full page available on the stack beside guard, TLS, the
4674         minimum stack.
4676 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4678         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4679         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4681         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4682         compiling 32-bit code we must define __cleanup_fct_attribute.
4684 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4686         [BZ #1920]
4687         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4688         __attribute__ instead of __attribute.
4689         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4690         (__cleanup_fct_attribute): Likewise.
4692 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4694         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4695         a write barrier before writing libgcc_s_getcfa.
4697 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4699         * sysdeps/unix/sysv/linux/configure: Removed.
4701 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4703         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4704         optional init_array/fini_array support.
4706 2005-10-24  Roland McGrath  <roland@redhat.com>
4708         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4709         versioned_symbol use.
4711 2005-10-16  Roland McGrath  <roland@redhat.com>
4713         * init.c (__pthread_initialize_minimal_internal): Even when using a
4714         compile-time default stack size, apply the minimum that allocate_stack
4715         will require, and round up to page size.
4717 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4719         * Makefile ($(test-modules)): Remove static pattern rule.
4721 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4722             Ulrich Drepper  <drepper@redhat.com>
4724         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4725         alignment in callback function.
4726         * Makefile: Add rules to build and run tst-align3.
4727         * tst-align3.c: New file.
4729 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4731         * allocatestack.c (setxid_signal_thread): Add
4732         INTERNAL_SYSCALL_DECL (err).
4734 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4736         * allocatestack.c (setxid_signal_thread): Need to use
4737         atomic_compare_and_exchange_bool_acq.
4739 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4740             Jakub Jelinek  <jakub@redhat.com>
4742         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4743         CANCEL_RESTMASK.
4744         (struct pthread): Move specific_used field to avoid padding.
4745         Add setxid_futex field.
4746         * init.c (sighandler_setxid): Reset setxid flag and release the
4747         setxid futex.
4748         * allocatestack.c (setxid_signal_thread): New function.  Broken
4749         out of the bodies of the two loops in __nptl_setxid.  For undetached
4750         threads check whether they are exiting and if yes, don't send a signal.
4751         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4752         * pthread_create.c (start_thread): For undetached threads, check
4753         whether setxid bit is set.  If yes, wait until signal has been
4754         processed.
4756         * allocatestack.c (STACK_VARIABLES): Initialize them.
4757         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4759 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4761         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4762         waiters, awake all waiters on the associated mutex.
4764 2005-09-22  Roland McGrath  <roland@redhat.com>
4766         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4767         ../sysdeps/x86_64/hp-timing.h).
4769 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4771         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4772         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4773         (lll_futex_wake_unlock): Define.
4774         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4775         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4776         (lll_futex_wake_unlock): Define.
4777         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4778         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4779         (lll_futex_wake_unlock): Define.
4780         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4781         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4782         (lll_futex_wake_unlock): Define.
4783         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4784         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4785         (lll_futex_wake_unlock): Define.
4786         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4787         lll_futex_wake_unlock.
4788         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4789         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4790         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4791         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4792         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4793         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4795 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4797         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4798         Fix typo in register name.
4800 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
4802         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4803         Use __sigfillset.  Document that sigfillset does the right thing wrt
4804         to SIGSETXID.
4806 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4808         [BZ #1102]
4809         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4810         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4811         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4812         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4813         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4814         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4815         in the structure.
4816         * Makefile (tests): Add tst-initializers1.
4817         (CFLAGS-tst-initializers1.c): Set.
4818         * tst-initializers1.c: New test.
4820 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4822         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4823         Make sure __flags are located at offset 48 from the start of the
4824         structure.
4826 2005-07-02  Roland McGrath  <roland@redhat.com>
4828         * Makeconfig: Comment fix.
4830 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
4832         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4833         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4834         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4835         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4836         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4837         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4838         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4839         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4840         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4841         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4843 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
4845         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4846         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4847         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4848         fields.
4849         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4850         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4851         field.  Put in sysinfo field unconditionally.
4852         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4853         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4854         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4855         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4856         fields.
4857         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4858         * pthread_create.c (__pthread_create_2_1): Use
4859         THREAD_COPY_STACK_GUARD macro.
4860         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4861         tests.
4862         * tst-stackguard1.c: New file.
4863         * tst-stackguard1-static.c: New file.
4865 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4867         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4868         Invoke CGOTSETUP and CGOTRESTORE.
4869         (CGOTSETUP, CGOTRESTORE): Define.
4871 2005-05-29  Richard Henderson  <rth@redhat.com>
4873         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4874         (tf_write, tf_writev): Use it.
4875         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4876         the system minimum.
4878 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4880         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4881         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4882         __librt_*_asynccancel@local.
4884 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4886         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4887         all occurrences of JUMPTARGET.  Instead append @local to labels.
4889 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4891         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4892         size/alignment of struct pthread rather than tcbhead_t.
4893         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4894         Likewise.
4895         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4896         Likewise.
4897         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4898         Likewise.
4900 2005-05-19  Richard Henderson  <rth@redhat.com>
4902         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4903         __sync_val_compare_and_swap, not explicit _si variant.
4904         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4906 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4908         [BZ #915]
4909         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4911 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4913         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4914         .eh_frame section, use cfi_* directives.
4916 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4918         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4919         of "" includes.
4921 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4923         [BZ #1075]
4924         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4925         aio_write blocks.
4927 2005-04-27  Roland McGrath  <roland@redhat.com>
4929         * Makefile (tests): Remove tst-clock2.
4931         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4932         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4933         translating to the kernel clockid_t for our own process/thread clock.
4935         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4937 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4939         * old_pthread_cond_init.c: Include <errno.h>.
4940         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4941         process shared or uses clock other than CLOCK_REALTIME.
4942         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4944 2005-04-13  David S. Miller  <davem@davemloft.net>
4946         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4947         * sysdeps/sparc/sparc64/clone.S: New file.
4949 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4951         [BZ #1102]
4952         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4953         __inline instead of inline.
4954         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4956 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4958         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4959         functionally equivalent, but shorter instructions.
4960         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4961         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4962         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4963         Likewise.
4964         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4965         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4966         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4967         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4968         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4969         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4970         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4971         Likewise.
4972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4973         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4974         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4975         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4976         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4978 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4980         * sysdeps/mips/Makefile: New file.
4981         * sysdeps/mips/nptl-sysdep.S: New file.
4982         * sysdeps/mips/tcb-offsets.sym: New file.
4983         * sysdeps/mips/pthread_spin_lock.S: New file.
4984         * sysdeps/mips/pthread_spin_trylock.S: New file.
4985         * sysdeps/mips/pthreaddef.h: New file.
4986         * sysdeps/mips/tls.h: New file.
4987         * sysdeps/mips/jmpbuf-unwind.h: New file.
4988         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4989         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4990         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4991         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4992         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4993         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4994         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4995         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4996         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4997         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4999 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5001         [BZ #1112]
5002         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5003         variable to scerr.
5005 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5007         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5009 2005-02-25  Roland McGrath  <roland@redhat.com>
5011         * alloca_cutoff.c: Correct license text.
5012         * tst-unload.c: Likewise.
5013         * sysdeps/pthread/allocalim.h: Likewise.
5014         * sysdeps/pthread/pt-initfini.c: Likewise.
5015         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5016         * sysdeps/pthread/bits/sigthread.h: Likewise.
5017         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5018         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5020 2005-02-16  Roland McGrath  <roland@redhat.com>
5022         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5023         Use unsigned int * for ptr_nthreads.
5025 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5027         [BZ #721]
5028         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5029         gcc4.
5031 2005-02-07  Richard Henderson  <rth@redhat.com>
5033         [BZ #787]
5034         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5035         argument.
5037 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5039         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5040         order of arguments in invocation of atomic_add_zero.
5042 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5044         [BZ #737]
5045         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5046         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5047         at least gotntpoff relocation and addition.
5048         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5049         Likewise.
5050         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5051         Likewise.
5052         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5053         Likewise.
5055 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5057         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5058         entry for static tls deallocation fix.
5059         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5060         also contains information whether the memory pointed to is static
5061         TLS or not.
5062         * sysdeps/i386/tls.h: Likewise.
5063         * sysdeps/ia64/tls.h: Likewise.
5064         * sysdeps/powerpc/tls.h: Likewise.
5065         * sysdeps/s390/tls.h: Likewise.
5066         * sysdeps/sh/tls.h: Likewise.
5067         * sysdeps/sparc/tls.h: Likewise.
5068         * sysdeps/x86_64/tls.h: Likewise.
5070 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5072         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5074 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5076         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5077         %esp.
5078         * Makefile (tests): Add tst-align2.
5079         * tst-align2.c: New test.
5080         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5081         -mpreferred-stack-boundary=4.
5083 2004-12-18  Roland McGrath  <roland@redhat.com>
5085         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5086         New file removed withdrawn for the moment.
5088 2004-12-17  Richard Henderson  <rth@redhat.com>
5090         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5091         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5093 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5095         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5096         Increased PTHREAD_STACK_MIN.
5098         * tst-context1.c (stacks): Use bigger stack size.
5100 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5102         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5103         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5105 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5107         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5108         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5109         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5111 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5113         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5115 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5117         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5118         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5120         * tst-getpid1.c: If child crashes, report this first.  Print which
5121         signal.
5123 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5125         * init.c (__pthread_initialize_minimal_internal): Also unblock
5126         SIGSETXID.
5128 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5130         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5131         _POSIX_THREAD_CPUTIME): Define to 0.
5132         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5133         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5134         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5135         __timer_signal_thread_tclk): Remove.
5136         (init_module): Remove their initialization.
5137         (thread_cleanup): Remove their cleanup assertions.
5138         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5139         __timer_signal_thread_tclk): Remove.
5140         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5141         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5142         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5144 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5146         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5147         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5149         * Makefile (tests): Add tst-getpid2.
5150         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5151         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5152         * tst-getpid2.c: New test.
5154 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5156         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5158 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5160         * Makefile (tests): Add tst-getpid1.
5161         * tst-getpid1.c: New file.
5162         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5163         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5165 2004-12-02  Roland McGrath  <roland@redhat.com>
5167         * Makefile (libpthread-nonshared): Variable removed.
5168         ($(objpfx)libpthread_nonshared.a): Target removed.
5169         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5170         These are now handled by generic magic from
5171         libpthread-static-only-routines being set.
5173 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5175         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5176         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5177         _POSIX_THREAD_PRIO_PROTECT): Define.
5178         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5179         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5180         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5182 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5184         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5185         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5186         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5187         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5188         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5189         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5190         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5192 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5194         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5196         * Makefile (libpthread-routines): Add pthread_setschedprio.
5197         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5198         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5199         * pthread_setschedprio.c: New file.
5201 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5203         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5204         * pthread_cancel.c (pthread_create): Likewise.
5206         * Makefile (libpthread-routines): Add vars.
5207         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5208         * init.c (__default_stacksize, __is_smp): Remove.
5209         * vars.c: New file.
5210         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5211         and define a wrapper macro.
5212         (PTHREAD_STATIC_FN_REQUIRE): Define.
5213         * allocatestack.c (__find_thread_by_id): Undefine.
5214         * pthread_create (__pthread_keys): Remove.
5215         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5216         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5217         PTHREAD_STATIC_FN_REQUIRE.
5219 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5221         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5222         parameter to REGISTER macro.
5224 2004-11-17  Roland McGrath  <roland@redhat.com>
5226         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5227         Make sure SIGCANCEL is blocked as well.
5229 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5231         * sysdeps/pthread/setxid.h: New file.
5232         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5233         (struct xid_command): Add forward decl.
5234         (struct pthread_functions): Change return type of __nptl_setxid hook
5235         to int.
5236         * pthreadP.h (__nptl_setxid): Change return type to int.
5237         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5238         calling thread, return its return value and set errno on failure.
5239         * descr.h (struct xid_command): Change id type to long array.
5241         * Makefile: Add rules to build and test tst-setuid1 and
5242         tst-setuid1-static.
5243         * tst-setuid1.c: New test.
5244         * tst-setuid1-static.c: New test.
5246 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5248         * Makefile (tests): Add tst-exit3.
5249         * tst-exit3.c: New test.
5251 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5253         * Makefile (tests): Add tst-exit2.
5254         * tst-exit2.c: New file.
5256 2004-11-09  Roland McGrath  <roland@redhat.com>
5258         [BZ #530]
5259         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5260         here, before calling clone.
5261         * pthread_create.c (start_thread): Don't do it here.
5263 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5265         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5267 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5269         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5270         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5271         assembler warning.
5273 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5275         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5276         if sched_priority is not between minprio and maxprio.
5278 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5280         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5281         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5283         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5284         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5286 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5288         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5289         not-cancelable I/O functions.
5291 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5293         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5294         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5295         make sure 2 is stored in the futex and we looked at the old value.
5296         Fix a few other problems to return the correct value.
5298 2004-10-14  Richard Henderson  <rth@redhat.com>
5300         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5301         make gcc4 happy.
5303 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5305         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5306         of pthread-functions.h and pthreaddef.h.
5307         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5309         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5310         Change __data.__nwaiters from int to unsigned int.
5312         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5313         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5315         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5316         before return type.
5318         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5319         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5321 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5323         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5324         test fails, remove message queue.
5325         (tf_msgsnd): Likewise.
5327 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5329         * tst-clock1.c: Change #ifdef to #if defined.
5330         * tst-clock2.c: Likewise.
5331         * tst-cond11.c: Likewise.
5333         * sysdeps/pthread/timer_create.c (timer_create): Use
5334         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5335         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5336         THREAD_CPUTIME.
5338 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5340         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5341         _POSIX_THREAD_CPUTIME): Define to 0.
5343 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5345         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5346         and _POSIX_THREAD_CPUTIME to zero.
5347         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5348         * tst-barrier2.c: Fix testing for POSIX feature.
5349         * tst-clock1.c: Likewise.
5350         * tst-clock2.c: Likewise.
5351         * tst-cond11.c: Likewise.
5352         * tst-cond4.c: Likewise.
5353         * tst-cond6.c: Likewise.
5354         * tst-flock2.c: Likewise.
5355         * tst-mutex4.c: Likewise.
5356         * tst-mutex9.c: Likewise.
5357         * tst-rwlock12.c: Likewise.
5358         * tst-rwlock4.c: Likewise.
5359         * tst-signal1.c: Likewise.
5360         * tst-spin2.c: Likewise.
5361         * sysdeps/pthread/posix-timer.h: Likewise.
5362         * sysdeps/pthread/timer_create.c: Likewise.
5363         * sysdeps/pthread/timer_routines.c: Likewise.
5365 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5367         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5368         (__lll_mutex_timedlock_wait): Address futex correctly.
5370         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5371         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5372         make sure 2 is stored in the futex and we looked at the old value.
5373         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5374         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5375         which might very well made the code not working at all before.
5376         [BZ #417]
5378 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5380         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5381         allow SIGSETXID to be sent.
5382         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5383         for SIGSETXID to be defined.
5384         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5385         SIGSETXID cannot be blocked.
5387         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5388         Add __extension__ to long long types.
5389         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5390         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5391         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5392         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5393         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5394         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5395         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5397 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5399         * descr.h (struct pthread): Add stopped_start field.
5400         * sysdeps/pthread/createthread.c (create_thread): Set
5401         start_stopped flag in descriptor for new thread appropriately.
5402         * pthread_create.c (start_thread): Only take lock to be stopped on
5403         startup if stopped_start flag says so.
5405 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5407         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5408         is created detached and if yes, do not try to free the stack in case
5409         the thread creation failed.
5410         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5411         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5412         case there has been no error.  [BZ #405]
5414         * pthread_create.c (start_thread): Don't wait for scheduler data
5415         etc to be set at the beginning of the function.  The cancellation
5416         infrastructure must have been set up.  And enable async
5417         cancellation before potentially going to sleep.  [BZ #401]
5419 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5421         * Versions: Remove exports for pthread_set*id_np functions.
5422         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5423         for now.
5424         * Makefile: Don't build pthread_set*id code for now.
5426 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5428         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5429         internal use.
5430         * allocatestack.c (__nptl_setxid): New function.
5431         * descr.h (struct xid_command): Define type.
5432         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5433         (sighandler_setxid): New function.
5434         (__pthread_initialize_minimal): Register sighandler_setxid for
5435         SIGCANCEL.
5436         * pt-allocrtsig.c: Update comment.
5437         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5438         Declare __nptl_setxid.
5439         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5440         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5441         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5442         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5443         and pthread_setresuid_np.
5444         * pthread_setgid_np.c: New file.
5445         * pthread_setuid_np.c: New file.
5446         * pthread_setegid_np.c: New file.
5447         * pthread_seteuid_np.c: New file.
5448         * pthread_setregid_np.c: New file.
5449         * pthread_setreuid_np.c: New file.
5450         * pthread_setresgid_np.c: New file.
5451         * pthread_setresuid_np.c: New file.
5452         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5453         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5454         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5455         and pthread_setresuid_np.
5456         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5457         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5458         pthread_setregid, and pthread_setresgid.
5460 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5462         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5463         ENOMEM when out of memory.
5465 2004-09-10  Roland McGrath  <roland@redhat.com>
5467         [BZ #379]
5468         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5469         code, since we don't try to use the broken CLONE_STOPPED any more.
5470         * pthread_create.c (start_thread): Likewise.
5472 2004-09-15  Richard Henderson  <rth@redhat.com>
5474         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5476 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5478         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5479         (__libc_unwind_longjmp): Delete macro and declare as function.
5480         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5481         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5482         nptl directory.
5483         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5484         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5485         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5487 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5489         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5490         for __USE_XOPEN2K.
5491         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5492         types also for __USE_XOPEN2K.
5493         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5494         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5495         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5496         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5497         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5498         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5499         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5500         [BZ #320]
5502 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5504         * sysdeps/pthread/pthread.h
5505         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5506         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5507         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5508         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5509         [BZ #375]
5511 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5513         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5514         PSEUDO to be used with . prefix.
5516         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5517         Use atomic_increment instead of atomic_exchange_and_add.
5518         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5519         Likewise.
5520         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5521         Likewise.
5522         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5523         Likewise.
5525         * allocatestack.c (allocate_stack): Use atomic_increment_val
5526         instead of atomic_exchange_and_add.
5527         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5528         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5529         Likewise.
5530         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5531         Likewise.
5533         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5534         the initialization function might throw.
5536 2005-09-05  Richard Henderson  <rth@redhat.com>
5538         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5539         Move definition inside libpthread, libc, librt check.  Provide
5540         definition for rtld.
5542 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5544         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5545         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5546         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5547         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5548         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5549         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5550         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5551         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5552         * unwind.c: Use it.
5554         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5555         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5556         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5557         Likewise.
5558         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5559         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5560         this is the last waiter, signal pthread_cond_destroy caller and
5561         avoid using the pthread_cond_t structure after unlock.
5562         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5564         Read clock type from the least significant bits of __nwaiters instead
5565         of __clock.
5566         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5567         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5569 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5571         [BZ #342]
5572         * Makefile (tests): Add tst-cond20 and tst-cond21.
5573         * tst-cond20.c: New test.
5574         * tst-cond21.c: New test.
5575         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5576         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5577         it unsigned int.
5578         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5579         Likewise.
5580         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5581         (pthread_cond_t): Likewise.
5582         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5583         Likewise.
5584         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5585         Likewise.
5586         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5587         Likewise.
5588         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5589         (cond_nwaiters): New.
5590         (clock_bits): New.
5591         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5592         if there are waiters not signalled yet.
5593         Wait until all already signalled waiters wake up.
5594         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5595         __nwaiters.  If pthread_cond_destroy has been called and this is the
5596         last waiter, signal pthread_cond_destroy caller and avoid using
5597         the pthread_cond_t structure after unlock.
5598         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5599         decrement it when leaving.  If pthread_cond_destroy has been called
5600         and this is the last waiter, signal pthread_cond_destroy caller.
5601         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5602         Likewise.  Read clock type from the least significant bits of
5603         __nwaiters instead of __clock.
5604         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5605         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5606         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5607         clock type just from the last COND_CLOCK_BITS bits of value.
5608         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5609         instead of __clock, just from second bit of condattr's value.
5611 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5613         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5614         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5615         != 64.
5616         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5618 2004-08-15  Roland McGrath  <roland@frob.com>
5620         * pthread_atfork.c: Update copyright terms including special exception
5621         for these trivial files, which are statically linked into executables
5622         that use dynamic linking for the significant library code.
5624 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5626         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5627         pthread_rwlock_rdlock.
5628         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5629         Decrease __nr_readers_queued after reacquiring lock.
5630         * sysdeps/pthread/pthread_rwlock_timedrdlock
5631         (pthread_rwlock_timedrdlock): Likewise.
5632         Reported by Bob Cook <bobcook47@hotmail.com>.
5634 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5636         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5637         before pthread_barrier_wait.
5639 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5642         Remove unnecessary exception handling data.
5644 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5646         [BZ #284]
5647         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5648         instead of clockid_t.
5650 2004-07-21  Roland McGrath  <roland@redhat.com>
5652         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5654 2004-07-19  Roland McGrath  <roland@redhat.com>
5656         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5658 2004-07-02  Roland McGrath  <roland@redhat.com>
5660         * configure: Don't exit.
5662 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5664         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5665         (__pthread_cond_timedwait): Check for invalid nanosecond in
5666         timeout value.
5668 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5670         * Makefile: Add rules to build and run tst-fini1.
5671         * tst-fini1.c: New file.
5672         * tst-fini1mod.c: New file.
5674 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5676         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5677         if no cancellation support is needed.
5678         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5679         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5680         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5681         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5682         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5683         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5684         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5685         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5686         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5688         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5689         only if not already defined.
5691 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5693         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5694         constraint "m" instead of "0" for futex.
5696         * shlib-versions: Add powerpc64-.*-linux.*.
5698 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5700         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5701         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5702         for valid tv_nsec.
5703         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5704         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5705         bits.
5707 2004-06-29  Roland McGrath  <roland@redhat.com>
5709         * Banner: NPTL no longer has its own version number.
5710         * Makefile (nptl-version): Variable removed.
5711         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5712         using $(version), the glibc version number.
5714 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5716         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5717         Fix branch offset for a PLT entry.
5718         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5719         Likewise.
5720         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5721         Likewise.
5722         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5723         Likewise.
5724         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5725         Likewise.
5727 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5729         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5730         unconditionally.
5732 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5734         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5735         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5736         instead of tv_sec.
5737         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5738         (pthread_rwlock_timedrdlock): Likewise.
5740 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5742         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5743         Set __r7 to val, not mutex.
5745 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5747         * Makefile: Add rules to build tst-rwlock14.
5748         * tst-rwlock14.c: New file.
5750 2004-06-24  Boris Hu  <boris.hu@intel.com>
5752         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5753         check.
5754         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5756 2004-06-19  Andreas Jaeger  <aj@suse.de>
5758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5759         assembler in last patch.
5761 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5763         * sysdeps/pthread/pthread_cond_timedwait.c
5764         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5765         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5766         (__pthread_cond_timedwait): Check for invalid nanosecond in
5767         timeout value.
5768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5769         * tst-cond19.c: New file.
5770         * Makefile: Add rules to build and run tst-cond19.
5772 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
5774         * tst-context1.c (GUARD_PATTERN): Defined.
5775         (tst_context_t): Define struct containing ucontext_t & guard words.
5776         (ctx): Declare as an array of tst_context_t.
5777         (fct): Verify uc_link & guard words are still valid.
5778         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
5780 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5782         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5783         Add __data.__futex field, reshuffle __data.__clock.
5784         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5785         (__pthread_cond_signal): Increment __futex at the same time as
5786         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5787         address of low 32-bits of __wakeup_seq to futex syscall.
5788         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5789         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5790         releasing internal lock to FUTEX_WAIT.
5791         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5792         (__pthread_cond_timedwait): Likewise.
5793         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5794         (FUTEX_CMP_REQUEUE): Define.
5795         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5796         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5797         Pass __futex value from before the unlock and __futex address instead
5798         of address of low 32-bits of __wakeup_seq to futex syscall.
5799         Fallback to FUTEX_WAKE all on any errors.
5801 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
5803         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5804         comment typo.
5805         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5806         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5807         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5808         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5809         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
5811 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5813         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5814         Add memory clobber to inline assembly.
5815         (__lll_mutex_trylock): Likewise.
5816         (__lll_mutex_cond_trylock): Likewise.
5818 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5820         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5821         Pass val argument as 6th system call argument in %r7.
5823 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5825         * Makefile (tests): Add tst-cond16.
5826         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5827         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5828         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5829         Add __data.__futex field, reshuffle __data.__clock.
5830         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5831         (__pthread_cond_signal): Increment __futex at the same time as
5832         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5833         address of low 32-bits of __wakeup_seq to futex syscall.
5834         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5835         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5836         releasing internal lock to FUTEX_WAIT.
5837         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5838         (__pthread_cond_timedwait): Likewise.
5839         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5840         (FUTEX_CMP_REQUEUE): Define.
5841         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5842         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5843         Pass __futex value from before the unlock and __futex address instead
5844         of address of low 32-bits of __wakeup_seq to futex syscall.
5845         Fallback to FUTEX_WAKE all on any errors.
5846         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5847         Define.
5848         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5849         internally.  Return non-zero if error, zero if success.
5850         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5851         Add __data.__futex field, reshuffle __data.__clock.
5852         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5853         Define.
5854         (lll_futex_requeue): Add val argument, return 1 unconditionally
5855         for the time being.
5856         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5857         Add __data.__futex field, reshuffle __data.__clock.
5858         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5859         Define.
5860         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5861         internally.  Return non-zero if error, zero if success.
5862         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5863         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5864         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5865         Define.
5866         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5867         internally.  Return non-zero if error, zero if success.
5868         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5869         Add __data.__futex field, reshuffle __data.__clock.
5870         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5871         Define.
5872         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5873         internally.  Return non-zero if error, zero if success.
5874         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5875         Add __data.__futex field, reshuffle __data.__clock.
5876         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5877         Add __data.__futex field, reshuffle __data.__clock.
5878         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5879         Increment __futex at the same time as __wakeup_seq or __total_seq.
5880         Pass address of __futex instead of address of low 32-bits of
5881         __wakeup_seq to futex syscall.
5882         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5883         Pass __futex value from before releasing internal lock
5884         to FUTEX_WAIT.
5885         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5886         Likewise.  Avoid unnecessary shadowing of variables.
5887         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5888         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5889         unlock and __futex address instead of address of low 32-bits of
5890         __wakeup_seq to futex_requeue macro, adjust for new return value
5891         meaning.
5892         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5893         (__pthread_cond_signal): Increment __futex at the same time as
5894         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5895         address of low 32-bits of __wakeup_seq to futex syscall.
5896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5897         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5898         releasing internal lock to FUTEX_WAIT.
5899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5900         (__pthread_cond_timedwait): Likewise.
5901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5902         (FUTEX_CMP_REQUEUE): Define.
5903         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5904         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5905         Pass __futex value from before the unlock and __futex address instead
5906         of address of low 32-bits of __wakeup_seq to futex syscall.
5907         Fallback to FUTEX_WAKE all on any errors.
5909 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5911         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5912         Add nop to align the end of critical section.
5913         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5915 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5917         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5918         Add __broadcast_seq field.
5919         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5920         all waiters as woken with woken_seq and bump broadcast counter.
5921         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5922         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5923         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5924         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5926 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5929         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5930         Reported by Kaz Kojima.
5932 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5934         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5936 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5938         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5939         __broadcast_seq with bc_seq after acquiring internal lock instead of
5940         before it.
5942 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5944         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5945         compilation.
5946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5947         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5948         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5949         (pthread_cond_t): Add __data.__broadcast_seq field.
5950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5951         (FRAME_SIZE): Define.
5952         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5953         Comment typo fixes.
5954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5955         Define.
5956         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5957         typo fixes.
5958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5959         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5960         fixes.
5962 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5964         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5965         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5966         Add __broadcast_seq field.
5967         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5968         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5969         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5970         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5971         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5973         all waiters as woken with woken_seq and bump broadcast counter.
5974         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5976         __broadcast_seq field.
5977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5978         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5979         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5980         * pthread_cond_init.c: Initialize __broadcast_seq field.
5981         * Makefile (tests): Add tst-cond17 and tst-cond18.
5982         Add .NOTPARALLEL goal.
5983         * tst-cond16.c: New file.  From Jakub.
5984         * tst-cond17.c: New file.  From Jakub.
5985         * tst-cond18.c: New file.  From Jakub.
5987 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5989         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5990         unwind info.
5992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5993         Parametrize frame size.  Correct some unwind info.
5994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5996 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5998         * tst-stack3.c: Note testing functionality beyond POSIX.
6000 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6002         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6003         Change conditional from ifdef to if.
6005 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6007         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6008         SYSDEP_CANCEL_ERROR): Define.
6009         (PSEUDO): Use it.
6011 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6013         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6015 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6017         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6019 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6021         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6022         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6023         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6024         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6026 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6028         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6029         thread has all signals blocked.
6031 2004-04-18  Andreas Jaeger  <aj@suse.de>
6033         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6034         (SEM_VALUE_MAX): Add missing brace.
6036 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6038         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6039         in rt subdir.
6040         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6041         * sysdeps/pthread/tst-mqueue8x.c: New test.
6042         * tst-cancel4.c: Update comment about message queues.
6044         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6045         return it_value { 0, 0 }.
6046         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6047         like SIGEV_SIGNAL.
6048         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6049         assertion for SIGEV_NONE.
6050         (thread_attr_compare): Compare all attributes, not just a partial
6051         subset.
6053 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6055         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6057 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6059         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6060         Just use a plain number.
6061         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6062         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6063         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6064         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6065         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6066         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6067         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6069 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6071         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6072         frame info.
6073         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6075 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6077         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6078         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6079         of calling sigwaitinfo.
6081 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6083         * allocatestack.c (allocate_stack): Set reported_guardsize
6084         unconditionally.
6085         * pthread_getattr_np.c (pthread_getattr_np): Use
6086         reported_guardsize instead of guardsize.
6087         * descr.h (struct pthread): Add reported_guardsize field.
6089 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6091         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6093 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6095         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6097 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6099         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6100         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6101         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6102         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6103         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6104         Define.
6105         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6106         (_POSIX_MESSAGE_PASSING): Define.
6107         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6108         (_POSIX_MESSAGE_PASSING): Define.
6109         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6110         (_POSIX_MESSAGE_PASSING): Define.
6112 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6114         * tst-context1.c (fct): Check whether correct stack is used.
6116 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6118         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6119         matching constraints for asm mem parameters.
6121         * tst-clock2.c (tf): Don't define unless needed.
6123 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6125         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6126         $(gnulib).
6128 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6130         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6131         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6132         * pthreadP.h: Declare __nptl_deallocate_tsd.
6133         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6134         Adjust caller.
6136         * Makefile (tests): Add tst-tsd5.
6137         * tst-tsd5.c: New file.
6139 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6141         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6142         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6143         is SHLIB_COMPAT check.
6144         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6145         (__pthread_attr_getaffinity_old): Likewise.
6146         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6147         (__pthread_getaffinity_old): Likewise.
6148         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6149         (__pthread_setaffinity_old): Likewise.
6151 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6153         * allocatestack.c (_make_stacks_executable): Call
6154         _dl_make_stack_executable first.
6156 2004-03-24  Roland McGrath  <roland@redhat.com>
6158         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6159         constraint instead of "0".
6161 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6163         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6164         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6166         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6167         code to avoid warning.
6169 2004-03-24  Andreas Jaeger  <aj@suse.de>
6171         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6172         (__pthread_attr_setaffinity_old): Remove const.
6174 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6176         * sysdeps/unix/sysv/linux/smp.h: New file.
6177         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6178         * init.c: Define __is_smp.
6179         (__pthread_initialize_minimal_internal): Call is_smp_system to
6180         initialize __is_smp.
6181         * pthreadP.h: Declare __is_smp.
6182         Define MAX_ADAPTIVE_COUNT is necessary.
6183         * pthread_mutex_init.c: Add comment regarding __spins field.
6184         * pthread_mutex_lock.c: Implement adaptive mutex type.
6185         * pthread_mutex_timedlock.c: Likewise.
6186         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6187         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6188         Add __spins field.
6189         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6190         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6191         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6192         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6193         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6194         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6195         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6196         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6197         lll_mutex_cond_trylock.
6198         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6199         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6200         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6201         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6202         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6203         Define BUSY_WAIT_NOP.
6204         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6205         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6207         * tst-mutex5.c: Add support for testing adaptive mutexes.
6208         * tst-mutex7.c: Likewise.
6209         * tst-mutex5a.c: New file.
6210         * tst-mutex7a.c: New file.
6211         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6213         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6214         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6215         vgettimeofday call might destroy the content.
6217         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6218         @pause in the loop.
6220         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6221         No need to restrict type of ret.  Make it int.  Add comment.
6223         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6224         Remove unnecessary setne instruction.
6226 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6228         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6229         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6230         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6231         If realloc fails, break out of the loop.
6233 2004-03-20  Andreas Jaeger  <aj@suse.de>
6235         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6236         (__pthread_setaffinity_old): Fix interface.
6237         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6238         (__pthread_getaffinity_old): Likewise.
6240         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6241         (__pthread_setaffinity_new): Remove duplicate declaration.
6243 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6245         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6246         the return value to a safe register.
6247         (CDISABLE): Set the function argument correctly.
6249 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6251         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6252         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6253         Rewrite so that only one locked memory operation per round is needed.
6254         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6255         (pthread_barrier_wait): After wakeup, release lock only when the
6256         last thread stopped using the barrier object.
6257         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6258         (__pthread_cond_wait): Don't store mutex address if the current
6259         value is ~0l.  Add correct cleanup support and unwind info.
6260         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6261         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6262         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6263         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6264         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6265         Add correct cleanup support and unwind info.
6266         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6267         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6268         information for syscall wrappers.
6270 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6272         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6273         cpusetsize field, remove next.
6274         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6275         parameter for size of the CPU set.
6276         (pthread_setaffinity_np): Likewise.
6277         (pthread_attr_getaffinity_np): Likewise.
6278         (pthread_attr_setaffinity_np): Likewise.
6279         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6280         interface change, keep compatibility code.
6281         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6282         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6283         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6284         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6285         __pthread_getaffinity_np.
6286         * Versions: Add version for changed interfaces.
6287         * tst-attr3.c: Adjust test for interface change.
6288         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6289         increasing buffer sizes.
6290         * pthread_attr_destroy.c: Remove unused list handling.
6291         * pthread_attr_init.c: Likewise.
6293 2004-03-17  Roland McGrath  <roland@redhat.com>
6295         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6296         first argument to clock_getres so we ever enable kernel timers.
6298 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6300         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6302 2004-03-12  Richard Henderson  <rth@redhat.com>
6304         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6305         oldvalue from CENABLE to CDISABLE.
6307 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6309         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6310         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6311         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6312         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6314 2004-03-11  Richard Henderson  <rth@redhat.com>
6316         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6317         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6318         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6320 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6322         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6323         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6324         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6326 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6328         * forward.c (__pthread_cond_broadcast_2_0,
6329         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6330         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6331         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6333 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6335         * sysdeps/sh/tcb-offsets.sym: Add PID.
6336         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6337         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6339 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6341         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6342         include <sysdep-cancel.h>, vfork is no cancellation point.
6343         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6344         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6345         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6347 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6349         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6350         libc_hidden_def.
6351         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6352         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6353         Likewise.
6354         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6355         Likewise.
6356         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6357         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6358         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6359         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6360         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6362         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6363         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6364         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6365         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6366         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6367         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6369         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6370         a local register for saving old PID.  Negate PID in parent upon exit.
6372         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6373         tcb-offsets.h.
6374         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6375         before syscall, set to the old value in the parent afterwards.
6376         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6377         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6378         tcb-offsets.h.
6379         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6380         before syscall, set to the old value in the parent afterwards.
6381         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6382         * sysdeps/s390/tcb-offsets.sym: Add PID.
6384         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6385         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6386         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6387         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6388         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6389         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6391 2004-03-10  Andreas Schwab  <schwab@suse.de>
6393         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6394         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6395         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6397 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6399         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6400         * tst-cancel21.c (do_one_test): Likewise.
6401         Reported by Gordon Jin <gordon.jin@intel.com>.
6403 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6405         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6406         if non-zero and set to INT_MIN if zero.
6407         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6408         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6409         (SAVE_PID, RESTORE_PID): Define.
6410         (__vfork): Use it.
6411         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6412         Use relative path to avoid including NPTL i386/vfork.S.
6413         (SAVE_PID, RESTORE_PID): Define.
6414         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6415         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6416         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6417         tst-vfork2x.
6418         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6419         * tst-vfork1.c: New test.
6420         * tst-vfork2.c: New test.
6421         * tst-vfork1x.c: New test.
6422         * tst-vfork2x.c: New test.
6424 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6426         * sysdeps/i386/tcb-offsets.sym: Add PID.
6427         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6428         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6429         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6431 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6433         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6435 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6437         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6438         _rtld_global_ro.
6440 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6442         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6443         _rtld_global_ro.
6445         * tst-once4.c: Remove unnecessary macro definition.
6447         * tst-mutex7.c (do_test): Limit thread stack size.
6448         * tst-once2.c (do_test): Likewise.
6449         * tst-tls3.c (do_test): Likewise.
6450         * tst-tls1.c (do_test): Likewise.
6451         * tst-signal3.c (do_test): Likewise.
6452         * tst-kill6.c (do_test): Likewise.
6453         * tst-key4.c (do_test): Likewise.
6454         * tst-join4.c (do_test): Likewise.
6455         * tst-fork1.c (do_test): Likewise.
6456         * tst-context1.c (do_test): Likewise.
6457         * tst-cond2.c (do_test): Likewise.
6458         * tst-cond10.c (do_test): Likewise.
6459         * tst-clock2.c (do_test): Likewise.
6460         * tst-cancel10.c (do_test): Likewise.
6461         * tst-basic2.c (do_test): Likewise.
6462         * tst-barrier4.c (do_test): Likewise.
6464 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6466         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6468 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6470         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6471         (__pthread_cond_timedwait): Optimize wakeup test.
6472         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6473         (__pthread_cond_wait): Likewise.
6474         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6475         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6476         Likewise.
6478 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6480         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6481         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6482         the atomic instruction needed.
6483         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6484         (__lll_mutex_lock_wait): Likewise.
6486 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6488         * Makefile (tests): Add tst-cond14 and tst-cond15.
6489         * tst-cond14.c: New file.
6490         * tst-cond15.c: New file.
6492 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6494         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6495         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6496         needs to be implemented differently to be useful.
6498 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6500         * pthread_attr_setschedparam.c: Don't test priority against limits
6501         here.  Set ATTR_FLAG_SCHED_SET flag.
6502         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6503         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6504         from parent thread to child.  If attribute is used and scheduling
6505         parameters are not inherited, copy parameters from attribute or
6506         compute them.  Check priority value.
6507         * pthread_getschedparam.c: If the parameters aren't known yet get
6508         them from the kernel.
6509         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6510         ATTR_FLAG_POLICY_SET flag for thread.
6511         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6512         and ATTR_FLAG_POLICY_SET.
6514         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6516         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6517         fail if stack address hasn't been set.  Just return 0.
6519 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6521         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6522         libpthread for the files in this list.
6523         (CFLAGS-tst-unload): Removed.
6524         * tst-unload.c (do_test): Don't use complete path for
6525         LIBPHREAD_SO.
6527         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6528         tst-_res1mod2.
6530 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6532         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6533         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6534         operation per round is needed.
6535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6536         (__lll_mutex_lock_wait): Likewise.
6538 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6540         * tst-cancel9.c (cleanup): Don't print to stderr.
6542 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6544         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6546 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6548         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6549         (__syscall_error_handler2): Call CDISABLE.
6550         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6551         (__syscall_error_handler2): Call CDISABLE.
6553         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6554         Release lock before the loop, don't reacquire it.
6556         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6558 2004-02-19  Andreas Schwab  <schwab@suse.de>
6560         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6561         Fix last change.
6563 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6565         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6566         (pthread_barrier_wait): After wakeup, release lock only when the
6567         last thread stopped using the barrier object.
6568         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6569         (pthread_barrier_wait): Likewise.
6570         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6571         Likewise.
6572         * Makefile (tests): Add tst-barrier4.
6573         * tst-barrier4.c: New file.
6575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6576         (__pthread_cond_timedwait): Perform timeout test while holding
6577         internal lock to prevent wakeup race.
6578         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6579         * sysdeps/pthread/pthread_cond_timedwait.c
6580         (__pthread_cond_timedwait): Likewise.
6581         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6582         (__pthread_cond_timedwait): Likewise.
6584 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6586         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6587         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6588         * Makefile (tests): Add tst-rwlock13.
6589         * tst-rwlock13.c: New test.
6591 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6593         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6594         (__condvar_tw_cleanup): Little optimization.
6595         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6597 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6599         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6600         libpthread as "lib" parameter to SHLIB_COMPAT.
6601         (__novmx_siglongjmp): Fix typo in function name.
6602         (__novmx_longjmp): Fix typo in function name.
6604 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6606         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6607         __builtin_expect.
6609         * sysdeps/generic/pt-longjmp.c: Moved to...
6610         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6612 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6614         * Makefile (libpthread-routines): Add pt-cleanup.
6615         * pt-longjmp.c: Removed.
6616         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6617         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6618         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6619         Version longjmp, siglongjmp for GLIBC_2.3.4.
6620         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6622 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6624         * sysdeps/pthread/pthread_cond_timedwait.c
6625         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6626         Reuse code.  Add __builtin_expects.
6628         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6629         (__pthread_cond_timedwait): Get internal lock in case timeout has
6630         passed before the futex syscall.
6631         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6633 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6635         * allocatestack.c: Pretty printing.
6637         * sysdeps/pthread/createthread.c (create_thread): Don't add
6638         CLONE_DETACHED bit if it is not necessary.
6640 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6642         * pthread_getattr_np.c: Include ldsodefs.h.
6644 2004-01-16  Richard Henderson  <rth@redhat.com>
6646         * allocatestack.c: Don't declare __libc_stack_end.
6647         * init.c (__pthread_initialize_minimal_internal): Likewise.
6648         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6650 2004-01-15  Richard Henderson  <rth@redhat.com>
6652         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6653         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6654         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6655         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6656         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6657         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6658         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6659         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6661 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6663         * init.c (pthread_functions): Make array const.
6665 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6667         * allocatestack.c (__make_stacks_executable): Change interface.
6668         Check parameters.  Pass parameter on to libc counterpart.
6669         * pthreadP.h: Change declaration.
6671 2004-01-13  Richard Henderson  <rth@redhat.com>
6673         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6674         prototype form.
6675         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6676         Likewise.
6678         * sysdeps/alpha/Makefile: New file.
6679         * sysdeps/alpha/tcb-offsets.sym: New file.
6680         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6681         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6683         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6684         on powerpc version.
6686 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6688         * Makefile (tests): Add tst-backtrace1.
6689         * tst-backtrace1.c: New test.
6691 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6693         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6694         register as second parameter to the REGISTER macro.
6695         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6696         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6697         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6698         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6699         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6700         of thread register as second parameter to REGISTER macro in 64 case.
6702 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6704         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6705         (CFLAGS-getpid.o): Defined.
6706         (CFLAGS-getpid.os): Defined.
6708 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6710         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6711         returned for main thread does not overlap with any other VMA.
6712         Patch by Jakub Jelinek.
6714 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6716         * tst-raise1.c: Include stdio.h.
6718 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6720         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6721         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6722         If pid is 0, set it to selftid.
6723         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6724         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6725         != 0, return self->tid without doing a syscall.
6726         * descr.h (struct pthread): Move pid field after tid.
6728         * Makefile (tests): Add tst-raise1.
6729         * tst-raise1.c: New file.
6731 2003-12-23  Roland McGrath  <roland@redhat.com>
6733         * tst-oddstacklimit.c: New file.
6734         * Makefile (tests): Add it.
6735         (tst-oddstacklimit-ENV): New variable.
6737         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6738         value up to page size for __default_stacksize.
6740 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6742         * Makefile (tests): Add tst-eintr5.
6743         * tst-eintr5.c: New file.
6745         * eintr.c (eintr_source): Prevent sending signal to self.
6747         * tst-eintr2.c (tf1): Improve error message.
6749 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6751         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6752         * sysdeps/unix/sysv/linux/getpid.c: New file.
6753         * pthread_cancel.c: Add comment explaining use of PID field.
6754         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6755         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6756         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6757         temporarily to signal the field must not be relied on and updated
6758         by getpid().
6759         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6760         temporarily negative.
6761         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6763 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6765         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6766         (eintr_source): If ARG != NULL, use pthread_kill.
6767         * tst-eintr1.c: Adjust for this change.
6768         * tst-eintr2.c: Likewise.
6769         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6770         * tst-eintr3.c: New file.
6771         * tst-eintr4.c: New file.
6773 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
6775         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6776         if CANCELSTATE_BITMASK is set.
6777         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6778         Likewise.
6780         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6781         (tests-reverse): Add tst-cancel23.
6782         * tst-cancel22.c: New test.
6783         * tst-cancel23.c: New test.
6785 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
6787         * tst-eintr1.c: Better error messages.
6789         * Makefile (tests): Add tst-eintr2.
6790         * tst-eintr2.c: New file.
6792 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
6794         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6795         (CFLAGS-tst-cancelx21.c): Set.
6796         * tst-cancel21.c: New test.
6797         * tst-cancelx21.c: New test.
6799         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
6800         comparison operand.
6801         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6802         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
6803         * pt-longjmp.c: Include jmpbuf-unwind.h.
6804         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6805         _JMPBUF_UNWINDS.  Adjust compared pointers.
6806         * init.c (__pthread_initialize_minimal_internal): Initialize
6807         pd->stackblock_size.
6808         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6809         * sysdeps/alpha/jmpbuf-unwind.h: New file.
6810         * sysdeps/i386/jmpbuf-unwind.h: New file.
6811         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6812         * sysdeps/s390/jmpbuf-unwind.h: New file.
6813         * sysdeps/sh/jmpbuf-unwind.h: New file.
6814         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6815         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6816         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6817         (_JMPBUF_CFA_UNWINDS): Remove.
6818         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6820 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6822         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6823         (CFLAGS-tst-cancelx20.c): Set.
6824         * tst-cancel20.c: New test.
6825         * tst-cancelx20.c: New test.
6827 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
6829         * init.c (__pthread_initialize_minimal_internal): Don't treat
6830         architectures with separate register stack special here when
6831         computing default stack size.
6833 2003-12-17  Roland McGrath  <roland@redhat.com>
6835         * Makefile (tst-cancelx7-ARGS): New variable.
6836         Reportd by Greg Schafer <gschafer@zip.com.au>.
6838 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
6840         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
6841         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6842         (tst-stack3-ENV): Set.
6843         ($(objpfx)tst-stack3-mem): New.
6844         * tst-stack3.c: New test.
6846 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
6848         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6849         Add unwind directives.  Drop unused .regstk directive.
6850         (_fini_EPILOG_BEGINS): Add unwind directives.
6852 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6854         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6855         Assume parameter is a pointer.
6856         (lll_futex_wake): Likewise.
6857         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6858         Likewise.
6859         (lll_futex_wake): Likewise.
6860         Reported by Boris Hu.
6861         * sysdeps/unix/sysv/linux/unregister-atfork.c
6862         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6864         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6866 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6868         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6869         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6870         __rtld_lock_initialize for ld.so lock.
6871         Patch in part by Adam Li <adam.li@intel.com>.
6873 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6875         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6876         in $(gnulib).  Also, remove stale comment.
6878 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6880         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6881         advantage of new syscall stub and optimize accordingly.
6883         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6884         from SYS_futex, to match expectations of
6885         sysdep.h:DO_INLINE_SYSCALL.
6886         (lll_futex_clobbers): Remove.
6887         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6888         (lll_futex_wake): Likewise.
6889         (lll_futex_requeue): Likewise.
6890         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6891         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6892         Jelinek).
6893         (__lll_mutex_lock): Likewise.
6894         (__lll_mutex_cond_lock): Likewise.
6895         (__lll_mutex_timed_lock): Likewise.
6896         (__lll_mutex_unlock): Likewise.
6897         (__lll_mutex_unlock_force): Likewise.
6899         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6900         comes before the include of <sysdep.h>.
6901         (THREAD_SELF_SYSINFO): New macro.
6902         (THREAD_SYSINFO): Likewise.
6903         (INIT_SYSINFO): New macro.
6904         (TLS_INIT_TP): Call INIT_SYSINFO.
6906         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6908         * sysdeps/pthread/createthread.c (create_thread): Use
6909         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6910         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6911         THREAD_SELF_SYSINFO instead of open code.
6912         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6913         (THREAD_SYSINFO): Likewise.
6915         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6917         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6919 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6921         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6922         instead of .init.  Patch by David Mosberger.
6924 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6926         * sysdeps/pthread/configure.in: Remove broken declaration in C
6927         cleanup handling check.
6929 2003-11-30  Andreas Jaeger  <aj@suse.de>
6931         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6932         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6933         Likewise.
6935 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6937         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6938         * pthread_attr_destroy.c: Include shlib-compat.h.
6939         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6940         is set in iattr->flags.
6941         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6943 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6945         * Makefile (distribute): Add tst-cleanup4aux.c.
6947         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6948         include.
6950 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6952         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6953         pthread_cond_signal.
6955         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6956         store mutex address if the current value is ~0l.
6957         * sysdeps/pthread/pthread_cond_timedwait.c
6958         (__pthread_cond_timedwait): Likewise.
6959         * sysdeps/pthread/pthread_cond_broadcast.c
6960         (__pthread_cond_broadcast): Don't use requeue for pshared
6961         condvars.
6963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6964         (__pthread_cond_wait): Don't store mutex address if the current
6965         value is ~0l.
6966         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6967         (__pthread_cond_timedwait): Likewise.
6968         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6969         (__pthread_cond_broadcast): Don't use requeue for pshared
6970         condvars.
6972         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6973         element with ~0l for pshared condvars, with NULL otherwise.
6975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6976         (__pthread_cond_wait): Don't store mutex address if the current
6977         value is ~0l.
6978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6979         (__pthread_cond_timedwait): Likewise.
6980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6981         (__pthread_cond_broadcast): Don't use requeue for pshared
6982         condvars.
6984         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6985         * tst-cond12.c: New file.
6986         * tst-cond13.c: New file.
6988 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6990         * sysdeps/pthread/configure.in: Make missing forced unwind support
6991         fatal.
6993 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6995         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6997 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6999         * Makefile: Add magic to clean up correctly.
7001 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7003         * unwind.c (FRAME_LEFT): Define.
7004         (unwind_stop): Handle old style cleanups here.
7005         (__pthread_unwind): Handle old style cleanups only if
7006         !HAVE_FORCED_UNWIND.
7007         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7008         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7009         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7010         ($(objpfx)tst-cleanupx4): Likewise.
7011         * tst-cleanup4.c: New test.
7012         * tst-cleanup4aux.c: New.
7013         * tst-cleanupx4.c: New test.
7015 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7017         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7018         lll_mutex_*lock macros to skip atomic operations on some archs.
7020 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7022         * sysdeps/pthread/tst-timer.c (main): Initialize
7023         sigev2.sigev_value as well.
7025 2003-10-15  Roland McGrath  <roland@redhat.com>
7027         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7028         is missing.
7029         * sysdeps/pthread/configure: Regenerated.
7031 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7033         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7034         locking macros.  No distinction between normal and mutex locking
7035         anymore.
7036         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7037         Merge bits from lowlevelmutex.S we still need.
7038         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7039         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7040         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7041         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7042         new mutex implementation.
7043         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7044         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7045         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7046         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7047         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7048         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7049         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7050         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7051         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7052         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7053         symbol for entry point to avoid cancellation.
7055 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7057         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7058         changes.
7059         (SAVE_OLDTYPE_0): Fix a typo.
7061 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7063         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7064         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7066 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7068         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7069         correct offset.
7071 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7073         * Makefile (tests): Add tst-cancel19.
7074         * tst-cancel19.c: New test.
7076 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7078         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7079         restoring of the old cancellation type.
7081 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7083         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7085 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7087         * sysdeps/pthread/malloc-machine.h: New file
7089 2003-09-24  Roland McGrath  <roland@redhat.com>
7091         * allocatestack.c (__make_stacks_executable): Don't ignore return
7092         value from _dl_make_stack_executable.
7094 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7096         * allocatestack.c (__make_stacks_executable): Also change
7097         permission of the currently unused stacks.
7099         * allocatestack.c (change_stack_perm): Split out from
7100         __make_stacks_executable.
7101         (allocate_stack): If the required permission changed between the time
7102         we started preparing the stack and queueing it, change the permission.
7103         (__make_stacks_executable): Call change_stack_perm.
7105         * Makefile: Build tst-execstack-mod locally.
7106         * tst-execstack-mod.c: New file.
7108 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7110         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7112 2003-09-23  Roland McGrath  <roland@redhat.com>
7114         * tst-execstack.c: New file.
7115         * Makefile (tests): Add it.
7116         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7117         (LDFLAGS-tst-execstack): New variable.
7119         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7120         whether to use PROT_EXEC for stack mmap.
7121         (__make_stacks_executable): New function.
7122         * pthreadP.h: Declare it.
7123         * init.c (__pthread_initialize_minimal_internal): Set
7124         GL(dl_make_stack_executable_hook) to that.
7126 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7128         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7129         recommendation from AMD re avoidance of lock prefix.
7131 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7133         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7134         lll_futex_timed_wait instead of lll_futex_wait.
7135         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7136         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7137         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7138         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7139         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7140         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7141         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7142         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7143         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7144         Completely revamp the locking macros.  No distinction between
7145         normal and mutex locking anymore.
7146         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7147         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7148         __lll_lock_timedwait): Fix prototypes.
7149         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7150         __lll_lock_timedwait): Likewise.
7151         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7152         macros, add __builtin_expect.
7153         (lll_mutex_timedlock): Likewise.  Fix return value.
7154         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7155         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7156         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7157         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7158         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7159         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7160         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7161         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7163 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7165         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7166         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7167         operation if possible.
7169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7170         like jumping over the lock prefix.
7172 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7174         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7175         locking macros.  No distinction between normal and mutex locking
7176         anymore.
7177         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7178         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7179         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7180         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7181         locking.  Merge bits from lowlevelmutex.S we still need.
7182         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7183         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7184         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7185         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7186         * Makefile (routines): Remove libc-lowlevelmutex.
7187         (libpthread-rountines): Remove lowlevelmutex.
7188         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7189         for new mutex implementation.
7190         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7192         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7194         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7195         Likewise.
7196         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7197         Likewise.
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7200         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7201         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7205         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7206         Likewise.
7207         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7208         Likewise.
7209         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7210         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7212         Don't use requeue.
7213         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7214         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7216 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7218         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7219         in parameters of asm with output parameters.
7221         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7222         type of DECR parameter to int.
7223         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7225 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7227         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7228         guardsize for each thread.
7230 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7232         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7233         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7234         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7236         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7237         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7238         NULL.
7239         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7240         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7241         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7242         (pthread_getaffinity_np): Add hidden_def.
7244         * Makefile (tests): Add tst-attr3.
7245         * tst-attr3.c: New test.
7247         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7249 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7251         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7252         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7254 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7256         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7257         * tst-align.c: Include tst-stack-align.h.
7258         (tf, do_test): Use TEST_STACK_ALIGN macro.
7260 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7262         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7263         variable.
7265 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7267         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7268         stack-related values for the initial thread.
7270 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7272         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7274 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7276         * pthread_mutex_lock.c: Minor code rearrangements.
7278 2003-09-05  Roland McGrath  <roland@redhat.com>
7280         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7281         Instead, include ../nptl_db/db_info.c to do its magic.
7282         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7283         (__pthread_pthread_key_2ndlevel_size): Likewise.
7284         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7285         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7286         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7287         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7288         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7289         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7290         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7291         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7292         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7293         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7294         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7295         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7296         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7297         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7298         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7299         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7300         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7302 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7304         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7305         of pthread_t to be compatible with LT.
7306         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7307         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7308         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7309         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7310         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7311         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7312         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7314 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7316         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7318 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7320         * unwind-forcedunwind.c: Move to...
7321         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7322         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7323         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7324         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7325         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7326         * unwind.c: Include jmpbuf-unwind.h.
7327         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7329 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7331         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7332         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7333         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7334         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7335         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7336         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7337         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7338         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7339         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7340         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7341         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7342         function.
7343         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7344         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7345         * Makefile (tests): Add tst-stack2.
7346         * tst-stack2.c: New test.
7347         * tst-stack1.c: Include limits.h and sys/param.h.
7348         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7350         * pthread_condattr_setpshared.c: Include errno.h.
7351         (pthread_condattr_setpshared): Return EINVAL if pshared
7352         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7354         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7355         defined symbol for entry point to avoid cancellation.
7356         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7357         Likewise.
7358         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7359         Likewise.
7360         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7361         Likewise.
7362         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7363         Likewise.
7364         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7365         Likewise.
7366         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7367         __close_nocancel, __read_nocancel, __write_nocancel,
7368         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7369         libpthread.so or librt.so, define to corresponding function
7370         without _nocancel suffix.
7371         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7372         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7373         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7375         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7377 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7379         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7380         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7382         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7383         in subsections has a symbol associated with it.
7385         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7386         defined symbol for entry point to avoid cancellation.
7387         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7389 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7391         * Makefile (tests): Add tst-tls5.
7392         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7393         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7394         ($(objpfx)tst-tls5): New.
7395         ($(objpfx)tst-tls6.out): Likewise.
7396         (tests): Depend on $(objpfx)tst-tls6.out.
7397         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7398         (do_test): Check pthread_self () return value alignment.
7399         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7400         (tf): Check pthread_self () return value alignment.
7401         * tst-tls5.c: New test.
7402         * tst-tls5.h: New.
7403         * tst-tls5mod.c: New.
7404         * tst-tls5moda.c: New.
7405         * tst-tls5modb.c: New.
7406         * tst-tls5modc.c: New.
7407         * tst-tls5modd.c: New.
7408         * tst-tls5mode.c: New.
7409         * tst-tls5modf.c: New.
7410         * tst-tls6.sh: New test.
7412         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7413         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7414         * init.c (pthread_functions): Initialize them.
7415         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7416         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7417         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7418         pthread_cond_timedwait@@GLIBC_2.3.2.
7420 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7422         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7423         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7424         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7425         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7426         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7427         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7429         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7431         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7432         _POSIX_THREAD_PRIORITY_SCHEDULING.
7433         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7435 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7437         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7438         nested function, use static inline function from libio.h.
7439         Code by Richard Henderson.
7441         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7442         weak.
7444 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7446         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7447         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7448         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7449         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7450         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7451         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7452         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7453         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7454         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7455         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7456         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7457         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7458         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7459         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7460         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7461         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7462         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7463         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7464         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7465         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7466         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7467         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7468         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7469         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7470         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7471         * sysdeps/sparc/tls.h: New file.
7472         * sysdeps/sparc/tcb-offsets.sym: New file.
7473         * sysdeps/sparc/Makefile: New file.
7474         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7475         * init.c [__sparc__] (__NR_set_tid_address): Define.
7477 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7479         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7480         _IO_release_lock): Define.
7482 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7484         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7485         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7487 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7489         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7490         (__pthread_cleanup_class): Add missing return types of member
7491         functions.
7493 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7495         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7496         (lll_mutex_unlock_force): Add memory barrier between store and futex
7497         syscall.
7499 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7501         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7502         tempmsg in first loop.
7504 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7506         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7507         _POSIX_THREAD_PRIORITY_SCHEDULING.
7508         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7510 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7512         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7513         (__rtld_lock_default_lock_recursive,
7514         __rtld_lock_default_unlock_recursive): Define.
7515         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7516         __rtld_lock_unlock_recursive): Define using
7517         GL(_dl_rtld_*lock_recursive).
7518         * init.c (__pthread_initialize_minimal_internal): Initialize
7519         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7520         Lock GL(_dl_load_lock) the same number of times as
7521         GL(_dl_load_lock) using non-mt implementation was nested.
7523         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7524         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7526 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7528         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7529         PIPE_BUF.
7531 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7533         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7535 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7537         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7538         to first syscall error check.  Move syscall error check for tkill
7539         into __ASSUME_CLONE_STOPPED #ifdef.
7541 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7543         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7544         is not defined, do explicit synchronization.
7545         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7546         is not defined also unlock pd->lock for non-debugging case in case
7547         it is necessary.
7548         * pthread_create.c (start_thread): Always get and release pd->lock
7549         if __ASSUME_CLONE_STOPPED is not defined.
7550         (start_thread_debug): Removed.  Adjust users.
7551         * allocatestack.c (allocate_stack): Always initialize lock if
7552         __ASSUME_CLONE_STOPPED is not defined.
7553         * Makefile (tests): Add tst-sched1.
7554         * tst-sched1.c: New file.
7556         * sysdeps/pthread/createthread.c (do_clone): Only use
7557         sched_setschduler and pass correct parameters.
7559 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7561         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7562         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7563         PTHREAD_STACK_MIN in comments.
7565 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7567         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7568         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7569         argument.
7570         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7571         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7572         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7573         (__pthread_cleanup_upto): Fix prototype.
7574         (_longjmp_unwind): Adjust caller.
7575         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7576         Change second argument to const struct pointer.
7577         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7578         * tst-sem9.c (main): Likewise.
7579         * unwind.c: Include string.h for strlen prototype.
7581 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7583         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7584         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7585         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7586         Define HAVE_CMOV.
7587         Patch by Nicholas Miell <nmiell@attbi.com>.
7589 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7591         * init.c (__pthread_initialize_minimal_internal): Initialize
7592         GL(dl_init_static_tls).
7593         * pthreadP.h (__pthread_init_static_tls): New prototype.
7594         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7595         New functions.
7596         * Makefile (tests): Add tst-tls4.
7597         (modules-names): Add tst-tls4moda and tst-tls4modb.
7598         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7599         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7600         tst-tls4modb.so.
7601         * tst-tls4.c: New file.
7602         * tst-tls4moda.c: New file.
7603         * tst-tls4modb.c: New file.
7605 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7607         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7608         before __timer_dealloc.
7609         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7610         Don't call list_unlink.
7612 2003-07-29  Roland McGrath  <roland@redhat.com>
7614         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7616 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7618         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7619         Don't reuse struct aiocb A if it failed.
7620         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7621         not just one byte, as that does not block.
7623 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7625         * sysdeps/pthread/unwind-resume.c: New file.
7626         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7627         unwind-resume in csu subdir.
7628         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7629         exceptions.
7630         (librt-sysdep_routines, librt-shared-only-routines): Add
7631         rt-unwind-resume.
7632         * sysdeps/pthread/rt-unwind-resume.c: New file.
7633         * unwind-forcedunwind.c: New file.
7634         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7635         (libpthread-shared-only-routines): Likewise.
7636         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7637         * pthreadP.h (pthread_cancel_init): New prototype.
7638         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7640         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7641         attr argument const struct pthread_attr *.
7643         * res.c (__res_state): Return __resp.
7644         * descr.h: Include resolv.h.
7645         (struct pthread): Add res field.
7646         * pthread_create.c: Include resolv.h.
7647         (start_thread): Initialize __resp.
7648         * Makefile (tests): Add tst-_res1.
7649         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7650         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7651         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7652         libpthread.
7653         * tst-_res1.c: New file.
7654         * tst-_res1mod1.c: New file.
7655         * tst-_res1mod2.c: New file.
7657 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7659         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7661         * Makefile: Define various *-no-z-defs variables for test DSOs
7662         which has undefined symbols.
7664 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7666         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7667         Retry if the stwcx fails to store once_control.
7669 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7671         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7672         pthread_attr_setaffinity.
7673         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7674         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7675         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7676         * pthread_attr_destroy.c: Free cpuset element if allocated.
7677         * pthread_create.c: Pass iattr as additional parameter to
7678         create_thread.
7679         * sysdeps/pthread/createthread.c: If attribute is provided and
7680         a new thread is created with affinity set or scheduling parameters,
7681         start thread with CLONE_STOPPED.
7682         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7683         pthread_attr_setaffinity.
7684         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7685         cpuset element.
7687 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7689         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7691 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7693         * sysdeps/pthread/configure.in: Require CFI directives also for
7694         ppc and s390.
7696 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7698         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7699         Add cfi directives.
7701 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7703         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7704         CLEANUP_JMP_BUF.
7705         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7706         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7707         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7709         not self pointer in __writer.  Compare with TID to determine
7710         deadlocks.
7711         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7712         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7713         Likewise.
7714         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7715         Likewise.
7716         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7717         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7718         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7719         macros also when compiling librt.
7721 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7723         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7724         -fasynchronous-unwind-tables.
7725         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7726         (PSEUDO): Add cfi directives.
7727         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7728         Likewise.
7729         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7730         Likewise.
7732 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7734         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7735         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7736         * unwind.c (__pthread_unwind_next): Add hidden_def.
7737         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7738         Likewise.
7739         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7740         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7741         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7742         Likewise.
7743         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7744         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7745         Likewise.
7746         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7747         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7748         __pthread_unregister_cancel and __pthread_unwind_next.
7750 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7752         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7753         different symbol for the cancellation syscall wrapper and
7754         non-cancellation syscall wrapper.
7755         (PSEUDO_END): Define.
7757 2003-07-05  Richard Henderson  <rth@redhat.com>
7759         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7760         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7761         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7762         return actual return value from the syscall, not 0.
7764 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7766         * descr.h (struct pthread): Add pid field.
7767         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7768         (__reclaim_stacks): Likewise.
7769         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7770         also check for PID of the signal source.
7771         (__pthread_initialize_minimal_internal): Also initialize pid field
7772         of initial thread's descriptor.
7773         * pthread_cancel.c: Use tgkill instead of tkill if possible.
7774         * sysdeps/unix/sysv/linux/fork.c: Likewise.
7775         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7776         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7777         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7779 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
7781         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7782         Fix use of parameter.
7783         (__libc_cleanup_pop): Likewise.
7785 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
7787         * init.c (sigcancel_handler): Change parameters to match handler
7788         for SA_SIGACTION.  Check signal number and code to recognize
7789         invalid invocations.
7791 2003-07-03  Roland McGrath  <roland@redhat.com>
7793         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7794         Apply sizeof (struct pthread) bias to r13 value.
7796 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
7798         * sysdeps/pthread/configure.in: Require CFI directives.
7800         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7801         definition.
7802         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7803         libpthread compilation.
7804         * unwind.c (__pthread_unwind): Add hidden_def.
7805         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7807 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7809         * libc-cancellation.c (__libc_cleanup_routine): Define.
7810         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7811         (__pthread_cleanup_pop): Define.
7813 2003-07-01  Richard Henderson  <rth@redhat.com>
7815         * sysdeps/alpha/elf/pt-initfini.c: New file.
7816         * sysdeps/alpha/pthread_spin_lock.S: New file.
7817         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7818         * sysdeps/alpha/pthreaddef.h: New file.
7819         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7820         * sysdeps/alpha/tls.h: New file.
7821         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7822         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7823         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7824         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7825         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7826         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7827         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7828         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7829         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7830         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7832 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7834         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7835         cleanup support and unwind info.
7837 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
7839         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7840         Use correct cleanup handler registration.  Add unwind info.
7841         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7842         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7843         * tst-once3.c: Add cleanup handler and check it is called.
7844         * tst-once4.c: Likewise.
7845         * tst-oncex3.c: New file.
7846         * tst-oncex4.c: New file.
7847         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7849 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7851         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7853 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7855         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7856         (tf_msgsnd): Likewise.
7858         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7859         premature returns a bit more.
7861 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7863         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7864         definition to the front.
7866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7867         the cleanup functions to make the names unique.  Fix dwarf opcode
7868         un unwind table.
7869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7870         functions to make the names unique.  Fix CFA offset for two blocks.
7872 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7874         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7875         missing closing braces.
7876         Patch by Christophe Saout <christophe@saout.de>.
7878 2003-06-24  Roland McGrath  <roland@redhat.com>
7880         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7882 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7884         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7885         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7887         * pthreadP.h: Declare __find_thread_by_id.
7888         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7889         * pthread_clock_gettime.c: Allow using other thread's clock.
7890         * pthread_clock_settime.c: Likewise.
7891         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7892         * Makefile: Add rules to build and run tst-clock2.
7893         * tst-clock2.c: New file.
7895 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7897         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7898         to use exception-based cleanup handler.
7899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7901         * tst-cond8.c (ch): Announce that we are done.
7903         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7905         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7906         Also test aio_suspend with timeout value.
7908 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7910         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7911         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7912         attribute_hidden.
7914         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7915         (__pthread_mutex_lock_internal): Likewise.
7916         (__pthread_mutex_unlock_internal): Likewise.
7917         (__pthread_mutex_unlock_usercnt): Declare.
7918         * pthread_mutex_destroy.c: Always fail if used in any way.
7919         * pthread_mutex_init.c: Update comment.
7920         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7921         * pthread_mutex_timedlock.c: Adjust __nusers.
7922         * pthread_mutex_trylock.c: Adjust __nusers.
7923         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7924         and public interfaces are wrapper with pass additional parameter.
7925         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7926         parameter zero.
7927         * tst-mutex8.c: New file.
7928         * Makefile (tests): Add tst-mutex8.
7929         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7930         __pthread_mutex_unlock_usercnt.
7931         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7933         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7934         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7935         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7936         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7937         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7938         Add __nusers.
7939         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7940         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7941         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7942         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7943         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7945         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7946         * pthread_mutex_timedlock.c: Likewise.
7947         * pthread_mutex_trylock.c: Adjust __nusers.
7948         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7949         * tst-mutex9.c: New file.
7950         * Makefile (tests): Add tst-mutex9.
7951         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7952         * sysdeps/ia64/tls.h: Likewise.
7953         * sysdeps/powerpc/tls.h: Likewise.
7954         * sysdeps/s390/tls.h: Likewise.
7955         * sysdeps/sh/tls.h: Likewise.
7956         * sysdeps/x86_64/tls.h: Likewise.
7957         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7958         Change type of __owner.
7959         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7960         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7961         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7962         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7963         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7965 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7967         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7968         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7970         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7971         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7972         instead of nr to lll_futex_wake.  Only set errno and return -1
7973         if err < 0.
7975         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7976         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7977         return actual return value from the syscall, not 0.
7979 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7981         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7982         find a random value.
7983         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7984         errno==EIDRM.
7986         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7987         compat_timer_settime.
7988         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7989         compat_timer_gettime.
7990         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7991         compat_timer_getoverrun.
7992         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7993         compat_timer_delete.
7995         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7996         error-checking mutex detect busy mutexes.
7998 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8000         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8001         Add ax to clobber list.
8002         (lll_mutex_cond_lock): Likewise.
8003         (lll_mutex_unlock): Likewise.
8004         (lll_lock): Likewise.
8005         (lll_unlock): Likewise.
8007         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8008         * tst-cancel18.c: New file.
8009         * tst-cancelx18.c: New file.
8011         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8012         and tcdrain.
8014         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8015         * tst-cancel17.c: New file.
8016         * tst-cancelx17.c: New file.
8018         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8019         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8020         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8022         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8024 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8026         * sysdeps/pthread/createthread.c (create_thread): Set
8027         header.multiple_threads unconditionally.
8028         * allocatestack.c (allocate_stack): Likewise.
8029         * descr.h (struct pthread): Add header.multiple_threads
8030         unconditionally.
8031         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8032         Define for librt.  #error if neither libpthread, libc nor librt.
8033         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8034         Likewise.
8035         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8036         CDISABLE): Likewise.
8037         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8038         CDISABLE): Likewise.
8039         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8040         CDISABLE): Likewise.
8041         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8042         CDISABLE): Likewise.  Access header.multiple_threads outside of
8043         libc and libpthread.
8044         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8045         Likewise.
8046         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8047         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8049 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8051         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8052         Also test early cancellation before the thread reaches the cancellation
8053         point.
8055         * Makefile: Compile forward.c with exceptions.
8057         * sysdeps/unix/sysv/linux/sleep.c: New file.
8059 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8061         * Makefile: Add CFLAGS definition to compile function wrappers
8062         duplicated from libc with exceptions.
8063         * tst-cancel4.c: Also check cancellation handlers.
8065         * Makefile: Add rules to build and run tst-cancel16 and
8066         tst-cancelx16.  Add missing CFLAGS definitions.
8067         * tst-cancel16.c: New file.
8068         * tst-cancelx16.c: New file.
8070 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8072         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8073         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8074         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8075         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8077         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8078         (LIBC_CANCEL_RESET): Likewise.
8079         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8080         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8081         librt-cancellation.
8082         (CFLAGS-libcrt-cancellation.c): Define.
8083         * sysdeps/pthread/librt-cancellation.c: New file.
8084         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8085         macros also when compiling librt.
8086         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8087         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8088         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8089         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8090         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8091         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8092         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8094         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8095         compat_timer_create.
8097 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8099         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8101         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8102         __register_atfork.
8103         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8104         Add libc_hidden_def.
8106 2003-06-13  Roland McGrath  <roland@redhat.com>
8108         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8109         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8111 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8113         * allocatestack.c (queue_stack): Always inline.
8114         * ptreadhP.h (__do_cancel): Likewise.
8116 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8118         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8119         a typo.
8121 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8124         (__pthread_cond_signal): Remove incorrect second addition for
8125         cond_lock!=0.
8127 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8130         (__pthread_cond_signal): Use correct futex pointer in
8131         __lll_mutex_lock_wait call.
8133         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8134         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8136 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8138         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8139         cancelable.
8140         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8141         Likewise.
8143         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8144         hand-written CFI generation code.  Since ENTRY/END also initiated
8145         CFI frames this caused two CFI sets to be generated.
8147 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8149         * cleanup_routine.c: New file.
8150         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8151         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8152         cleanup handling.
8153         * Makefile (libpthread-routines): Add cleanup_routine.
8154         Add more CFLAGS variables to compile with exceptions.  Add comments
8155         why which file needs unwind tables.
8156         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8157         tests.
8158         * tst-cancelx1.c: New file.
8159         * tst-cancelx2.c: New file.
8160         * tst-cancelx3.c: New file.
8161         * tst-cancelx4.c: New file.
8162         * tst-cancelx5.c: New file.
8163         * tst-cancelx6.c: New file.
8164         * tst-cancelx7.c: New file.
8165         * tst-cancelx8.c: New file.
8166         * tst-cancelx9.c: New file.
8167         * tst-cancelx10.c: New file.
8168         * tst-cancelx11.c: New file.
8169         * tst-cancelx12.c: New file.
8170         * tst-cancelx13.c: New file.
8171         * tst-cancelx14.c: New file.
8172         * tst-cancelx15.c: New file.
8173         * tst-cleanupx0.c: New file.
8174         * tst-cleanupx0.expect: New file.
8175         * tst-cleanupx1.c: New file.
8176         * tst-cleanupx2.c: New file.
8177         * tst-cleanupx3.c: New file.
8179         * tst-cleanup0.c: Make standard compliant.
8180         * tst-cleanup1.c: Likewise.
8182         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8183         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8184         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8185         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8186         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8187         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8188         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8189         CLEANUP_JMP_BUF.
8190         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8191         * tst-cancel12.c: New file.
8192         * tst-cancel13.c: New file.
8193         * tst-cancel14.c: New file.
8194         * tst-cancel15.c: New file.
8195         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8196         and tst-cancel15.
8198         * tst-cancel1.c: Add some comments.
8200         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8201         timeout correctly.
8203 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8205         * Makefile (CFLAGS-pthread_cancel.c): Define.
8207 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8209         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8210         Change type of __writer element to int.
8211         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8212         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8213         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8214         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8215         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8216         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8217         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8218         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8219         Compare with TID to determine deadlocks.
8220         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8221         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8222         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8223         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8224         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8226         Likewise.
8227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8228         Likewise.
8229         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8230         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8231         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8232         Likewise.
8233         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8234         Likewise.
8235         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8236         * Makefile (tests): Add tst-rwlock12.
8237         * tst-rwlock12.c: New file.
8239 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8241         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8242         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8243         Remove bogus hidden_proto.
8244         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8245         Likewise.
8246         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8247         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8248         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8249         ___lll_mutex_timedlock): Likewise.
8251 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8254         (__pthread_cond_signal): Add some code to eventually handle
8255         cond_lock!=0.
8257 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8259         * Makefile (tests): Add tst-exec4.
8260         (tst-exec4-ARGS): Define.
8261         * tst-exec4.c: New file.
8263 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8265         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8266         Also fail if tv_nsec < 0.
8267         (__lll_timedwait_tid): Likewise.
8268         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8269         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8270         Likewise.
8271         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8272         Likewise.
8273         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8274         Likewise.
8275         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8276         Likewise.
8277         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8278         Likewise.
8279         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8280         Likewise.
8282         * Makefile (tests): Add tst-sem8 and tst-sem9.
8283         * tst-sem8.c: New file.
8284         * tst-sem9.c: New file.
8285         * sem_open.c: Fix creation of in_use record if the file exists but
8286         no internal record.
8288         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8289         definitions.
8291         * sysdeps/pthread/timer_create.c (timer_create): In case
8292         evp==NULL, assign timer ID to sival_ptr.
8294         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8295         struct pthread_unwind_buf *.
8296         (struct pthread): Likewise for cleanup_jmp_buf element.
8298         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8299         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8300         * unwind.c (__pthread_unwind_next): Likewise.
8302 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8304         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8305         (lll_futex_timed_wait): Use int for futex value parameter.
8306         (lll_futex_wake): Likewise.
8307         (lll_futex_requeue): Likewise.
8309         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8310         Replace one memory operation with one register operation.
8312         * tst-join4.c (do_test): Fix error message.
8314         * tst-rwlock6.c (do_test): Use correct format specifier.
8316         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8317         (__lll_mutex_lock_wait): Replace one memory operation with one
8318         register operation.
8319         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8320         (__lll_mutex_lock_wait): Likewise.
8322         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8323         (__lll_mutex_cond_lock): Add one to value parameter of
8324         __lll_lock_wait to reflect reality in the futex syscall.
8325         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8326         (lll_mutex_cond_lock): Likewise.
8328 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8330         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8331         New function.
8332         (lll_mutex_cond_lock): Define.
8334 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8336         * Makefile (tests): Add tst-signal6.
8337         * tst-signal6.c: New file.
8339         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8340         (__lll_mutex_unlock_force): New function
8341         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8343         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8344         (__lll_mutex_unlock_force): New function.
8345         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8347         * tst-rwlock7.c (do_test): Use correct format specifier.
8349         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8350         Find break parameter in correct asm argument.
8352 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8354         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8355         Remove out4.
8356         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8357         error occured.
8358         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8359         Add __mutex.
8360         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8361         lll_futex_requeue, lll_mutex_unlock_force): Define.
8363 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8365         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8366         (pthread_cond_t): Add __mutex.
8367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8368         lll_futex_requeue, lll_mutex_unlock_force): Define.
8370 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8372         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8373         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8374         Add __mutex field.
8375         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8376         Define.
8377         (lll_futex_wait, lll_futex_wake): Define.
8378         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8379         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8380         FUTEX_REQUEUE instead of FUTEX_WAIT.
8381         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8382         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8383         mutex which was used in condvar structure.  Call
8384         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8385         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8387         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8388         include tcb-offsets.h.  Read wakeup value in locked region.
8389         Use the value of gbr register as THREAD_ID.
8390         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8392         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8394         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8395         macros.
8397 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8399         * sysdeps/pthread/pthread_cond_broadcast.c
8400         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8402 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8404         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8405         typo in register name.
8406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8407         correctly.  Actually use requeue.  Little optimization.
8408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8409         mutex address early.  Handle cancellation state as 32-bit value.
8410         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8411         Remove unnecessary label.
8413 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8415         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8416         instead of FUTEX_WAIT.
8417         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8419         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8422         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8423         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8424         of __pthread_mutex_lock_internal.
8425         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8426         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8427         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8428         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8431         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8432         Add pthread_mutex_cond_lock.
8433         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8434         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8435         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8436         lll_mutex_cond_lock.
8437         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8438         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8440         Add __mutex field.
8441         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8442         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8444         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8445         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8447         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8448         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8449         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8450         macro don't define aliases.
8452         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8453         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8454         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8455         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8458         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8462 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8464         * sem_open.c: Fix one endless loop.  Implement correct semantics
8465         wrt opening the same semaphore more then once.
8466         * sem_close.c: Adjust for sem_open change.
8467         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8468         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8469         * Makefile (tests): Add tst-sem7.
8470         * tst-sem7.c: New file.
8472 2003-05-16  Roland McGrath  <roland@redhat.com>
8474         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8475         uninitialized variable braino.
8477 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8479         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8480         test for syscall availability.
8482         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8483         __no_posix_timers to -1 if the syscalls don't exist.
8485         * pthread_join.c (pthread_join): Set tid field of the joined
8486         thread to -1.  This isn't necessary but helps to recognize some
8487         error conditions with almost no cost.
8489         * allocatestack.c (FREE_P): Also negative values indicate an
8490         unused stack.
8492         * unwind.c: Include <unistd.h>.
8494 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8496         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8498 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8500         * Makefile (crti-objs, crtn-objs): New variables.
8501         (omit-deps, extra-objs): Add crtn.
8502         ($(objpfx)libpthread.so): Depend on both crti and crtn
8503         and links to them in multidir.
8504         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8506 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8508         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8509         (lll_mutex_unlock): Use atomic_exchange_rel.
8511 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8513         * cond-perf.c (cons): Add missing locking around setting of alldone.
8515 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8517         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8518         related macros.
8519         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8521 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8523         * tst-sem6.c: New file.
8524         * Makefile (tests): Add tst-sem6.
8526         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8527         Use atomic_exchange_rel instead of atomic_exchange.
8528         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8529         Likewise.
8531         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8532         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8533         vsyscall is possible.
8535         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8536         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8537         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8538         pthread_setaffinity_np.
8539         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8540         and pthread_setaffinity_np.
8541         * Makefile (libpthread-routines): Add pthread_getaffinity and
8542         pthread_setaffinity.
8544         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8545         use it in case mmap to allocate the stack fails.
8546         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8547         ARCH_MAP_FLAGS here.
8548         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8549         ARCH_RETRY_MMAP.
8551 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8553         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8554         handler implementation.  It is now lockless in fork().
8555         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8556         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8557         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8558         declare the __fork_*_lists.
8559         (struct fork_handler): Include pointers to all three functions.
8560         Add next, refcntr and need_signal elements.
8561         (__fork_handlers): New declaration.
8562         (__register_atfork_malloc): Remove declaration.
8563         (HAVE_register_atfork_malloc): Remove definition.
8564         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8565         __pthread_child_handler variable.
8566         (__libc_pthread_init): Use __register_atfork instead of explicitly
8567         adding to the list.
8568         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8569         and lll_futex_wake.
8570         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8572         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8573         function must never be reached.
8575         * cond-perf.c: New file.
8577 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8579         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8581 2003-05-04  Roland McGrath  <roland@redhat.com>
8583         * Makefile ($(objpfx)../libc.so): New target.
8585 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8587         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8588         (pthread_condattr_t): Size is only an int, don't use long for
8589         alignment.
8590         (pthread_mutexattr_t): Likewise.
8591         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8592         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8593         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8595 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8597         * sysdeps/i386/tls.h: Define THREAD_ID.
8598         * sysdeps/ia64/tls.h: Likewise.
8599         * sysdeps/powerpc/tls.h: Likewise.
8600         * sysdeps/s390/tls.h: Likewise.
8601         * sysdeps/sh/tls.h: Likewise.
8602         * sysdeps/x86_64/tls.h: Likewise.
8603         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8604         record ownership.
8605         * pthread_mutex_timedlock.c: Likewise.
8606         * pthread_mutex_trylock.c: Likewise.
8607         * pthread_mutex_unlock.c: Likewise.
8608         * pthread_rwlock_trywrlock.c: Likewise.
8609         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8610         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8611         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8612         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8614         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8615         flag.
8617 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8619         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8620         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8621         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8622         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8623         Make __align long long instead of long.
8624         (pthread_rwlock_t): Formatting.
8625         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8626         (pthread_rwlock_t): Formatting.
8627         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8628         (pthread_cond_t): Make __align long long instead of long.
8629         (pthread_rwlock_t): Move __flags field to the same position as in
8630         linuxthreads.
8632 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8634         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8635         * tst-rwlock7.c (do_test): Likewise.
8637 2003-04-26  Roland McGrath  <roland@redhat.com>
8639         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8641 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8643         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8644         sizeof (struct pthread).
8645         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8646         1 struct pthread.
8647         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8648         to 0.
8649         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8650         struct pthread.
8651         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8652         to 32-bit bytes.
8653         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8654         tcbp.
8655         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8656         unneccessarily.
8657         (NO_TLS_OFFSET): Define.
8658         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8659         add TLS_TCB_SIZE unnecessarily.
8661 2003-04-22  Roland McGrath  <roland@redhat.com>
8663         * Makeconfig (shared-thread-library): Reverse link order to work
8664         around linker bug.
8666 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8668         * semaphore.h: Fix typo in comment.
8670 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8672         * sysdeps/pthread/sigfillset.c: New file.
8674         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8675         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8676         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8677         * sysdeps/pthread/sigaction.c: Likewise.
8678         * sysdeps/pthread/sigprocmask.c: New file.
8679         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8680         __SIGRTMIN+1.
8681         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8682         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8683         in this case.
8685 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8687         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8688         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8690         * sysdeps/unix/sysv/linux/unregister-atfork.c
8691         (__unregister_atfork): Don't free memory not allocated dynamically.
8693         * semaphore.h: Remove __THROW marker from cancellation points.
8694         * nptl/sysdeps/pthread/pthread.h: Likewise.
8696 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8698         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8699         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8700         __THROW.
8702 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8704         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8706 2003-04-15  Roland McGrath  <roland@redhat.com>
8708         * forward.c (__pthread_unwind): Tweak to avoid warning.
8710 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8712         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8714 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8717         overflow CFA advance instructions.
8718         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8720 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8722         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8723         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8724         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8725         defined.
8727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8728         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8730         DW_CFA_advance_loc for .Laddl-.Lsubl.
8732 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8734         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8735         position-independent unwind data for static libraries.
8736         Add missing unwind info.  Add comments.
8738         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8743 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8745         * Makefile: Make sure all cancellation points are compiled with
8746         exception and asynchronous unwind tables.
8748         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8749         which mishandles loading of global object addresses in PIC.
8750         (THREAD_SETMEM_NC): Likewise.
8752 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8754         * pthread.h: Define new data structure for cleanup buffer.  Declare
8755         new cleanup handler interfaces.
8756         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8757         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8758         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8759         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8760         it.  Declare old cleanup handler installation functions.
8761         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8762         handling.
8763         * cleanup_defer.c: Likewise.
8764         * cleanup_compat.c: New file.  Old cleanup code.
8765         * cleanup_def_compat.c: New file.  Old cleanup code.
8766         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8767         if own thread descriptor.
8768         * unwind.c: New file.
8769         * forward.c: Add __pthread_unwind.
8770         * init.c (pthread_functions): Add __pthread_unwind.
8771         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8772         Add ptr___pthread_unwind.
8773         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8774         and unwind function.
8775         * Makefile (libpthread-routines): Add cleanup_compat,
8776         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
8777         table generation if necessary.
8778         * version.c: Record whether unwind support is compiled in.
8779         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8780         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8781         handler interfaces.
8782         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8783         complication to generate unwind information for syscall wrappers.
8784         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8785         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8786         __cleanup_fct_attribute.
8788         * Makefile: Add rules to build and run tst-cleanup0.
8789         * tst-cleanup0.c: New file.
8790         * tst-cleanup0.expect: New file.
8792         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
8793         caller.  Optimize to avoid often unecessary local variable.
8795 2003-04-11  Roland McGrath  <roland@redhat.com>
8797         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8798         sets variable `multidir'; include that.
8799         (generated): Add it.
8800         ($(objpfx)$(multidir)/crti.o): New target.
8801         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8803 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8805         * tst-attr2.c (do_test): Add cast to avoid warning.
8806         * tst-mutex4.c (do_test): Likewise.
8808 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
8810         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8811         in child.
8813 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8815         * Makefile (tests): Add tst-detach1.
8816         * tst-detach1.c: New file.
8818 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8820         * sysdeps/pthread/pthread.h: Remove duplicate
8821         pthread_cleanup_{push,pop} definitions.
8823         * tst-barrier2.c: Eliminate warnings.
8824         * tst-cancel4.c: Likewise.
8825         * tst-cond4.c: Likewise.
8826         * tst-cond6.c: Likewise.
8827         * tst-detach1.c: Likewise.
8828         * tst-rwlock4.c: Likewise.
8829         * tst-rwlock6.c: Likewise.
8830         * tst-rwlock7.c: Likewise.
8831         * tst-sem3.c: Likewise.
8832         * tst-spin2.c: Likewise.
8833         * tst-umask1.c: Likewise.
8835 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
8837         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8839 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
8841         * descr.h (struct pthread): Move cancelhandling member to the front.
8843 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
8845         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8846         malloc_parent, and malloc_child statically.
8847         (__register_atfork_malloc): New function.
8848         (free_mem): Don't free any of the malloc_* variables on the list.
8849         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8850         Define HAVE_register_atfork_malloc.
8852 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8854         * sysdeps/pthread/createthread.c (create_thread): Add some more
8855         comments explaining when to set multiple_threads and when not.
8857         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8858         THREAD_ATOMIC_BIT_SET if not already defined.
8859         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8860         THREAD_ATOMIC_BIT_SET:
8861         * sysdeps/x86_64/tls.h: Likewise.
8862         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8863         THREAD_ATOMIC_CMPXCHG_VAL.
8864         (_pthread_cleanup_pop_restore): Likewise.
8865         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8866         (__pthread_enable_asynccancel_2): Likewise.
8867         (__pthread_disable_asynccancel): Likewise.
8868         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8869         (__libc_disable_asynccancel): Likewise.
8870         * init.c (sigcancel_handler): Likewise.
8871         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8872         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8874 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8876         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8877         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8878         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8879         * Makefile (tests): Add tst-cancel11.
8880         * tst-cancel11.c: New file.
8882 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8884         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8885         round, not the first.  Use specific_used flag instead of local
8886         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8887         (__free_tcb): Don't call deallocate_tsd here.
8888         (start_thread): Call deallocate_tsd here.
8889         * pthread_setspecific.c: Set specific_used flag really only when
8890         needed.
8891         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8892         * tst-tsd3.c: New file.
8893         * tst-tsd4.c: New file.
8895 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8897         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8898         Use atomic_exchange_and_add instead of __lll_add.
8899         (__lll_mutex_timedlock): Likewise.
8900         Patch by Ian Wienand.
8902 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8904         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8905         (SINGLE_THREAD_P): Fix typo.
8906         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8908 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8910         * Makefile (tests): Add tst-align.
8911         * tst-align.c: New file.
8912         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8914         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8915         function correctly.
8917         * tst-tsd2.c: Add casts to avoid warnings.
8919 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8921         * descr.h (struct pthread): Move most often used elements to the front.
8923 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8925         * Makefile (libpthread-routines): Add pthread_atfork.
8926         (libpthread-static-only-routines): Add pthread_atfork.
8928 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8930         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8931         of TLS_DTV_AT_TP.
8932         (INSTALL_DTV): Add parens.
8933         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8934         Use passed descr instead of THREAD_SELF.
8935         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8936         (__lll_mutex_timedlock_wait): Correct expected value after
8937         spurious wakeup.
8938         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8939         Release lock before waking up the waiters.
8940         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8941         criteria.  Reorderstruct passed to cleanup handler.  Fix
8942         handling of cancellation and failung pthread_mutex_unlock call.
8943         Use __pthread_enable_asynccancel_2 instead of
8944         __pthread_enable_asynccancel.
8945         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8946         Return result of lock re-get if it fails.
8947         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8948         for __pthread_cleanup_push.
8949         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8950         completely broken rwlock implementation.
8951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8953         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8956         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8957         versioned_symbol macro.
8958         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8959         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8961 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8963         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8964         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8965         and __helper_tid.
8966         (struct timer): Remove th and bar field.
8967         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8968         debugging code.  Create only one helper thread.
8969         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8970         helper thread.
8971         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8972         Renamed.  Define statically.  Use thread info from siginfo.
8973         (__helper_once): New variable.
8974         (__helper_tid): New variable.
8975         (__reset_helper_control): New function.
8976         (__start_helper_thread): New function.
8978         * pthread_create.c (start_thread): Don't use setjmp inside
8979         __builtin_expect to work around gcc bug.
8981         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8982         timer_delete syscall fails, but not with ENOSYS, set
8983         __no_posix_timers.
8985         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8986         (timer_settime): Fix typo.
8987         * sysdeps/unix/sysv/linux/timer_getoverr.c
8988         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8990 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8993         offset of cleanupbuf.__prev.
8995 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8997         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8998         of included file.
9000 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9002         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9003         NULL provide default definition to syscall.
9005 2003-03-25  Roland McGrath  <roland@redhat.com>
9007         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9008         (timer_id2ptr): Fix typo.
9010 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9012         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9013         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9014         * sysdeps/ia64/pthreaddef.h: Likewise.
9015         * sysdeps/powerpc/pthreaddef.h: Likewise.
9016         * sysdeps/s390/pthreaddef.h: Likewise.
9017         * sysdeps/sh/pthreaddef.h: Likewise.
9018         * sysdeps/x86_64/pthreaddef.h: Likewise.
9019         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9020         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9021         being changed.
9022         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9023         SIGTIMER is not unblocked.
9024         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9025         RT signal taken.
9026         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9027         be send.
9028         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9029         pass pointer through as ID.
9030         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9031         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9032         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9033         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9034         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9035         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9036         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9037         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9038         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9039         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9040         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9041         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9042         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9043         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9044         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9045         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9046         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9047         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9048         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9049         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9050         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9051         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9052         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9053         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9054         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9055         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9056         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9057         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9058         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9059         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9060         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9061         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9062         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9064         * pthreadP.h: Remove FRAME_LEFT definition.
9065         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9066         already left frame.  Programs which have this problem are not POSIX
9067         compliant.
9068         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9070 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9072         * sysdeps/pthread/tst-timer.c: Check return values of the
9073         functions we test.
9075 2003-03-23  Roland McGrath  <roland@redhat.com>
9077         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9078         * tst-tls3mod.c: Likewise.
9079         * tst-tls1.c: Likewise.
9080         * tst-tls2.c: Likewise.
9082         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9083         undefined behavior.
9085         * tst-join5.c (tf1, tf2): Add a cast.
9087         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9089         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9090         Don't test anything.
9091         * tst-cond4.c: Likewise.
9092         * tst-cond6.c: Likewise.
9093         * tst-flock2.c: Likewise.
9094         * tst-mutex4.c: Likewise.
9095         * tst-rwlock4.c: Likewise.
9096         * tst-signal1.c: Likewise.
9097         * tst-spin2.c: Likewise.
9098         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9100         * tst-mutex4.c: Use test-skeleton.c.
9101         * tst-spin2.c: Likewise.
9102         * tst-sysconf.c: Likewise.
9103         * tst-barrier2.c: Likewise.
9104         * tst-cond4.c: Likewise.
9105         * tst-cond6.c: Likewise.
9106         * tst-rwlock4.c: Likewise.
9107         * tst-unload.c: Likewise.
9108         * tst-flock2.c (do_test): Use return instead of exit.
9110 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9112         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9114 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9116         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9117         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9118         instead of __lll_compare_and_swap.
9119         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9120         Likewise.
9121         Removed definition if __lll_compare_and_swap.
9123         * cancellation.c: Adjust for new form of compare&exchange macros.
9124         * cleanup_defer.c: Likewise.
9125         * init.c: Likewise.
9126         * libc-cancellation.c: Likewise.
9127         * old_pthread_cond_broadcast.c: Likewise.
9128         * old_pthread_cond_signal.c: Likewise.
9129         * old_pthread_cond_timedwait.c: Likewise.
9130         * old_pthread_cond_wait.c: Likewise.
9131         * pthread_cancel.c: Likewise.
9132         * pthread_create.c: Likewise.
9133         * pthread_detach.c: Likewise.
9134         * pthread_join.c: Likewise.
9135         * pthread_key_delete.c: Likewise.
9136         * pthread_setcancelstate.c: Likewise.
9137         * pthread_setcanceltype.c: Likewise.
9138         * pthread_timedjoin.c: Likewise.
9139         * pthread_tryjoin.c: Likewise.
9140         * sysdeps/pthread/createthread.c: Likewise.
9142 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9144         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9145         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9146         definitions.  Replace uses with calls to atomic_* functions.
9147         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9148         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9149         __lll_test_and_set calls with atomic_exchange_and_add and
9150         atomic_exchange calls respectively.
9151         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9152         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9153         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9154         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9155         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9156         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9157         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9159         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9160         returns the old value.
9162 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9164         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9165         int for variable OLDVAL and correct inline assembler contraint.
9166         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9167         type int for variable OLD.
9169         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9170         only for s390-32.
9171         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9172         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9173         instead of multiple_threads field in the TCB.
9175 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9177         * sysdeps/i386/i686/bits/atomic.h: Removed.
9178         * sysdeps/i386/i586/bits/atomic.h: Removed.
9179         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9180         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9181         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9182         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9183         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9184         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9185         * atomic.h: Removed.  Moved to glibc.
9187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9188         support for clock selection.
9190         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9191         signalling waiters.
9193 2003-03-18  Roland McGrath  <roland@redhat.com>
9195         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9196         Add __lll_rel_instr first.  Add memory clobber.
9197         (lll_mutex_unlock): Use __lll_test_and_set.
9198         From Paul Mackerras <paulus@samba.org>.
9200         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9201         unconditionally.
9202         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9203         (SINGLE_THREAD_P):  Add `header.' prefix.
9204         From Paul Mackerras <paulus@samba.org>.
9206         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9207         pthread_timedjoin_np to ...
9208         (libpthread: GLIBC_2.3.3): ... here.
9209         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9211         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9212         Avoid shadowing VAL variable.
9214         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9215         New macro.
9217 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9219         * Makefile (tests): Add tst-cond11.
9220         * tst-cond11.c: New file.
9222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9223         struct passed to cleanup handler to eliminate one more
9224         instruction.
9225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9227         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9228         (pthrad_cond_t): Replace __unused field with __clock.
9230         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9231         waken all waiters in cleanup handler.
9232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9235         * pthread_condattr_getclock.c: New file.
9236         * pthread_condattr_setclock.c: New file.
9237         * sysdeps/pthread/pthread.h: Declare these new functions.
9238         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9239         * Makefile (libpthread-routines): Add the new functions.
9240         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9241         Renamed field to value.  Document use of the bits.
9242         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9243         change.
9244         * pthread_condattr_setpshared.c: Likewise.
9245         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9246         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9247         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9248         Add __clock field.
9249         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9250         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9251         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9252         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9254         Implement clock selection.
9255         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9256         * pthread-errnos.sym: Add ENOSYS.
9257         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9258         _POSIX_CLOCK_SELECTION.
9259         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9262         invalid .size directive.
9264 2003-03-17  Roland McGrath  <roland@redhat.com>
9266         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9267         Formatting tweaks.
9269 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9271         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9272         Use __lll_add instead of spelling it out.  Use protected symbol names.
9273         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9274         Use __lll_add.
9275         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9276         Renamed from lll_compare_and_swap.  Use new name where necessary.
9277         (__lll_add): Defined.
9278         (__lll_dec_if_positive): Defined.
9279         (__lll_test_and_set): Defined.
9280         * sysdeps/ia64/pthread_spin_init.c: Removed.
9281         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9282         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9283         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9284         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9285         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9286         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9287         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9288         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9289         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9290         __sync_lock_release_si.
9291         Patch by Jakub Jelinek.
9293         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9294         Fix timeout handling.
9295         (__lll_timedwait_tid): Likewise.
9296         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9297         Patch by Jakub Jelinek.
9299         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9301 2003-03-17  Roland McGrath  <roland@redhat.com>
9303         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9304         * sysdeps/pthread/pthread_spin_init.c: New file.
9305         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9306         * sysdeps/powerpc/Makefile: New file.
9307         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9308         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9309         * sysdeps/powerpc/pthreaddef.h: New file.
9310         * sysdeps/powerpc/tcb-offsets.sym: New file.
9311         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9312         * sysdeps/powerpc/tls.h: New file.
9313         * sysdeps/powerpc/bits/atomic.h: New file.
9314         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9315         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9316         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9318         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9319         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9320         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9321         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9322         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9323         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9324         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9325         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9326         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9327         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9328         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9329         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9330         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9331         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9332         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9334         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9335         not gettimeofday.
9336         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9337         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9338         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9339         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9340         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9342 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9344         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9345         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9348         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9350 2003-03-16  Roland McGrath  <roland@redhat.com>
9352         * tst-fork4.c: Include <string.h>.
9353         * tst-signal2.c: Likewise.
9354         * tst-mutex5.c (do_test): exit -> return.
9355         * tst-mutex2.c: Include <stdlib.h>.
9357 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9359         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9360         (__lll_mutex_timedlock_wait): Correct expected value after
9361         spurious wakeup.  Otherwise we would never wait again.
9363         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9364         zone versus inline asm stupidity.  Use correct instructions.
9366         * tst-rwlock6.c: Add some more status output.
9368 2003-03-15  Roland McGrath  <roland@redhat.com>
9370         * sysdeps/pthread/configure.in: New file.
9371         * sysdeps/pthread/configure: New file (generated).
9373 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9375         * allocatestack.c (allocate_stack): Store the exact stack size of
9376         user allocated stacks.
9378 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9380         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9381         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9382         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9383         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9384         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9385         Use `header.' prefix.
9386         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9388 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9390         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9391         __builtin_frame_address, use stack pointer.
9393         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9394         instead of __builtin_frame_pointer.
9396 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9398         * tst-basic1.c (do_test): Add cast to avoid warning.
9399         * tst-basic2.c (do_test): Likewise.
9401         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9402         amount of stack correction.
9404         * tst-fork4.c: Use test-skeleton.c.
9406 2003-03-14  Roland McGrath  <roland@redhat.com>
9408         * init.c: Fix typo "#eli" for "#else".
9410 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9412         * allocatestack.c (__stack_user): Use hidden_data_def.
9413         * pthread_create.c (__pthread_keys): Likewise.
9415         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9417 2003-03-14  Roland McGrath  <roland@redhat.com>
9419         * tst-fork4.c: New file.
9420         * Makefile (tests): Add it.
9422         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9423         we always define the padding space.
9424         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9425         stopped supporting its own extensions fully.
9426         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9427         struct also called `header', so `header.multiple_threads' is the field
9428         name to use on all machines.
9429         * allocatestack.c (allocate_stack): Use `header.' prefix.
9430         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9431         * pthread_create.c (__pthread_create_2_1): Likewise.
9432         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9433         (THREAD_SELF): Likewise.
9434         * sysdeps/x86_64/tls.h: Likewise.
9435         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9436         (SINGLE_THREAD_P): Likewise.
9437         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9438         (SINGLE_THREAD_P): Likewise.
9439         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9440         (SINGLE_THREAD_P): Likewise.
9442         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9443         value directly.
9445 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9447         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9448         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9450         * pthread_create.c (start_thread): setjmp is expected to return 0.
9452         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9453         (THREAD_GETMEM_NC): Likewise.
9455 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9457         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9458         and the size of the stack which must be allocated is a multiple,
9459         allocate one more page.
9460         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9461         MULTI_PAGE_ALIASING.
9463 2003-03-13  Roland McGrath  <roland@redhat.com>
9465         * pthread_create.c (start_thread): Set EXITING_BIT after the
9466         event-reporting (and destructors), not before.
9468 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9470         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9471         lll_futex_wake): Declare register variables as long int instead of
9472         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9473         Make syscall arguments clobbered by the syscall.
9474         (lll_futex_wait): Define using lll_futex_timed_wait.
9476         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9477         to void *.
9479         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9480         PPID if [! NDEBUG].
9482         * allocatestack.c (nptl_ncreated): Only declare if
9483         COLORING_INCREMENT != 0.
9485         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9486         (__libc_enable_asynccancel_2): Remove prototype.
9488         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9489         ctid to match kernel.
9491 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9493         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9494         libc_multiple_threads.
9495         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9496         __libc_multiple_threads to...
9497         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9499         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9500         versioning.
9501         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9502         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9504         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9505         (__pthread_once_internal): Define.
9507         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9508         macros instead of .symver directly.
9509         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9510         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9512         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9513         * sysdeps/x86_64/tcb-offsets.sym: New file.
9514         * sysdeps/x86_64/Makefile: New file.
9516         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9518         to access own pthread_t in TCB.
9519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9520         Likewise.
9521         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9522         Likewise.
9523         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9525 2003-03-12  Roland McGrath  <roland@redhat.com>
9527         * pthread-errnos.sym: New file.
9528         * Makefile (gen-as-const-headers): New variable, list that file.
9529         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9530         header <pthread-errnos.h> instead of defining errno values here.
9531         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9532         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9533         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9535         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9536         Likewise.
9537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9538         Likewise.
9539         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9541         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9542         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9543         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9544         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9545         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9546         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9547         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9548         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9549         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9550         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9551         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9552         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9553         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9554         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9555         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9556         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9557         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9558         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9559         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9560         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9561         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9562         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9563         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9564         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9565         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9567         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9568         CLONE_CHILD_SETTID worked.
9570 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9572         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9573         file.
9574         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9575         file.
9577         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9578         (pthread_cond_t): Add padding.
9580         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9581         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9582         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9584         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9585         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9587         (__pthread_rwlock_timedrdlock): Likewise.
9588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9589         (__pthread_rwlock_wrlock): Likewise.
9590         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9591         (__pthread_rwlock_rdlock): Likewise.
9593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9596         result of lock re-get if it fails.
9598 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9600         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9602         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9603         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9604         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9605         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9606         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9607         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9608         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9609         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9611         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9612         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9614         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9615         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9616         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9617         (create_thread): Likewise.
9618         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9619         * init.c (__pthread_initialize_minimal_internal): Initialize
9620         __libc_multiple_threads_ptr if necessary.
9621         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9622         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9623         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9624         __libc_multiple_threads.
9625         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9626         necessary.
9628         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9629         (THREAD_SETMEM_NC): Likewise.
9631         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9632         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9633         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9634         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9636         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9637         Eliminate one entire instruction.
9639         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9640         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9642         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9643         instead of __pthread_enable_asynccancel.
9644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9645         (__pthread_cond_wait): Likewise.
9646         * sysdeps/pthread/pthread_cond_timedwait.c
9647         (__pthread_cond_timedwait): Likewise.
9648         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9651         (__condvar_cleanup): Wake up all waiters in case we got signaled
9652         after being woken up but before disabling asynchronous
9653         cancellation.
9654         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9655         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9656         (__condvar_cleanup): Likewise.
9658         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9659         Make it an error if architecture has no #if case.  Add x86-64.
9661         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9662         pt-initfini.s generation.
9664         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9665         (TLS_INIT_TP): Fix typo.
9667 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9669         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9670         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9672         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9673         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9674         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9675         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9676         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9677         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9678         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9679         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9681 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9683         * sysdeps/pthread/pthread_cond_timedwait.c
9684         (__pthread_cond_timedwait): Return the result of the final
9685         locking.  If it succeeds, the regular function return value.
9687         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9688         Return result of the final locking.
9689         * version.c (__nptl_main): Work around problems with the strange
9690         INTERNAL_SYSCALL macro on ppc32.
9691         * init.c (__pthread_initialize_minimal_internal): Unblock
9692         SIGCANCEL in case the parent blocked it.
9693         Reported by Paul Mackerras <paulus@samba.org>.
9695         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9696         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9699 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9701         * sysdeps/pthread/pthread_cond_timedwait.c
9702         (__pthread_cond_timedwait): Unlock and fail if
9703         __pthread_mutex_unlock_internal failed.
9705         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9706         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9707         Use ARCH_CLONE.
9708         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9709         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9710         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9711         ALLOCATE_STACK): New macros.
9712         (TLS_TPADJ): New macro.
9713         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9714         (allocate_stack): Handle TLS_DTV_AT_TP and
9715         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9716         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9717         Don't set PD->self.
9718         * init.c [__ia64__] (__NR_set_tid_address): Define.
9720         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9721         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9722         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9723         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9724         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9725         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9726         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9727         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9728         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9729         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9730         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9731         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9732         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9733         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9734         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9735         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9736         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9737         * sysdeps/ia64/bits/atomic.h: New file.
9738         * sysdeps/ia64/Makefile: New file.
9739         * sysdeps/ia64/pthread_spin_init.c: New file.
9740         * sysdeps/ia64/pthread_spin_lock.c: New file.
9741         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9742         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9743         * sysdeps/ia64/pthreaddef.h: New file.
9744         * sysdeps/ia64/tcb-offsets.sym: New file.
9745         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9746         * sysdeps/ia64/tls.h: New file.
9748         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9749         to syscall instead of no arguments.
9751 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9753         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9754         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9755         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9756         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9758         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9759         unused code.
9761         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9763         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9764         lowlevelbarrier.sym.
9765         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9766         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9767         Include lowlevelbarrier.h and don't define offsets locally.
9768         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9770         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9771         (__lll_mutex_lock_wait): Reverse order of first two parameters.
9772         (__lll_mutex_timedlock_wait): Likewise.
9773         (lll_mutex_lock): Adjust asm for that.
9774         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
9775         (lll_lock): Adjust asm for operand order change.
9776         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9777         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9779         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9780         Reverse order of parameters.
9781         (__lll_timedwait_tid): Remove regparms attribute.
9782         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9783         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9785         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9786         (__lll_timedwait_tid): Remove one unnecessary instruction.
9788         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9789         __lll_mutex_timedlock_wait only for NOT_IN_libc.
9790         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9791         lowlevelmutex.S.
9793         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9794         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9795         for NOT_IN_libc.
9796         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9797         lowlevellock.S.
9799         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9800         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
9801         for libc.so.
9802         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9803         define LOCK here (if UP is not defined).  The actual code is in
9804         lowlevelmutex.S.
9806         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9807         LOCK is already defined.  Don't define lll_unlock_wake_cb and
9808         __lll_timedwait_tid for libc.so.
9809         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9810         define LOCK here (if UP is not defined).  The actual code is in
9811         lowlevellock.S.
9813         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9814         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9815         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9816         instead of lowlevelsem.h.
9817         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9818         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9819         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9821         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9822         lowlevelrwlock.sym.
9823         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9824         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9825         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9827         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9828         register loading.
9829         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9830         last changed.  D'oh.
9832         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9834         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9835         of __libc_locking_needed.
9836         (lll_trylock): Initialize %eax to zero.
9838         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9839         pthread_cond_t definition.
9841 2003-03-10  Roland McGrath  <roland@redhat.com>
9843         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9844         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9845         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9846         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9847         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9849         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9850         Instead of setting PD->multiple_threads, set globals
9851         __pthread_multiple_threads and __libc_multiple_threads.
9852         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9853         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9854         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9856         * descr.h (struct pthread): Conditionalize first member on
9857         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9858         containing an anonymous tcbhead_t.  Move `list' member out.
9859         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9860         * allocatestack.c: Remove use of `header.data.' prefix.
9861         * pthread_create.c: Likewise.
9862         * init.c (__pthread_initialize_minimal_internal): Likewise.
9863         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9864         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9865         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9866         * sysdeps/x86_64/tls.h: Likewise.
9867         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9868         (SINGLE_THREAD_P): Likewise.
9869         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9870         (SINGLE_THREAD_P): Likewise.
9871         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9872         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9874 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9876         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9878         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9879         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9881         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9882         leftovers from the ia32 code.
9884         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9885         memory load.
9886         (clear_once_control): Don't load %esi.
9888         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9889         handling.
9891         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9893         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9894         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9896         * Makefile (tests): Add tst-cond10.
9897         * tst-cond10.c: New file.
9899 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9901         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9902         * tst-signal3.c (do_test): Likewise.
9903         * tst-sem5.c (do_test): Likewise.
9904         * tst-kill6.c (do_test): Likewise.
9905         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9907         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9908         of inc/dec.
9909         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9910         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9911         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9912         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9913         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9914         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9915         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9916         Likewise.
9917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9918         Likewise.
9919         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9922         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9924         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9925         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9926         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9928         * allocatestack.c (allocate_stack): If mprotect() fails free the
9929         TLS memory.
9931 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9933         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9935         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9936         lll_wake_tid.  This was used only to work around kernel limits in
9937         the early days.
9938         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9939         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9940         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9941         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9943         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9944         (__pthread_initialize_minimal_internal): Change initialization of
9945         __static_tls_align_m1 appropriately.
9946         * pthreadP.h (__static_tls_align_m1): Renamed from
9947         __static_tls_align.
9948         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9949         instead of __static_tls_align-1.
9951 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9953         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9955         * pthread_create.c: Define __pthread_keys using nocommon
9956         attribute, not by placing it explicitly in bss.
9957         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9959         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9960         Use it in mmap call to allocate stacks.
9962         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9964         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9965         result of the thread function.
9967 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9969         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9970         version is just fine.
9972         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9973         (__pthread_child_handler): Renamed from pthread_child_handler,
9974         exported, and marked hidden.  Change all users.
9975         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9976         free __pthread_child_handler from child list.
9978 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9980         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9982         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9983         Fix handling of cancellation and failing pthread_mutex_unlock call.
9984         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9985         (__pthread_cond_wait): Likewise.
9987         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9988         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9989         lll_futex_timed_wait call.
9990         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9991         (pthread_rwlock_timedwrlock): Likewise.
9993         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9994         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9995         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9997         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9998         check of lll_futex_wake return value.
10000 2003-03-03  Roland McGrath  <roland@redhat.com>
10002         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10004         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10005         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10006         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10008 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10010         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10011         error for CPU clocks.
10013         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10014         _POSIX_MONOTONIC_CLOCK.
10015         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10017         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10018         recent kernels.
10020 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10022         * descr.h (struct pthread): Move cleanup field to the front.
10024 2003-03-01  Roland McGrath  <roland@redhat.com>
10026         * sem_open.c (sem_open): Braino fix.
10028 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10030         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10032         __pthread_cleanup_pop functionality.
10033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10035         * descr.h (struct pthread): Move tid field to the front now that
10036         it is often used.
10038         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10039         (__lll_mutex_timedlock_wait): Remove.
10040         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10041         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10042         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10043         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10044         (lll_unlock_wake_cb): Don't save and restore %esi.
10045         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10046         %esi.
10047         (__lll_timedwait_tid): Add alignment.
10048         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10049         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10050         %esi.
10051         (__lll_timedwait_tid): Removed.
10052         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10053         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10054         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10055         (pthread_barrier_wait): Don't save, load, and restore %esi for
10056         last thread.
10057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10058         (__pthread_cond_signal): Don't save, load, and restore %esi.
10059         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10060         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10061         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10062         Don't save, load, and restore %esi.
10064 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10066         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10067         Release lock before waking up the waiters.
10069         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10071         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10072         (reader_thread): Likewise.
10074         * sysdeps/pthread/pthread_rwlock_unlock.c
10075         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10076         to wake up readers if there are none.
10078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10079         Release internal lock before wake threads.
10081 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10083         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10084         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10085         predefined.
10086         * tst-rwlock9.c: Likewise.
10087         * tst-rwlock10.c: New file.
10088         * tst-rwlock11.c: New file.
10090         * Makefile (tests): Add tst-dlsym1.
10091         * tst-dlsym1.c: New file.
10093         * init.c (__pthread_initialize_minimal_internal): Set
10094         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10095         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10097 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10099         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10101         * tst-cond2.c: Fix sychronization with child.
10103         * tst-rwlock8.c (reader_thread): Remove unused variable.
10105         * Makefile: Add rules to build and run tst-tls3.
10106         * tst-tls3.c: New file.
10107         * tst-tls3mod.c: New file.
10109         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10110         * tst-rwlock8.c: New file.
10111         * tst-rwlock9.c: New file.
10112         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10113         complete broken rwlock implementation.
10114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10115         Likewise.
10116         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10117         Likewise.
10118         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10119         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10120         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10121         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10122         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10123         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10124         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10126 2003-02-23  Roland McGrath  <roland@redhat.com>
10128         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10130 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10132         * Makefile (tests): Add tst-context1.
10133         * tst-context1.c: New file.
10135         * Makefile (tests): Add tst-tls1 and tst-tls2.
10136         * tst-tls1.c: New file.
10137         * tst-tls2.c: New file.
10139         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10140         for failed cmpxchg.
10142         * pthread_create.c (start_thread): Set EXITING_BIT early.
10144         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10145         (THREAD_GETMEM_NC): Likewise.
10147 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10149         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10150         off 3 more bytes by using offset-less instructions when possible.
10152         * Makefile: Add dependency for $(objpfx)version.d.
10154         * eintr.c (eintr_source): Add unnecessary return but the compiler
10155         insists.
10157         * tst-kill3.c: Include <unistd.h>.
10159 2003-02-21  Roland McGrath  <roland@redhat.com>
10161         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10163 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10165         * Makefile (tests): Add tst-eintr1.
10166         (distribute): Add eintr.c.
10167         * tst-eintr1.c: New file.
10168         * eintr.c: New file.
10170         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10172         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10173         Disallow sending SIGCANCEL.
10175         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10176         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10177         * tst-kill1.c: New file.
10178         * tst-kill2.c: New file.
10179         * tst-kill3.c: New file.
10180         * tst-kill5.c: New file.
10181         * tst-kill6.c: New file.
10182         * tst-basic7.c: Renamed to...
10183         * tst-kill4.c: ...this.
10185 2003-02-21  Roland McGrath  <roland@redhat.com>
10187         * Makefile (install-lib-ldscripts): New variable.
10189 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10191         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10192         * pthread_cancel.c: Use INVALID_TD_P.
10193         * pthread_detach.c: Likewise.
10194         * pthread_getschedparam.c: Likewise.
10195         * pthread_setschedparam.c: Likewise.
10196         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10197         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10198         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10199         * pthread_timedjoin.c: Likewise.
10201         * tst-basic7.c: Include <signal.h>.
10203         * pthread_join.c (pthread_join): Limited checking for invalid
10204         descriptors.
10205         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10207 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10209         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10210         beginning of the loop.  Clear the entire first block of TSD.
10211         * Makefile (tests): Add tst-key4.
10212         * tst-key4.c: New file.
10214 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10216         * Makefile (tests): Add tst-basic7.
10217         * tst-basic7.c: New file.
10219         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10220         Add some more __builtin_expect.
10222         * pthreadP.h: Define dummy version of DEBUGGING_P.
10224 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10226         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10227         _POSIX_THREAD_PRIORITY_SCHEDULING.
10228         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10229         _XOPEN_REALTIME_THREADS.
10230         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10232         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10233         kernel returns EINVAL for PID <= 0, work around it.
10235         * Makefile (tests): Add tst-signal5.
10236         * tst-signal5.c: New file.
10238         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10239         and LOGIN_NAME_MAX.
10241         * tst-cancel1.c (tf): Block all signals.
10243         * Makefile (tests): Add tst-basic6.
10244         * tst-basic6.c: New file.
10246         * tst-basic1.c: Add test for process ID.
10248         * Makefile (tests): Add tst-cancel10.
10249         * tst-cancel10.c: New file.
10251         * Makefile (tests): Add tst-signal4.
10252         * tst-signal4.c: New file.
10254         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10255         __sigismember instead of sigismember.  Add __builtin_expect.
10257 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10259         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10260         pthread_setcancelstate, and pthread_rwlock_setpshared.
10262         * tst-cancel7.c (do_test): Make sure the pid file exists before
10263         canceling the thread.
10265         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10266         pthread_rwlock_timedrdlock tests.
10267         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10269         Check for invalid tv_nsec field.
10270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10271         Likewise.
10273         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10274         recursive mutex of overflow.
10276         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10278         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10279         going into an endless loop.
10280         * Makefile (tests): Add tst-cancel9.
10281         * tst-cancel9.c: New file.
10283         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10285 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10287         * tst-mutex5.c (do_test): Add more timedlock tests.
10289         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10290         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10292         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10293         use INLINE_SYSCALL.  Error number is returned, not -1.
10295         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10296         and __deallocate_stack with internal_function.
10297         * pthread_create.c: Adjust definitions appropriately.
10298         * allocatestack.c: Likewise.
10300         * pthread_join.c: Add one more __builtin_expect.
10301         * pthread_timedjoin.c: Likewise.
10303         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10304         not data of sequence number does not match.
10305         Add one __builtin_expect.
10307         * Makefile (tests): Add tst-clock1.
10308         * tst-clock1.c: New file.
10310         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10311         negative arguments.
10312         * Makefile (tests): Add tst-basic5.
10313         * tst-basic5.c: New file.
10315 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10317         * Makefile (tests): Add tst-basic4.
10318         * tst-basic4.c: New file.
10320         * pthreadP.h: Add declaraction for __nptl_nthreads.
10321         * pthread_create.c: Define __nptl_nthreads
10322         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10323         after thread is done.  If then zero, call exit(0).
10324         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10325         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10326         * init.c (pthread_functions): Initialize ptr_nthreads.
10327         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10328         (__reclaim_stacks): Decrement __nptl_nthreads.
10329         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10330         Define.
10331         * Makefile (tests): Add tst-basic3.
10332         * tst-basic3.c: New file.
10334         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10335         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10336         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10337         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10338         if asynchronous canceling is enabled.
10339         * pthread_join.c (pthread_join): When recognizing circular joins,
10340         take into account the other thread might be already canceled.
10341         * Makefile (tests): Add tst-join5.
10342         * tst-join5.c: New file.
10344         * Makefile (tests): Add tst-join4.
10345         * tst-join4.c: New file.
10347 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10349         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10351 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10353         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10354         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10355         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10356         warning.
10357         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10358         to avoid warning.
10359         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10360         error if lll_futex_wake failed.
10362 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10364         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10365         handling of cancellation and failung pthread_mutex_unlock call.
10366         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10367         * Makefile (tests): Add tst-cond8 and tst-cond9.
10368         * tst-cond8.c: New file.
10369         * tst-cond9.c: New file.
10371         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10373         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10374         non-standard initializers with __USE_GNU.
10376         * Makefile (tests): Add tst-cleanup3.
10377         * tst-cleanup3.c: New file.
10379 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10381         * Makefile (tests): Add tst-attr1 and tst-attr2.
10382         * tst-attr1.c: New file.
10383         * tst-attr2.c: New file.
10385         * Makefile: Add rules to build and run tst-atfork2 test.
10386         * tst-atfork2.c: New file.
10387         * tst-atfork2mod.c: New file.
10389         * sysdeps/unix/sysv/linux/unregister-atfork.c
10390         (__unregister_atfork): Free the memory allocated for the handlers
10391         after removing them from the lists.
10393         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10394         cleanup function.
10396         * tst-atfork1.c (do_test): Wait for the child we forked.
10397         Report error in child.
10399         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10401         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10403 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10405         * Makefile (tests): Add tst-cancel8.
10406         * tst-cancel8.c: New file.
10408         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10409         clearing of control variable.
10410         * Makefile (tests): Add tst-once3 and tst-once4.
10411         * tst-once3.c: New file.
10412         * tst-once4.c: New file.
10414 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10416         * sysdeps/sh/Makefile: New file.
10417         * sysdeps/sh/bits/atomic.h: New file.
10418         * sysdeps/sh/pthread_spin_init.c: New file.
10419         * sysdeps/sh/pthread_spin_lock.c: New file.
10420         * sysdeps/sh/pthread_spin_trylock.S: New file.
10421         * sysdeps/sh/pthread_spin_unlock.S: New file.
10422         * sysdeps/sh/pthreaddef.h: New file.
10423         * sysdeps/sh/tcb-offsets.sym: New file.
10424         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10425         * sysdeps/sh/tls.h: New file.
10426         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10427         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10428         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10429         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10430         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10431         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10432         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10433         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10434         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10435         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10436         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10437         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10438         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10439         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10440         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10441         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10442         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10443         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10444         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10445         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10446         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10447         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10448         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10449         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10450         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10451         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10452         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10453         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10454         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10455         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10457 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10459         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10460         according to POSIX.
10462         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10464 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10466         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10467         (TLS_GET_FS): New #define.
10468         (TLS_SET_FS): New #define.
10469         Correct value of __NR_set_thread_area.
10471         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10473 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10475         * Makefile (tests): Add tst-popen1.
10476         * tst-popen1.c: New file.
10478         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10479         but inactive generalization.
10480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10482         Minor optimization, remove one instruction.
10483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10485 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10487         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10489 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10491         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10492         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10493         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10494         * sysdeps/pthread/pthread_cond_signal.c: New file.
10495         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10496         * sysdeps/pthread/pthread_cond_wait.c: New file.
10497         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10498         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10499         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10500         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10501         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10502         * sysdeps/s390/Makefile: New file.
10503         * sysdeps/s390/bits/atomic.h: New file.
10504         * sysdeps/s390/pthread_spin_init.c: New file.
10505         * sysdeps/s390/pthread_spin_lock.c: New file.
10506         * sysdeps/s390/pthread_spin_trylock.c: New file.
10507         * sysdeps/s390/pthread_spin_unlock.c: New file.
10508         * sysdeps/s390/pthreaddef.h: New file.
10509         * sysdeps/s390/tcb-offsets.sym: New file.
10510         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10511         * sysdeps/s390/tls.h: New file.
10512         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10513         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10514         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10515         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10516         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10517         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10518         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10519         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10520         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10521         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10522         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10523         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10524         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10525         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10526         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10527         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10528         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10529         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10530         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10531         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10532         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10533         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10534         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10536 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10538         * atomic.h: Add a couple more default implementations.
10539         (atomic_compare_and_exchange_acq): Use
10540         __arch_compare_and_exchange_32_acq in return value definition.  It
10541         always exists.
10542         (atomic_bit_set): Renamed from atomic_set_bit.
10543         Add missing atomic_ prefixes.
10545         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10546         thread library is available, use correct value to mark initialized
10547         once variable.
10549 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10551         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10552         __sysconf to determine pagesize.
10554         * pthread_create.c: Include <atomic.h>.
10555         * allocatestack.c (allocate_stack): Implement coloring of the
10556         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10557         size minus one.  Adjust users.
10558         * sysdeps/i386/i686/Makefile: New file.
10560 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10562         * allocatestack.c: Improve comment throughout the file.
10564         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10565         (__lll_lock_wait): Add branch prediction.
10566         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10567         (__lll_lock_wait): Likewise.
10568         (lll_unlock_wake_cb): Removed.
10570 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10572         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10573         _POSIX_THREAD_PRIORITY_SCHEDULING.
10575 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10577         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10578         Fix return type of ptr___pthread_getspecific.
10580 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10582         * Makefile (tests): Add tst-umask1.
10583         (tst-umask1-ARGS): Define.
10584         * tst-umask1.c: New file.
10586 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10588         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10589         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10590         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10591         pthread_rwlock_unlock.
10592         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10593         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10594         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10595         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10597         New file.
10598         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10599         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10600         New file.
10601         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10602         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10603         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10604         New file.
10605         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10606         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10607         New file.
10608         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10609         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10610         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10611         New file.
10612         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10613         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10614         New file.
10615         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10617         * Makefile (libpthread-routines): Remove lowlevelcond and
10618         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10619         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10620         and pthread_cond_broadcast.
10621         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10622         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10623         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10624         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10625         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10626         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10627         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10628         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10629         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10630         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10635         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10636         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10637         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10638         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10639         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10640         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10641         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10642         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10643         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10644         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10645         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10646         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10647         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10648         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10649         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10650         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10651         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10653         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10654         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10655         of the code is moved to ...
10656         * sysdeps/pthread/createthread.c: ...here.  New file.
10658 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10660         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10661         (__new_sem_post): Clear %eax before returning.
10662         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10664         * Makefile (tests): Add tst-cleanup2.
10665         * tst-cleanup2.c: New file.
10667         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10668         Interpret first parameter correctly.
10670 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10672         * Makefile (headers): Add bits/semaphore.h.
10674 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10676         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10677         if not SHARED.
10679 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10681         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10682         must be used and mapping failed.
10683         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10685         * Makefile (CFLAGS-pthread_self.os): Define this, not
10686         CFLAGS-pthread_self.c.
10688 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10690         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10691         lll_unlock_wake_cb.
10693         * Makefile (libpthread-routines): Add version.  Add rules to build
10694         version.os and banner.h.
10695         * version.c: New file.
10697 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10699         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10700         the alias unconditional.
10701         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10703 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10705         * Makefile (CFLAGS-pthread_self.c): New definition.
10707 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10709         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10710         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10711         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10712         * init.c (__pthread_initialize_minimal_internal): Likewise.
10714 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10716         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10718         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10719         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10720         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10721         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10722         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10723         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10725 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10727         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10728         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10729         * tst-cancel-wrappers.sh: Remove all exceptions.
10731 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10733         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10734         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10736         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10737         Use __libc_pthread_functions array if SHARED.
10739         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10740         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10742         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10743         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10744         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10745         __libc_ptf_call instead of __libc_maybe_call.
10746         (PTF): New #define.
10747         (__libc_cleanup_region_start): Wrap function name with PTF call.
10748         (__libc_cleanup_region_end): Likewise.
10749         (__libc_cleanup_end): Likewise.
10751         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10752         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10753         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10754         * pthreadP.h: Add prototypes.
10756         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10757         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10758         __pthread_rwlock_unlock aliases.
10759         * pthreadP.h: Add prototypes for new aliases.
10761         * pthreadP.h (struct pthead_functions): Moved to...
10762         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10763         * init.c (pthread_functions): Add initializers for new elements.
10765         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10766         __pthread_cleanup_pop_restore aliases.
10767         * pthreadP.h: Add prototypes.
10769         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10770         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10771         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10772         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10773         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10774         * pthreadP.h: Adjust prototypes and callers.
10776 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
10778         * Makefile (tests): Add tst-cancel7.
10779         (tst-cancel7-ARGS): New variable.
10780         * tst-cancel7.c: New file.
10782         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10783         around gcc defficiencies.
10784         * old_pthread_cond_signal.c: Likewise.
10785         * old_pthread_cond_timedwait.c: Likewise.
10786         * old_pthread_cond_wait.c: Likewise.
10788         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10790 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10792         * Makefile (tests): Add tst-cond7.
10793         * tst-cond7.c: New file.
10795         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10796         (condvar_cleanup): Get condvar address from the right place.
10798         * atomic.h: Correct definitions of atomic_full_barrier,
10799         atomic_read_barrier, atomic_write_barrier.
10801         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10802         race-free.
10803         * old_pthread_cond_signal.c: Likewise.
10804         * old_pthread_cond_timedwait.c: Likewise.
10805         * old_pthread_cond_wait.c: Likewise.
10807 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
10809         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10811 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10813         * pthreadP.h (pthread_cond_2_0_t): New type.
10814         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10815         Use new type for the 2.0 condvar function prototypes.
10816         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10817         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10818         parameter.
10819         * old_pthread_cond_destroy.c: Likewise.
10820         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10821         * old_pthread_cond_signal.c: Likewise.
10822         * old_pthread_cond_timedwait.c: Likewise.
10823         * old_pthread_cond_wait.c: Likewise.
10825         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10826         (__pthread_cond_wait): Don't save cancellation mode and seq value
10827         in same location.
10829         * herrno.c (__h_errno_location): Don't define as weak.
10831 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10833         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10834         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10835         and pthread_cond_wait.
10836         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10837         Renamed to...
10838         (__pthread_cond_broadcast_2_0): ... this.
10839         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10840         Renamed to...
10841         (__pthread_cond_destroy_2_0): ... this.
10842         * old_pthread_cond_init.c (__old_pthread_cond_init):
10843         Renamed to...
10844         (__pthread_cond_init_2_0): ... this.
10845         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10846         Renamed to...
10847         (__pthread_cond_signal_2_0): ... this.
10848         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10849         Renamed to...
10850         (__pthread_cond_wait_2_0): ... this.
10851         * pthread_cond_destroy.c: Include shlib-compat.h.
10852         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10853         * pthread_cond_init.c: Include shlib-compat.h.
10854         (pthread_cond_init): Change strong_alias into versioned_symbol.
10855         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10856         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10857         fields.
10858         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10859         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10860         __pthread_cond_wait_2_0): New prototypes.
10861         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10862         __old_pthread_cond_init, __old_pthread_cond_signal,
10863         __old_pthread_cond_wait): Removed.
10864         * init.c: Include shlib-compat.h.
10865         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10866         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10867         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10868         ptr___pthread_cond_*_2_0 fields.
10869         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10870         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10872         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10873         LIBC_SIGACTION was not yet defined.
10874         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10875         [!defined LIBC_SIGACTION] (__sigaction): New function and
10876         libc_hidden_weak.
10877         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10878         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10880 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10882         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10884 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10886         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10887         New, larger type definition.
10888         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10889         implementation.
10890         * Versions [libpthread]: Add definitions for new pthread_cond_*
10891         interfaces for version GLIBC_2.3.2.
10892         * pthread_cond_init.c: Update initialization for new type definition.
10893         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10894         pthread_cond_timedwait, pthread_cond_signal, and
10895         pthread_cond_broadcast.  Add old_pthread_cond_init,
10896         old_pthread_cond_destroy, old_pthread_cond_wait,
10897         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10898         old_pthread_cond_broadcast.
10899         * old_pthread_cond_broadcast.c: New file.
10900         * old_pthread_cond_destroy.c: New file.
10901         * old_pthread_cond_init.c: New file.
10902         * old_pthread_cond_signal.c: New file.
10903         * old_pthread_cond_timedwait.c: New file.
10904         * old_pthread_cond_wait.c: New file.
10905         * pthreadP.h: Add prototypes for the compatibility interfaces.
10907         * pthread_cond_destroy.c: Don't include <errno.h>.
10909 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10911         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10912         unnecessary zero offset when addressing MUTEX.
10914 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10916         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10917         __register_atfork.
10918         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10919         for __register_atfork.
10921 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10923         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10924         instead of ASSEMBLER test macro.
10926         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10927         __libc_current_sigrtmax): Add libc_hidden_def.
10929         * sysdeps/pthread/list.h: Remove assert.h include.
10931 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10933         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10934         __pthread_initialize_minimal_internal not
10935         __pthread_initialize_minimal.
10937 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10939         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10940         __pthread_initialize_minimal as hidden.
10942         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10943         constructor.
10945 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10947         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10948         $(common-objpfx)format.lds, include that into the output script.
10949         Fix comment.
10950         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10952 2002-12-28  Andreas Jaeger  <aj@suse.de>
10954         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10955         nsec resolution changes.
10956         (xstat64_conv): Likewise.
10957         (xstat32_conv): Likewise.
10958         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10959         struct kernel_stat.
10960         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10961         structs stat and stat64.
10962         * time/time.h (__timespec_defined): Define for __USE_MISC.
10963         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10965 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10967         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10968         argument.
10969         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10970         (pthread_exit): Use strong_alias to avoid warnings.
10971         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10972         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10973         ptr___pthread_attr_init_2_*.
10974         * init.c (pthread_functions): Adjust.
10976 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10978         * forward.c: Make all functions available by default again.  It
10979         caused too much trouble.
10981         * pt-siglongjmp.c: Removed.
10983 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10985         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10986         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10987         * sysdeps/i386/Makefile: New file.
10988         * sysdeps/i386/tcb-offsets.sym: New file.
10989         * sysdeps/pthread/tcb-offsets.h: New file.
10990         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10991         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10993         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10994         __register_atfork...
10995         (GLIBC_2.3.2): ...here.
10997 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10999         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11000         pthread_attr_setstackaddr with __attribute_deprecated__.
11002 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11004         * pt-system.c (system): Remove cancellation handling.
11005         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11006         cancellation routines.
11008 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11010         * descr.h: Include <dl-sysdep.h>.
11011         (struct pthread): Move header.data.list to the back of the struct.
11012         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11013         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11014         (SYSINFO_OFFSEET): Likewise.
11016 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11018         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11019         Define.
11020         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11021         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11022         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11023         (USE_DL_SYSINFO): Undef.
11025 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11027         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11028         $(common-objpfx)libc.so.
11029         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11030         it is bigger than pipe buffer size even on arches with bigger
11031         page size.
11032         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11034 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11036         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11037         correct errno access for case that USE___THREAD is not defined.
11039 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11041         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11042         Patch by Marijn Ros <marijn@mad.scientist.com>.
11044 2002-12-22  Roland McGrath  <roland@redhat.com>
11046         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11048 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11050         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11052 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11054         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11055         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11056         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11058         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11059         of int $0x80.
11060         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11061         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11062         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11063         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11064         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11065         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11066         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11067         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11069         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11070         sysenter.
11071         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11073         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11075         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11076         in new TCB.
11077         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11078         that sysinfo is properly initialized.
11079         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11080         to 1 only for ld.so.
11082         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11083         RTLD_CORRECT_DYNAMIC_WEAK.
11085 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11087         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11088         Use return 0 as 6th argument to FORWARD4.
11089         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11091 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11093         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11094         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11095         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11096         (INIT_SYSINFO): New #define.
11097         (TLS_TP_INIT): Use INIT_SYSINFO.
11098         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11099         At test to make sure SYSINFO_OFFSET value is correct.
11100         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11102 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11104         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11105         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11106         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11107         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11108         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11109         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11110         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11112 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11114         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11115         macro instead of using int $0x80 directly.
11117         * sysdeps/pthread/bits/stdio-lock.h: New file.
11118         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11119         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11120         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11121         * Makefile (routines): Add libc-lowlevelmutex.
11123         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11124         __i686.get_pc_thunk.dx.
11126 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11128         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11129         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11130         ($(objpfx)tst-cancel-wrappers.out): New rule.
11131         * tst-cancel-wrappers.sh: New test.
11132         * tst-locale1.c: Include signal.h.
11133         (uselocale): Test static linking of __libc_current_sigrt*.
11135 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11137         * Makefile (tests): Add tst-cancel6.
11138         * tst-cancel6.c: New file
11140 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11142         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11143         Define meaningfully for assembler as well.
11144         * pthreadP.h (struct pthread_functions): Remove
11145         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11146         and ptr_pthread_attr_init_2_1 fields.
11147         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11148         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11149         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11150         (FORWARD3): Define using FORWARD4.
11151         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11152         versions.
11153         * pt-system.c: Remove duplicate stdlib.h include.
11155 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11157         * sem_init.c: Define sem_init@GLIBC_2.0.
11158         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11159         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11161         * flockfile.c: Moved to...
11162         * sysdeps/pthread/flockfile.c: ...here.  New file.
11163         * funlockfile.c: Moved to...
11164         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11165         * ftrylockfile.c: Moved to...
11166         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11168 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11170         * libc-cancellation.c: Guard both function with
11171         #if !defined NOT_IN_libc.
11172         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11173         automatically provided pthread wrappers.
11174         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11175         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11176         nor in libpthread.
11177         * pt-open.c: Removed.
11178         * pt-fcntl.c: Removed.
11179         * pt-fsync.c: Removed.
11180         * pt-lseek.c: Removed.
11181         * pt-msgrcv.c: Removed.
11182         * pt-msgsnd.c: Removed.
11183         * pt-msync.c: Removed.
11184         * pt-nanosleep.c: Removed.
11185         * pt-open64.c: Removed.
11186         * pt-pause.c: Removed.
11187         * pt-pread.c: Removed.
11188         * pt-pread64.c: Removed.
11189         * pt-pwrite.c: Removed.
11190         * pt-pwrite64.c: Removed.
11191         * pt-read.c: Removed.
11192         * pt-recv.c: Removed.
11193         * pt-recvfrom.c: Removed.
11194         * pt-recvmsg.c: Removed.
11195         * pt-send.c: Removed.
11196         * pt-sendto.c: Removed.
11197         * pt-sigtimedwait.c: Removed.
11198         * pt-sigwait.c: Removed.
11199         * pt-wait.c: Removed.
11200         * pt-waitpid.c: Removed.
11201         * pt-write.c: Removed.
11202         * pt-accept.c: Removed.
11203         * pt-close.c: Removed.
11204         * pt-connect.c: Removed.
11205         * pt-lseek64.c: Removed.
11206         * pt-sendmsg.c: Removed.
11207         * pt-tcdrain.c: Removed.
11209 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11211         * init.c (__pthread_initialize_minimal_internal): Renamed from
11212         __pthread_initialize_minimal.  Make old name an alias.  This
11213         converts a normal relocation into a relative relocation.
11215         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11217         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11218         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11219         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11220         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11221         pt-sigwaitinfo, pt-waitid, and pt-writev.
11222         * pt-creat.c: Removed.
11223         * pt-poll.c: Removed.
11224         * pt-pselect.c: Removed.
11225         * pt-readv.c: Removed.
11226         * pt-select.c: Removed.
11227         * pt-sigpause.c: Removed.
11228         * pt-sigsuspend.c: Removed.
11229         * pt-sigwaitinfo.c: Removed.
11230         * pt-waitid.c: Removed.
11231         * pt-writev.c: Removed.
11233         * init.c (pthread_functions): New variable.
11234         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11235         (or NULL) to __libc_pthread_init.
11236         * forward.c: Rewrite to use __libc:pthread_functions array to get
11237         function addresses.
11238         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11239         prototype.
11240         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11241         Take new parameter.  Copy content of variable pointed to by it
11242         to __libc_pthread_init.
11244         * pthreadP.h (struct pthread_functions): New type.
11245         (__libc_pthread_init): Declare.
11247         * pthread_attr_destroy.c: Add namespace protected alias.
11248         * pthread_attr_getdetachstate.c: Likewise.
11249         * pthread_attr_getinheritsched.c: Likewise.
11250         * pthread_attr_getschedparam.c: Likewise.
11251         * pthread_attr_getschedpolicy.c: Likewise.
11252         * pthread_attr_getscope.c: Likewise.
11253         * pthread_attr_setdetachstate.c: Likewise.
11254         * pthread_attr_setinheritsched.c: Likewise.
11255         * pthread_attr_setschedparam.c: Likewise.
11256         * pthread_attr_setschedpolicy.c: Likewise.
11257         * pthread_attr_setscope.c: Likewise.
11258         * pthread_cond_broadcast.c: Likewise.
11259         * pthread_cond_destroy.c: Likewise.
11260         * pthread_cond_init.c: Likewise.
11261         * pthread_cond_signal.c: Likewise.
11262         * pthread_cond_wait.c: Likewise.
11263         * pthread_condattr_destroy.c: Likewise.
11264         * pthread_condattr_init.c: Likewise.
11265         * pthread_equal.c: Likewise.
11266         * pthread_exit.c: Likewise.
11267         * pthread_getschedparam.c: Likewise.
11268         * pthread_self.c: Likewise.
11269         * pthread_setcancelstate.c: Likewise.
11270         * pthread_setschedparam.c: Likewise.
11271         * pthread_mutex_destroy.c: Likewise.
11272         * pthread_mutex_init.c: Likewise.
11273         * pthreadP.h: Add prototypes for the aliases.
11275         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11276         multiple_threads member in correct TCB to 1.
11278         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11279         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11280         member of thread decriptor, otherwise return unconditionally 1.
11282 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11284         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11285         regular Linux version.  Remove file.
11286         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11287         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11288         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11289         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11290         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11291         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11292         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11293         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11294         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11295         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11296         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11297         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11298         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11299         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11300         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11301         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11302         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11303         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11304         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11305         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11306         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11307         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11308         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11309         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11310         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11311         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11312         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11313         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11314         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11315         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11317 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11319         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11320         * sysdeps/unix/sysv/linux/open.c: Removed.
11321         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11322         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11323         * sysdeps/unix/sysv/linux/msync.c: Removed.
11324         * sysdeps/unix/sysv/linux/read.c: Removed.
11325         * sysdeps/unix/sysv/linux/close.c: Removed.
11326         * sysdeps/unix/sysv/linux/creat.c: Removed.
11327         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11328         * sysdeps/unix/sysv/linux/pause.c: Removed.
11329         * sysdeps/unix/sysv/linux/select.c: Removed.
11330         * sysdeps/unix/sysv/linux/write.c: Removed.
11332 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11334         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11335         element in TCB to see whether locking is needed.
11337         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11338         MULTIPLE_THREADS_OFFSET value is correct.
11340         * sysdeps/unix/sysv/linux/close.c: New file.
11341         * sysdeps/unix/sysv/linux/connect.S: New file.
11342         * sysdeps/unix/sysv/linux/creat.c: New file.
11343         * sysdeps/unix/sysv/linux/fsync.c: New file.
11344         * sysdeps/unix/sysv/linux/llseek.c: New file.
11345         * sysdeps/unix/sysv/linux/lseek.c: New file.
11346         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11347         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11348         * sysdeps/unix/sysv/linux/msync.c: New file.
11349         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11350         * sysdeps/unix/sysv/linux/open.c: New file.
11351         * sysdeps/unix/sysv/linux/open64.c: New file.
11352         * sysdeps/unix/sysv/linux/pause.c: New file.
11353         * sysdeps/unix/sysv/linux/poll.c: New file.
11354         * sysdeps/unix/sysv/linux/pread.c: New file.
11355         * sysdeps/unix/sysv/linux/pread64.c: New file.
11356         * sysdeps/unix/sysv/linux/pselect.c: New file.
11357         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11358         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11359         * sysdeps/unix/sysv/linux/readv.c: New file.
11360         * sysdeps/unix/sysv/linux/recv.S: New file.
11361         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11362         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11363         * sysdeps/unix/sysv/linux/select.c: New file.
11364         * sysdeps/unix/sysv/linux/send.S: New file.
11365         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11366         * sysdeps/unix/sysv/linux/sendto.S: New file.
11367         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11368         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11369         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11370         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11371         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11372         * sysdeps/unix/sysv/linux/system.c: New file.
11373         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11374         * sysdeps/unix/sysv/linux/wait.c: New file.
11375         * sysdeps/unix/sysv/linux/waitid.c: New file.
11376         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11377         * sysdeps/unix/sysv/linux/writev.c: New file.
11378         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11380         * pt-readv.c: Fix comment.
11382 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11384         * tst-cleanup1.c: Include stdlib.h.
11386         * tst-cancel5.c: New test.
11387         * Makefile (tests): Add tst-cancel5.
11388         (tst-cancel5): Link against libc.so libpthread.so in that order.
11390 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11392         * forward.c (test_loaded): Prevent recursive calls.
11394         * Makefile (routines): Add libc-cancellation.
11395         * libc-cancellation.c: New file.
11396         * descr.h (struct pthread): Add multiple_threads field.
11397         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11398         new thread descriptor to 1.
11399         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11400         Initialize multiple_thread field after successful thread creation.
11401         * cancellation.c (__do_cancel): Move to pthreadP.h.
11402         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11403         (__pthread_disable_asynccancel): Add internal_function attribute.
11404         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11405         * pthread_setcancelstate.c: Likewise.
11406         * pthread_setcanceltype.c: Likewise.
11407         * pthread_exit.c: Likewise.
11408         * pthreadP.h (CANCELLATION_P): Likewise.
11409         (__do_cancel): Define as static inline.
11410         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11411         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11412         declarations.
11413         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11414         fields.  Define MULTIPLE_THREADS_OFFSET.
11415         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11416         declaration.
11417         * sysdeps/unix/sysv/linux/accept.S: New file.
11418         * sysdeps/unix/sysv/linux/read.c: New file.
11419         * sysdeps/unix/sysv/linux/write.c: New file.
11420         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11421         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11422         initialization of __libc_locking_needed.
11423         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11424         __libc_locking_needed, use multiple_threads field in TCB.
11425         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11427 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11429         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11430         version.
11431         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11433         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11434         access to __libc_locking_needed for PIC.
11436 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11438         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11439         declare for libc.so.
11440         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11441         expression.
11442         (__libc_lock_lock): Put into statement expression.
11443         (__libc_lock_unlock): Remove trailing semicolon.
11444         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11446 2002-12-12  Roland McGrath  <roland@redhat.com>
11448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11449         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11451 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11453         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11454         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11455         Initialize __libc_locking_needed.
11456         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11457         instead of __register_pthread_fork_handler.
11458         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11459         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11460         fork-gen with libc_pthread_init.
11461         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11462         of __register_pthread_fork_handler.
11463         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11464         of __register_pthread_fork_handler.
11465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11466         __libc_locking_needed to determine whether lock prefix can be avoided.
11467         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11469 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11471         * Makefile (tests): Add tst-cleanup1.
11472         * tst-cleanup1.c: New file.
11473         * cancellation.c (__cleanup_thread): Removed.
11474         (__do_cancel): Remove call to __cleanup_thread.
11475         * pthreadP.h: Remove __cleanup_thread prorotype.
11477         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11478         Remember function and argument even if cancellation handler
11479         function is not available.
11480         (__libc_cleanup_region_end): Execute registered function directly if
11481         pthread functions are not available.
11482         (__libc_cleanup_end): Likewise.
11484         * init.c (__pthread_initialize_minimal): Fix initialization in
11485         static lib by preventing gcc from being too clever.
11487 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11489         * init.c (__pthread_initialize_minimal): Remove unneccesary
11490         sigaddset call.
11492         * Makefile (tests): We can run tst-locale2 now.
11494 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11496         * Versions: Remove duplicated sigwait entry.
11498 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11500         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11501         inside libpthread.
11503         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11505         * pthreadP.h: Declare __pthread_enable_asynccancel and
11506         __pthread_disable_asynccancel.
11507         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11508         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11509         * cancellation.c (__pthread_enable_asynccancel): New function.
11510         (__pthread_disable_asynccancel): New function.
11511         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11512         * pt-close.c: Likewise.
11513         * pt-connect.c: Likewise.
11514         * pt-creat.c: Likewise.
11515         * pt-fcntl.c: Likewise.
11516         * pt-fsync.c: Likewise.
11517         * pt-lseek.c: Likewise.
11518         * pt-lseek64.c: Likewise.
11519         * pt-msgrcv.c: Likewise.
11520         * pt-msgsnd.c: Likewise.
11521         * pt-msync.c: Likewise.
11522         * pt-nanosleep.c: Likewise.
11523         * pt-open.c: Likewise.
11524         * pt-open64.c: Likewise.
11525         * pt-pause.c: Likewise.
11526         * pt-poll.c: Likewise.
11527         * pt-pread.c: Likewise.
11528         * pt-pread64.c: Likewise.
11529         * pt-pselect.c: Likewise.
11530         * pt-pwrite.c: Likewise.
11531         * pt-pwrite64.c: Likewise.
11532         * pt-read.c: Likewise.
11533         * pt-readv.c: Likewise.
11534         * pt-recv.c: Likewise.
11535         * pt-recvfrom.c: Likewise.
11536         * pt-recvmsg.c: Likewise.
11537         * pt-select.c: Likewise.
11538         * pt-send.c: Likewise.
11539         * pt-sendmsg.c: Likewise.
11540         * pt-sendto.c: Likewise.
11541         * pt-sigpause.c: Likewise.
11542         * pt-sigsuspend.c: Likewise.
11543         * pt-sigtimedwait.c: Likewise.
11544         * pt-sigwait.c: Likewise.
11545         * pt-sigwaitinfo.c: Likewise.
11546         * pt-system.c: Likewise.
11547         * pt-tcdrain.c: Likewise.
11548         * pt-wait.c: Likewise.
11549         * pt-waitid.c: Likewise.
11550         * pt-waitpid.c: Likewise.
11551         * pt-write.c: Likewise.
11552         * pt-writev.c: Likewise.
11553         * pthread_join.c: Likewise.
11554         * pthread_timedjoin.c: Likewise.
11556         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11557         (__xpg_sigpause): New function.
11558         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11560 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11562         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11564         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11565         _GI_pthread_cleanup_pop to pthreadP.h.
11567         * ftrylockfile.c: Use _IO_lock_trylock instead of
11568         pthread_mutex_trylock.
11570         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11571         (CANCEL_RESET): Likewise.
11572         (__pthread_setcanceltype_): Declare.
11573         (__pthread_mutex_lock_internal): Declare.
11574         (__pthread_mutex_unlock_internal): Declare.
11575         (__pthread_once_internal): Declare.
11576         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11577         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11579         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11580         and pthread_mutex_unlock.
11581         * pthread_cond_wait.c: Likewise.
11582         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11583         * pthread_mutex_unlock.c: Likewise.
11585         * pthread_setcanceltype.c: Add additional alias
11586         __pthread_setcanceltype.
11588         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11589         * sem_open.c (sem_open): Likewise.
11590         Use __libc_open, __libc_write, and __libc_close instead of
11591         open, write, and close respectively.
11593         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11594         Rewrite as statement expression since it must return a value.
11596         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11597         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11598         __pthread_kill.
11600         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11601         alias __pthread_once_internal.
11603         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11605 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11607         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11608         * tst-stdio1.c: New file.
11609         * tst-stdio2.c: New file.
11611         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11613         * Makefile (tests): Comment out tst-locale2 for now.
11614         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11616         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11617         -D_IO_MTSAFE_IO.
11618         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11619         Use _IO_lock_init instead of explicit assignment.
11621         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11622         Define __libc_lock_* and __libc_lock_recursive macros with
11623         lowlevellock macros, not pthread mutexes.
11625         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11626         of pthread_mutex_lock.
11627         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11628         instead of pthread_mutex_unlock.
11630 2002-12-06  Roland McGrath  <roland@redhat.com>
11632         * allocatestack.c (__stack_user): Use uninitialized defn.
11633         * init.c (__pthread_initialize_minimal): Initialize it here.
11635 2002-12-05  Roland McGrath  <roland@redhat.com>
11637         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11638         string.
11639         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11641         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11642         missing & here too.
11644 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11646         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11647         lowlevellock.
11648         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11649         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11650         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11651         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11652         for __libc_lock_* macros.
11653         * Makefile (routines): Add libc-lowlevellock.
11655 2002-10-09  Roland McGrath  <roland@redhat.com>
11657         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11658         Under [__PIC__], call the function via the pointer fetched for
11659         comparison rather than a call by name that uses the PLT.
11660         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11661         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11662         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11663         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11664         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11666 2002-12-04  Roland McGrath  <roland@redhat.com>
11668         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11670         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11671         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11673         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11675 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11677         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11678         a completely opaque, non-integer type.
11679         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11681 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11683         * sysdeps/i386/tls.h: Include stdlib.h.
11684         * sysdeps/x86_64/tls.h: Likewise.
11686 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11688         * Makefile (tests): Add tst-locale2.
11689         (tests-static): Likewise.
11690         * tst-locale2.c: New file.
11692         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11693         volatile and add memory clobbers to lock operations.
11695 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11697         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11698         * sysdeps/i386/i486/bits/atomic.h: New file.
11699         * sysdeps/i386/i586/bits/atomic.h: New file.
11700         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11701         include i486 version.
11702         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11703         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11704         Patch by Marijn Ros <marijn@mad.scientist.com>.
11706         * allocatestack.c (get_cached_stack): Don't crash if we first
11707         found a stack with a larger size then needed.
11708         Reported by Hui Huang <hui.huang@sun.com>.
11710         * Makefile (tests): Add tst-sysconf.
11711         * tst-sysconf.c: New file.
11713         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11714         PTHREAD_THREADS_MAX.
11716 2002-12-02  Roland McGrath  <roland@redhat.com>
11718         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11719         Declare using hidden_proto instead of attribute_hidden, so there are
11720         non-.hidden static symbols for gdb to find.
11721         (__pthread_keys): Likewise.
11722         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11723         * allocatestack.c (__stack_user): Likewise.
11724         * pthread_create.c (__pthread_keys): Likewise.
11725         (__nptl_threads_events, __nptl_last_event): Make these static instead
11726         of hidden.
11727         * pthread_key_create.c (__pthread_pthread_keys_max,
11728         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11730 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11732         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11733         statically.
11734         * tst-locale1.c: New file.
11736         * pthread_cond_timedwait.c: Include <stdlib.h>.
11738         * Makefile (tests): Add tst-fork2 and tst-fork3.
11739         * tst-fork2.c: New file.
11740         * tst-fork3.c: New file.
11742 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11744         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11746         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11747         require it to 200112L.
11749         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11750         instruction only if HAVE_CMOV is defined.
11751         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11753         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11755         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11757         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11759         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11761 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11763         * sysdeps/x86_64/bits/atomic.h: New file.
11765         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11766         16-bit operations.
11768         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11769         possible since gettid cannot fail.
11771         * sysdeps/x86_64/pthreaddef.h: New file.
11773         * sysdeps/i386/pthreaddef.h (gettid): Removed.
11775         * sysdeps/x86_64/pthread_spin_init.c: New file.
11776         * sysdeps/x86_64/pthread_spin_lock.c: New file.
11777         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11778         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11780         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11781         Add missing lock prefix.  Minute optimization.
11783         * tst-spin2.c (main): Also check successful trylock call.
11785         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11786         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
11788         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11789         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
11791         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
11792         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11793         value in case of an error.  Add support for INTERNAL_SYSCALL.
11795         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11796         value in case of an error.
11798         * sysdeps/x86_64/tls.h: New file.
11800 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11802         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
11803         takes the array member name and the index as parameters.
11804         (THREAD_SETMEM_NC): Likewise.
11805         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11806         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11807         interfaces.
11809         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11810         to decide which code to use.
11811         (THREAD_SETMEM_NC): Likewise.
11813         * allocatestack.c (queue_stack): Don't remove stack from list here.
11814         Do it in the caller.  Correct condition to prematurely terminate
11815         loop to free stacks.
11816         (__deallocate_stack): Remove stack from list here.
11818 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11820         * Makefile (tests): Add tst-stack1.
11821         * tst-stack1.c: New file.
11823         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11824         provided stack.
11826         * pthread_attr_getstack.c: Return bottom of the thread area.
11828 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
11830         * Makefile (libpthread-routines): Add pt-allocrtsig and
11831         pthread_kill_other_threads.
11832         * pt-allocrtsig.c: New file.
11833         * pthread_kill_other_threads.c: New file.
11834         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11835         all three functions.
11836         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11837         allocrtsig.
11838         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11839         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11840         and __libc_allocate_rtsig_private.
11841         * Versions (libpthread): Export pthread_kill_other_threads_np,
11842         __libc_current_sigrtmin, and __libc_current_sigrtmax.
11844 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
11846         * allocatestack.c (allocate_stack): stackaddr in attribute points to
11847         the end of the stack.  Adjust computations.
11848         When mprotect call fails dequeue stack and free it.
11849         * pthread_attr_setstack.c: Store top of the stack in stackaddr
11850         attribute.
11851         * pthread_getattr_np.c: Likewise.
11853         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11854         surprises.
11856 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11858         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11859         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11861 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11863         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11864         * pthread_setspecific.c: Likewise.
11866 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11868         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11869         definitions.  Get them from the official place.
11870         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11872         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11873         Use new CLONE_ flags in clone() calls.
11875         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11876         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11878         * Versions: Add pthread_* functions for libc.
11879         * forward.c: New file.
11881         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11882         errno-loc.
11883         * herrno.c: New file.
11884         * res.c: New file.
11886         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11887         sem_trywait, and sem_timedwait.  Add herrno and res.
11888         * sem_init.c: Don't initialize lock and waiters members.
11889         * sem_open.c: Likewise.
11890         * sem_post.c: Removed.
11891         * sem_wait.c: Removed.
11892         * sem_trywait.c: Removed.
11893         * sem_timedwait.c: Removed.
11894         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11895         Includes full implementations of sem_post, sem_wait, sem_trywait,
11896         and sem_timedwait.
11897         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11898         for new implementation.
11899         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11900         and waiters fields.
11902         * tst-sem3.c: Improve error message.
11903         * tst-signal3.c: Likewise.
11905         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11906         to tell the kernel about the termination futex and to initialize tid
11907         member.  Don't initialize main_thread.
11908         * descr.h (struct pthread): Remove main_thread member.
11909         * cancelllation.c (__do_cancel): Remove code handling main thread.
11910         The main thread is not special anymore.
11912         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11913         size of the stacks to stack_cache_actsize.
11915         * pt-readv.c: Add missing "defined".
11916         * pt-sigwait.c: Likewise.
11917         * pt-writev.c: Likewise.
11919 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11921         * Versions: Export __connect from libpthread.
11922         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11924         * Makefile (libpthread-routines): Add pt-raise.
11925         * sysdeps/unix/sysv/linux/raise.c: New file.
11926         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11927         * sysdeps/generic/pt-raise.c: New file.
11929         * pthread_cond_init.c: Initialize all data elements of the condvar
11930         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11932         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11933         * pthread_create.c: Likewise.
11935         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11936         * tst-key1.c: New file.
11937         * tst-key2.c: New file.
11938         * tst-key3.c: New file.
11940         * Versions: Export pthread_detach for version GLIBC_2.0.
11941         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11943 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11945         * pthread_key_create.c: Terminate search after an unused key was found.
11946         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11948         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11949         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11951 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11953         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11954         dynamic lookup for errno in PIC.
11956         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11957         release the stack lock as soon as possible.
11958         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11959         the static TLS block.
11960         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11962         * cancellation.c: Renamed from cancelation.c.
11963         * Makefile: Adjust accordingly.
11964         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11965         * cleanup_defer.c: Use CANCELLATION_P.
11966         * pthread_testcancel.c: Likewise.
11967         * descr.h: Fix spelling in comments.
11968         * init.c: Likewise.
11969         * pthread_getattr_np.c: Likewise.
11970         * pthread_getschedparam.c: Likewise.
11971         * pthread_setschedparam.c: Likewise.
11972         * Versions: Likewise.
11974         * pt-pselect.c: New file.
11975         * Makefile (libpthread-routines): Add pt-pselect.
11976         * Versions: Add pselect.
11978         * tst-cancel4.c: New file.
11979         * Makefile (tests): Add tst-cancel4.
11981 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11983         * pthread_mutex_lock.c: Always record lock ownership.
11984         * pthread_mutex_timedlock.c: Likewise.
11985         * pthread_mutex_trylock.c: Likewise.
11987         * pt-readv.c: New file.
11988         * pt-writev.c: New file.
11989         * pt-creat.c: New file.
11990         * pt-msgrcv.c: New file.
11991         * pt-msgsnd.c: New file.
11992         * pt-poll.c: New file.
11993         * pt-select.c: New file.
11994         * pt-sigpause.c: New file.
11995         * pt-sigsuspend.c: New file.
11996         * pt-sigwait.c: New file.
11997         * pt-sigwaitinfo.c: New file.
11998         * pt-waitid.c: New file.
11999         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12000         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12001         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12002         * Versions: Add all the new functions.
12004         * tst-exit1.c: New file.
12005         * Makefile (tests): Add tst-exit1.
12007         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12009 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12011         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12013         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12014         call.  pthread_join is an official cancellation point.
12015         * pthread_timedjoin.c: Likewise.
12017         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12018         and the condvar's mutex are retrieved.
12019         * pthread_cond_timedwait.c: Likewise.
12020         Reported by dice@saros.East.Sun.COM.
12022 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12024         * pthreadP.h: Cut out all type definitions and move them...
12025         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12026         * pthreadP.h: Include <internaltypes.h>.
12028         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12029         performance tweaks.
12031         * sem_trywait.c: Shuffle #includes around to get right order.
12032         * sem_timedwait.c: Likewise.
12033         * sem_post.c: Likewise.
12034         * sem_wait.c: Likewise.
12036         * nptl 0.3 released.
12038         * Makefile (tests): Add tst-signal3.
12039         * tst-signal3.c: New file.
12041 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12043         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12044         the asms modify the sem object.
12045         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12047         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12048         the actual members.
12049         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12050         * semaphoreP.h: Include pthreadP.h.
12051         * sem_getvalue.c: Adjust to sem_t change.
12052         * sem_init.c: Likewise.
12053         * sem_open.c: Likewise.
12054         * sem_post.c: Likewise.
12055         * sem_timedwait.c: Likewise.
12056         * sem_trywait.c: Likewise.
12057         * sem_wait.c: Likewise.
12059 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12061         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12062         * tst-basic2.c: New file.
12063         * tst-exec1.c: New file.
12064         * tst-exec2.c: New file.
12065         * tst-exec3.c: New file.
12067         * tst-fork1.c: Remove extra */.
12069         * nptl 0.2 released.  The API for IA-32 is complete.