Explicitly check __SIZEOF_PTHREAD_* constants.
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2             David S. Miller  <davem@davemloft.net>
3
4         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
5
6 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
7
8         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
9         __pshared correctly.
10         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11         Likewise.
12         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
13         Likewise.
14         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
15         Likewise.
16         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
17         Likewise.
18         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
19
20 2008-04-14  David S. Miller  <davem@davemloft.net>
21
22         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
23         (__old_sem_wait): Fix argument to lll_futex_wait().
24
25 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
26
27         * pthread_create.c: Require pthread_mutex_trylock and
28         pthread_key_delete for libgcc.
29
30 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
31
32         [BZ #6020]
33         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
34         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
35         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
36
37 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
38
39         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
40         <linux/limits.h> has defined it.
41         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
42         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
43         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
44         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
45
46 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
47
48         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
49         of ASSEMBLER.
50         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
51         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
52
53 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
54
55         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
56         HAVE_DL_DISCOVER_OSVERSION.
57         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
58         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
59
60 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
61
62         [BZ #5778]
63         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
64         _POSIX_CHOWN_RESTRICTED value to zero.
65
66 2008-01-31  Roland McGrath  <roland@redhat.com>
67
68         * Makefile (omit-deps): Variable removed.
69
70 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
71
72         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
73         unnecessary addr32 prefix.
74
75 2008-01-29  Roland McGrath  <roland@redhat.com>
76
77         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
78
79 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
80
81         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
82
83 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
84
85         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
86         a scratch register.
87         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
88         (__lll_lock_wait_private): Fix typo.
89         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
90         (pthread_barrier_wait): Likewise.  Adjust XADD use.
91         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
92         Adjust XADD use.
93         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
94         (pthread_rwlock_timedrdlock): Return correct return value.
95         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
96         (pthread_rwlock_timedwrlock): Likewise.
97
98 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
99
100         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
101         thread returns the program exits with an error code.
102
103 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
104
105         * pthread-errnos.sym: Add EOVERFLOW.
106         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
107         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
108         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
109         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
110
111 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
112
113         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
114         parameter.  Passed it as permission to mmap.
115         * allocatestack.c (allocate_stack): Pass prot as second parameter
116         to ARCH_RETRY_MMAP.
117
118 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
119
120         * tst-basic7.c: Allocate memory for the stack.
121
122         [BZ #5465]
123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
124         (__pthread_cond_timedwait): Don't use VDSO.
125         Patch by Michal Januszewski.
126
127 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
128
129         [BZ #5455]
130         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
131         Allow label before pthread_cleanup_pop.
132         (pthread_cleanup_pop_restore_np): Likewise.
133
134 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
135
136         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
137         Store 2 before returning ETIMEDOUT.
138
139 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
140
141         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
142         Store 2 before returning ETIMEDOUT.
143         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
144         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
145         (__lll_lock_wait_private): Optimize.
146         (__lll_lock_wait): Likewise.
147
148 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
149
150         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
151         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
152         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
153
154 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
155
156         [BZ #5240]
157         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
158         If we time out, try one last time to lock the futex to avoid
159         losing a wakeup signal.
160         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
162
163         [BZ #5245]
164         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
165         if necessary.
166
167 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
168
169         [BZ #5245]
170         * allocatestack.c (allocate_stack): Change ENOMEM error in case
171         mmap failed to EAGAIN.
172         * Makefile (tests): Add tst-basic7.
173         * tst-basic7.c: New file.
174
175 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
176
177         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
178         Use __linkin_atfork.
179
180 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
181
182         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
183         missing line continuations.
184         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
185         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
186
187 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
188
189         [BZ #5220]
190         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
191         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
192         (struct timer): Add next element.
193         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
194         enqueue timer structure into __active_timer_sigev_thread list.
195         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
196         remove timer struct from __active_timer_sigev_thread.
197         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
198         Before using timer structure make sure it is still on the
199         __active_timer_sigev_thread list.  Keep lock until done.
200         Define __active_timer_sigev_thread and
201         __active_timer_sigev_thread_lock.
202
203 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
204
205         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
206         Redefine thread_atfork for use of ATFORK_MEM.
207         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
208         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
209         function.
210         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
211         Use atomic operation when removing first element of list.
212
213 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
214
215         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
216         routine instead of an alias to __new_sem_post.
217
218 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
219
220         * init.c (__pthread_initialize_minimal): Initialize word to appease
221         valgrind.
222
223 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
224
225         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
226         libc.so just clear NAME.
227         (__libc_rwlock_fini): Nop inside of libc.so.
228         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
229         all zeros.
230
231 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
232
233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
234         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
235         unlocking failed.
236         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
237
238 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
239
240         [BZ #4938]
241         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
242         reclaimed stack if necessary.
243         * Makefile (tests): Add tst-tsd6.
244         * tst-tsd6.c: New file.
245
246 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
247
248         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
249         Add private argument.
250
251 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
252
253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
254         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
255
256 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
257
258         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
259         (__lll_robust_timedlock): Pass private as last argument to
260         __lll_robust_timedlock_wait.
261         (__lll_unlock): Fix a pasto.
262
263 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
264
265         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
266         sparc_old_sem): New structs.
267         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
268         (__sem_wait_cleanup): New function.
269         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
270         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
271         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
272         lll_futex_wait.
273         (__old_sem_wait): New function.
274         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
275         nptl/sysdeps/unix/sysv/linux/sparc version.
276         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
277         Likewise.
278         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
279         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
280         (__new_sem_trywait): Use sparc_old_sem structure.
281         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
282         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
283         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
284         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
285         lll_futex_timed_wait.
286         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
287         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
288         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
289         lll_futex_wake.
290         (__old_sem_post): New function.
291         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
292         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
293         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
294         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
295         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
296         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
297
298 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
299
300         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
301         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
302         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
303         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
304         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
305         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
306         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
307         Use FUTEX_WAKE_OP.
308         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
309         kernel-features.h and tcb-offsets.h.
310         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
311         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
312         process private.
313         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
314         tcb-offsets.h.
315         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
316         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
317         process private.
318         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
319         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
320         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
321         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
322         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
323         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
324         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
325
326 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
327
328         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
329         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
330         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
331         lll_futex_timed_wait.
332
333         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
334         __lll_robust_unlock): Rewrite as macros instead of inline functions.
335         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
336         __lll_robust_unlock, __lll_wait_tid): Likewise.
337
338 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
339
340         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
341         Fix a pasto.
342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
343         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
344         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
345         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
347         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
348         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
349         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
350         kernel-features.h.
351         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
352         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
353         process private.  Switch DW_CFA_advance_loc1 and some
354         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
356         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
357         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
358         process private.  Switch DW_CFA_advance_loc{1,2} and some
359         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
360         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
361         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
362         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
363         Likewise.
364         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
365         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
366         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
367         Likewise.
368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
369         (__pthread_cond_broadcast): Compare %r8 instead of
370         dep_mutex-cond_*(%rdi) with $-1.
371         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
372         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
373         of oring.
374
375 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
376
377         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
378
379 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
380
381         * allocatestack.c: Include kernel-features.h.
382         * pthread_create.c: Likewise.
383         * pthread_mutex_init.c: Likewise.
384         * init.c: Likewise.
385         * pthread_cond_timedwait.c: Likewise.
386         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
387         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
389         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
392         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
393         Likewise.
394         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
395         Likewise.
396         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
397         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
398         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
399         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
400
401 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
402
403         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
404         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
405         byte elements.  One of them is the new __shared element.
406         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
407         adjust names of other padding elements.
408         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
409         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
410         byte elements.  One of them is the new __shared element.
411         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
412         adjust names of other padding elements.
413         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
414         Renamed __pad1 element to __shared, adjust names of other padding
415         elements.
416         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
417         (pthread_rwlock_t): Likewise.
418         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
419         typo.
420
421 2007-08-09  Anton Blanchard  <anton@samba.org>
422
423         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
424
425 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
426
427         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
428         <kernel-features.h>.
429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
430
431 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
432
433         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
434         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
435         dealing with robust mutexes.
436         * pthread_mutex_timedlock.c: Likewise.
437         * pthread_mutex_trylock.c: Likewise.
438         * pthread_mutex_unlock.c: Likewise.
439         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
440
441 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
442
443         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
444         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
445         (PTHREAD_MUTEX_PSHARED): Define.
446         * pthread_mutex_init.c (__pthread_mutex_init): Set
447         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
448         mutexes.
449         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
450         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
451         as second argument to lll_lock.
452         (LLL_MUTEX_TRYLOCK): Take mutex as argument
453         instead of its __data.__lock field.
454         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
455         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
456         to lll_robust_lock.
457         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
458         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
459         instead of mutex->__data.__kind directly, pass
460         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
461         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
462         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
463         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
464         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
465         to lll_timedlock, lll_robust_timedlock, lll_unlock and
466         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
467         of mutex->__data.__kind directly.
468         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
469         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
470         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
471         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
472         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
473         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
474         and lll_futex_wake.
475         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
476         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
477         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
478         directly.
479         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
480         Take mutex as argument instead of its __data.__lock field, pass
481         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
482         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
483         __data.__lock field.
484         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
485         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
486         to lll_robust_cond_lock.
487         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
488         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
489         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
490         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
491         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
492         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
493         lll_futex_wait.
494         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
495         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
496         lll_futex_wake.
497         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
498         pshared variable, pass it to lll_lock, lll_unlock,
499         lll_futex_timedwait and lll_futex_wake.
500         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
501         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
502         and lll_futex_wake.
503         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
504         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
505         macro.
506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
507         lll_futex_wake_unlock): Likewise.
508         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
509         Likewise.
510         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
511         lll_futex_wake_unlock): Likewise.
512         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
513         Likewise.
514         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
515         lll_futex_wake_unlock): Likewise.
516         (lll_futex_wake): Fix a typo.
517         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
518         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
519         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
520         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
521         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
523         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
524         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
525         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
526         (__pthread_cond_timedwait): Likewise.
527         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
528         (__condvar_cleanup, __pthread_cond_wait): Likewise.
529
530 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
531
532         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
533         Don't use CGOTSETUP and CGOTRESTORE macros.
534         (CGOTSETUP, CGOTRESTORE): Remove.
535         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
536         @local symbol.
537
538 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
539
540         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
541         definitions for private futexes.
542         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
543         kernel-features.h and lowlevellock.h.  Use private futexes if
544         they are available.
545         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
546         (__lll_mutex_lock_wait): Rename to
547         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
548         (__lll_mutex_timedlock_wait): Rename to ...
549         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
550         Don't compile in for libc.so.
551         (__lll_mutex_unlock_wake): Rename to ...
552         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
553         (__lll_timedwait_tid): Use __NR_gettimeofday.
554         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
555         the header from assembler.  Renamed all lll_mutex_* resp.
556         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
557         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
558         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
559         Define.
560         (__lll_lock_wait_private): Add prototype.
561         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
562         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
563         __lll_unlock_wake): Likewise.
564         (lll_lock): Add private argument.  Call __lll_lock_wait_private
565         if private is constant LLL_PRIVATE.
566         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
567         lll_timedlock, lll_robust_timedlock): Add private argument.
568         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
569         if private is constant LLL_PRIVATE.
570         (lll_robust_unlock, lll_robust_dead): Add private argument.
571         (lll_lock_t): Remove.
572         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
573         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
574         lll_cond_wake, lll_cond_broadcast): Remove.
575         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
576         kernel-features.h and lowlevellock.h.
577         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
578         (LOAD_FUTEX_WAIT): Define.
579         (__lll_robust_mutex_lock_wait): Rename to ...
580         (__lll_robust_lock_wait): ... this.  Add private argument.
581         Use LOAD_FUTEX_WAIT macro.
582         (__lll_robust_mutex_timedlock_wait): Rename to ...
583         (__lll_robust_timedlock_wait): ... this.    Add private argument.
584         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
585         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
586         lowlevellock.h.
587         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
588         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
589         __lll_mutex_{lock,unlock}_*.
590         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
591         lowlevellock.h and pthread-errnos.h.
592         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
593         FUTEX_CMP_REQUEUE, EINVAL): Remove.
594         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
595         __lll_mutex_{lock,unlock}_*.
596         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
597         lowlevellock.h and pthread-errnos.h.
598         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
599         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
600         __lll_mutex_{lock,unlock}_*.
601         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
602         lowlevellock.h.
603         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
604         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
605         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
606         (__condvar_tw_cleanup): Likewise.
607         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
608         lowlevellock.h.
609         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
610         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
611         __lll_mutex_{lock,unlock}_*.
612         ( __condvar_w_cleanup): Likewise.
613         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
614         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
615         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
616         lowlevellock.h.
617         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
618         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
619         __lll_mutex_{lock,unlock}_*.
620         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
621         lowlevellock.h.
622         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
623         FUTEX_PRIVATE_FLAG): Remove.
624         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
625         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
626         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
627         lowlevellock.h.
628         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
629         FUTEX_PRIVATE_FLAG): Remove.
630         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
631         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
632         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
633         lowlevellock.h.
634         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
635         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
636         __lll_mutex_{lock,unlock}_*.
637         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
638         lowlevellock.h.
639         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
640         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
641         __lll_mutex_{lock,unlock}_*.
642         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
643         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
644         (__new_sem_post): Use standard initial exec code sequences.
645         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
646         lowlevellock.h.
647         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
648         FUTEX_PRIVATE_FLAG): Remove.
649         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
650         exec code sequences.
651         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
652         (__new_sem_trywait): Use standard initial exec code sequences.
653         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
654         (__new_sem_wait): Use standard initial exec code sequences.
655
656 2007-07-31  Anton Blanchard  <anton@samba.org>
657
658         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
659         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
660         atomic_full_barrier.
661
662 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
663
664         * allocatestack.c (stack_cache_lock): Change type to int.
665         (get_cached_stack, allocate_stack, __deallocate_stack,
666         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
667         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
668         as second argument to lll_lock and lll_unlock macros on
669         stack_cache_lock.
670         * pthread_create.c (__find_in_stack_list): Likewise.
671         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
672         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
673         as second argument.
674         * descr.h (struct pthread): Change lock and setxid_futex field
675         type to int.
676         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
677         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
678         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
679         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
680         Likewise.
681         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
682         * pthread_cond_init.c (__pthread_cond_init): Likewise.
683         * pthreadP.h (__attr_list_lock): Change type to int.
684         * pthread_attr_init.c (__attr_list_lock): Likewise.
685         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
686         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
687         lll_{,un}lock.
688         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
689         also for lll_futex_{wake,wait}.
690         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
691         a pointer to const.
692         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
693         LLL_SHARED as second argument to lll_{,un}lock.
694         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
695         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
696         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
697         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
698         Likewise.
699         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
700         as second argument to lll_{,un}lock macros on pd->lock.
701         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
702         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
703         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
704         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
705         Likewise.
706         * sysdeps/pthread/createthread.c (do_clone, create_thread):
707         Likewise.
708         * pthread_once.c (once_lock): Change type to int.
709         (__pthread_once): Pass LLL_PRIVATE as second argument to
710         lll_{,un}lock macros on once_lock.
711         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
712         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
713         rwlock->__data.__shared as second argument to them and similarly
714         for lll_futex_w*.
715         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
716         Likewise.
717         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
718         Likewise.
719         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
720         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
721         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
722         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
723         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
724         to lll_{,un}lock macros on __sem_mappings_lock.
725         * sem_open.c (check_add_mapping): Likewise.
726         (__sem_mappings_lock): Change type to int.
727         * semaphoreP.h (__sem_mappings_lock): Likewise.
728         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
729         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
730         instead of lll_*mutex_*, pass LLL_SHARED as last
731         argument.
732         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
733         pass LLL_SHARED as last argument.
734         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
735         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
736         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
737         pass LLL_SHARED as last argument.
738         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
739         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
740         LLL_SHARED as last argument.
741         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
742         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
743         Similarly.
744         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
745         __libc_lock_lock_recursive, __libc_lock_unlock,
746         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
747         argument to lll_{,un}lock.
748         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
749         _IO_lock_unlock): Likewise.
750         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
751         compound literal.
752         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
753         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
754         __fork_lock.
755         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
756         free_mem): Likewise.
757         (__fork_lock): Change type to int.
758         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
759         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
760         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
761         lll_futex_wake.
762         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
763         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
764         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
765         New function.
766         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
767         pass it through to lll_futex_*wait, only compile in when
768         IS_IN_libpthread.
769         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
770         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
771         argument and pass it through to lll_futex_*wait.
772         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
773         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
774         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
775         inline functions to __lll_* resp. __lll_robust_*.
776         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
777         (lll_mutex_dead): Add private argument.
778         (__lll_lock_wait_private): New prototype.
779         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
780         __lll_robust_lock_timedwait): Add private argument to prototypes.
781         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
782         call __lll_lock_wait_private, otherwise pass private to
783         __lll_lock_wait.
784         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
785         __lll_robust_timedlock): Add private argument, pass it to
786         __lll_*wait functions.
787         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
788         call __lll_unlock_wake_private, otherwise pass private to
789         __lll_unlock_wake.
790         (__lll_robust_unlock): Add private argument, pass it to
791         __lll_robust_unlock_wake.
792         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
793         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
794         argument, pass it through to __lll_* inline function.
795         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
796         (lll_lock_t): Remove.
797         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
798         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
799         lll_cond_wake, lll_cond_broadcast): Remove.
800         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
801         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
802         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
803         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
804         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
805         the header from assembler.  Renamed all lll_mutex_* resp.
806         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
807         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
808         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
809         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
810         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
811         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
812         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
813         Remove prototype.
814         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
815         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
816         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
817         (lll_trylock): Likewise, use __lll_trylock_asm, pass
818         MULTIPLE_THREADS_OFFSET as another asm operand.
819         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
820         MULTIPLE_THREADS_OFFSET as last asm operand, call
821         __lll_lock_wait_private if private is constant LLL_PRIVATE,
822         otherwise pass private as another argument to __lll_lock_wait.
823         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
824         lll_timedlock, lll_robust_timedlock): Add private argument, pass
825         private as another argument to __lll_*lock_wait call.
826         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
827         MULTIPLE_THREADS_OFFSET as another asm operand, call
828         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
829         otherwise pass private as another argument to __lll_unlock_wake.
830         (lll_robust_unlock): Add private argument, pass private as another
831         argument to __lll_unlock_wake.
832         (lll_robust_dead): Add private argument, use __lll_private_flag
833         macro.
834         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
835         LLL_MUTEX_LOCK_INITIALIZER.
836         (lll_lock_t): Remove.
837         (LLL_LOCK_INITIALIZER_WAITERS): Define.
838         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
839         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
840         lll_cond_wake, lll_cond_broadcast): Remove.
841         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
842         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
843         2007-05-2{3,9} changes.
844         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
845         kernel-features.h and lowlevellock.h.
846         (LOAD_PRIVATE_FUTEX_WAIT): Define.
847         (LOAD_FUTEX_WAIT): Rewritten.
848         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
849         define.
850         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
851         (__lll_mutex_lock_wait): Rename to ...
852         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
853         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
854         (__lll_mutex_timedlock_wait): Rename to ...
855         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
856         contains private argument.  Don't compile in for libc.so.
857         (__lll_mutex_unlock_wake): Rename to ...
858         (__lll_unlock_wake): ... this.  %ecx contains private argument.
859         Don't compile in for libc.so.
860         (__lll_timedwait_tid): Use __NR_gettimeofday.
861         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
862         kernel-features.h and lowlevellock.h.
863         (LOAD_FUTEX_WAIT): Define.
864         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
865         define.
866         (__lll_robust_mutex_lock_wait): Rename to ...
867         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
868         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
869         macro.
870         (__lll_robust_mutex_timedlock_wait): Rename to ...
871         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
872         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
873         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
874         lowlevellock.h.
875         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
876         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
877         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
878         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
879         to __lll_lock_wait in %edx.
880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
881         Include lowlevellock.h and pthread-errnos.h.
882         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
883         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
884         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
885         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
886         pass LLL_SHARED in %ecx to both __lll_lock_wait and
887         __lll_unlock_wake.
888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
889         Include lowlevellock.h and pthread-errnos.h.
890         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
891         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
892         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
893         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
894         pass LLL_SHARED in %ecx to both __lll_lock_wait and
895         __lll_unlock_wake.
896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
897         Include lowlevellock.h.
898         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
899         Don't define.
900         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
901         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
902         pass LLL_SHARED in %ecx to both __lll_lock_wait and
903         __lll_unlock_wake.  Use __NR_gettimeofday.
904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
905         Include lowlevellock.h.
906         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
907         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
908         to __lll_*, pass cond_lock address in %edx rather than %ecx to
909         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
910         and __lll_unlock_wake.
911         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
912         Include lowlevellock.h.
913         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
914         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
915         MUTEX(%ebx) address in %edx rather than %ecx to
916         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
917         and __lll_unlock_wake.  Move return value from %ecx to %edx
918         register.
919         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
920         Include lowlevellock.h.
921         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
922         Don't define.
923         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
924         MUTEX(%ebp) address in %edx rather than %ecx to
925         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
926         and __lll_unlock_wake.  Move return value from %ecx to %edx
927         register.  Use __NR_gettimeofday.
928         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
929         Include lowlevellock.h.
930         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
931         Don't define.
932         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
933         MUTEX(%ebp) address in %edx rather than %ecx to
934         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
935         and __lll_unlock_wake.  Move return value from %ecx to %edx
936         register.  Use __NR_gettimeofday.
937         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
938         Include lowlevellock.h.
939         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
940         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
941         MUTEX(%edi) address in %edx rather than %ecx to
942         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
943         and __lll_unlock_wake.
944         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
945         Include lowlevellock.h.
946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
947         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
948         MUTEX(%ebx) address in %edx rather than %ecx to
949         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
950         and __lll_unlock_wake.  Move return value from %ecx to %edx
951         register.
952         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
953         lowlevellock.h.
954         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
955         define.
956         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
957         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
958         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
959         lowlevellock.h.
960         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
961         (sem_timedwait): Use __NR_gettimeofday.
962         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
963         lowlevellock.h.
964         (LOCK): Don't define.
965         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
966         lowlevellock.h.
967         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
968         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
969         are waiters.
970         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
971         2007-05-2{3,9} changes.
972         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
973         kernel-features.h and lowlevellock.h.
974         (LOAD_PRIVATE_FUTEX_WAIT): Define.
975         (LOAD_FUTEX_WAIT): Rewritten.
976         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
977         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
978         (__lll_mutex_lock_wait): Rename to ...
979         (__lll_lock_wait): ... this.  %esi is now private argument.
980         Don't compile in for libc.so.
981         (__lll_mutex_timedlock_wait): Rename to ...
982         (__lll_timedlock_wait): ... this.  %esi contains private argument.
983         Don't compile in for libc.so.
984         (__lll_mutex_unlock_wake): Rename to ...
985         (__lll_unlock_wake): ... this.  %esi contains private argument.
986         Don't compile in for libc.so.
987         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
988         kernel-features.h and lowlevellock.h.
989         (LOAD_FUTEX_WAIT): Define.
990         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
991         (__lll_robust_mutex_lock_wait): Rename to ...
992         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
993         Use LOAD_FUTEX_WAIT macro.
994         (__lll_robust_mutex_timedlock_wait): Rename to ...
995         (__lll_robust_timedlock_wait): ... this. %esi argument contains
996         private, use LOAD_FUTEX_WAIT macro.
997         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
998         lowlevellock.h.
999         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1000         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1001         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1002         __lll_lock_wait and __lll_unlock_wake.
1003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1004         Include lowlevellock.h and pthread-errnos.h.
1005         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1006         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1007         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1008         pass LLL_SHARED in %esi to both __lll_lock_wait and
1009         __lll_unlock_wake.
1010         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1011         Include lowlevellock.h and pthread-errnos.h.
1012         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1013         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1014         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1015         pass LLL_SHARED in %esi to both __lll_lock_wait and
1016         __lll_unlock_wake.
1017         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1018         Include lowlevellock.h.
1019         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1020         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1021         pass LLL_SHARED in %esi to both __lll_lock_wait and
1022         __lll_unlock_wake.
1023         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1024         Include lowlevellock.h.
1025         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1026         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1027         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1028         and __lll_unlock_wake.
1029         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1030         Include lowlevellock.h.
1031         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1032         Don't define.
1033         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1034         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1035         and __lll_unlock_wake.
1036         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1037         Include lowlevellock.h.
1038         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1039         Don't define.
1040         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1041         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1042         and __lll_unlock_wake.
1043         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1044         Include lowlevellock.h.
1045         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1046         Don't define.
1047         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1048         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1049         and __lll_unlock_wake.
1050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1051         Include lowlevellock.h.
1052         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1053         Don't define.
1054         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1055         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1056         and __lll_unlock_wake.
1057         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1058         Include lowlevellock.h.
1059         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1060         Don't define.
1061         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1062         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1063         and __lll_unlock_wake.
1064         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1065         lowlevellock.h.
1066         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1067         define.
1068         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1069         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1070         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1071         lowlevellock.h.
1072         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1073         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1074         lowlevellock.h.
1075         (LOCK): Don't define.
1076         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1077         lowlevellock.h.
1078         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1079         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1080         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1081         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1082         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1083         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1084         (__lll_lock_wait_private): New function.
1085         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1086         it to lll_futex_*wait.  Don't compile in for libc.so.
1087         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1088         Remove.
1089         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1090         (struct sparc_pthread_barrier): Remove.
1091         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1092         struct sparc_pthread_barrier.  Pass
1093         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1094         and lll_futex_wait macros.
1095         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1096         Remove.
1097         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1098         Include sparc pthread_barrier_wait.c instead of generic one.
1099
1100 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1101
1102         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1103
1104         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1105         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1106         %ecx.
1107         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1108         (pthread_rwlock_timedwrlock): Likewise.
1109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1110         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1111
1112 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1113
1114         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1115
1116 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1117
1118         * tst-locale2.c (useless): Add return statement.
1119
1120 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1121
1122         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1123         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1124         * pthread_create.c (start_thread): Likewise.
1125         * init.c (sighandler_setxid): Likewise.
1126         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1127         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1128         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1129         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1130         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1131         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1132         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1133         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1134         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1135         Likewise.
1136         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1137         Likewise.
1138         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1139         Likewise.
1140         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1141         __rtld_notify): Likewise.
1142         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1143         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1144         __pthread_once): Likewise.
1145         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1146         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1147         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1148         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1149         (lll_futex_wait): Add private argument, define as wrapper around
1150         lll_futex_timed_wait.
1151         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1152         use __lll_private_flag macro.
1153         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1154         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1155         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1156         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1157         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1158         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1159         (lll_futex_wait): Add private argument, define as wrapper around
1160         lll_futex_timed_wait.
1161         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1162         use __lll_private_flag macro.
1163         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1164         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1165         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1166         Define.
1167         (lll_futex_timed_wait, lll_futex_wake): Use it.
1168         (lll_private_futex_wait, lll_private_futex_timed_wait,
1169         lll_private_futex_wake): Removed.
1170         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1171         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1172         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1173         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1174         (lll_futex_wait): Add private argument, define as wrapper around
1175         lll_futex_timed_wait.
1176         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1177         use __lll_private_flag macro.
1178         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1179         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1180         to lll_futex_*.
1181         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1182         (lll_private_futex_wait, lll_private_futex_timed_wait,
1183         lll_private_futex_wake): Removed.
1184         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1185         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1186         (lll_private_futex_wait, lll_private_futex_timed_wait,
1187         lll_private_futex_wake): Removed.
1188         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1189         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1190         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1191         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1192         (lll_futex_wait): Add private argument, define as wrapper around
1193         lll_futex_timed_wait.
1194         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1195         use __lll_private_flag macro.
1196         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1197         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1198         to lll_futex_*.
1199         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1200         Define.
1201         (lll_futex_timed_wait, lll_futex_wake): Use it.
1202         (lll_private_futex_wait, lll_private_futex_timed_wait,
1203         lll_private_futex_wake): Removed.
1204
1205 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1206
1207         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1208         of the structure for sparc32.
1209
1210 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1211
1212         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1213
1214 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1215
1216         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1217         code used when private futexes are assumed.
1218         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1219         Likewise.
1220
1221 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1222
1223         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1224         (__lll_private_flag): Define.
1225         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1226         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1227         __lll_private_flag.
1228         (lll_private_futex_wait, lll_private_futex_timedwait,
1229         lll_private_futex_wake): Define as wrapper around non-_private
1230         macros.
1231         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1232         (__lll_private_flag): Define.
1233         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1234         (lll_private_futex_wait, lll_private_futex_timedwait,
1235         lll_private_futex_wake): Define as wrapper around non-_private
1236         macros.
1237
1238 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1239
1240         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1241         parameter to lll_futex_wait call.
1242         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1243
1244         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1245         Replace lll_futex_wait with lll_private_futex_wait.
1246         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1247         Add LLL_SHARED parameter to lll_futex_wake().
1248
1249         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1250         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1251         lll_private_futex_wake.
1252         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1253         bit from private parm before syscall.
1254         (lll_futex_timed_wait): Likewise.
1255         (lll_futex_wake): Likewise.
1256         (lll_futex_wake_unlock): Likewise.
1257         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1258         (lll_robust_mutex_unlock): Likewise.
1259         (lll_mutex_unlock_force): Likewise.
1260         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1261
1262 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1263
1264         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1265         compilation when unconditionally using private futexes.
1266         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1267         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1268         Likewise.
1269         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1270         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1271
1272 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1273
1274         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1275         Define.
1276
1277 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1278
1279         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1280         kernel-features.h.
1281
1282 2007-05-16  Roland McGrath  <roland@redhat.com>
1283
1284         * init.c (__nptl_initial_report_events): New variable.
1285         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1286         to that.
1287
1288 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1289
1290         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1291         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1292
1293 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1294
1295         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1296         implementation.
1297
1298 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1299
1300         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1301         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1302         * pthread_mutex_timedlock.c: Likewise.
1303         * pthread_mutex_trylock.c: Likewise.
1304         * pthread_mutex_unlock.c: Likewise.
1305
1306 2007-06-17  Andreas Schwab  <schwab@suse.de>
1307
1308         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1309         sections.
1310
1311 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1312
1313         * allocatestack.c (allocate_stack): Make code compile if
1314         __ASSUME_PRIVATE_FUTEX is set.
1315
1316 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1317
1318         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1319         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1320         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1321         (__pthread_rwlock_wrlock): Likewise.
1322         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1323         (pthread_rwlock_timedrdlock): Likewise.
1324         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1325         (pthread_rwlock_timedwrlock): Likewise.
1326         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1327         (__pthread_rwlock_unlock): Likewise.
1328
1329 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1330
1331         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1332         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1333         Split __flags into __flags, __shared, __pad1 and __pad2.
1334         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1335         futexes if they are available.
1336         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1337         in libc-lowlevellock.S allow using private futexes.
1338         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1339         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1340         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1341         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1342         lll_private_futex_timed_wait and lll_private_futex_wake.
1343         (lll_robust_mutex_unlock): Fix typo.
1344         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1345         field in futex command setup.
1346         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1347         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1348         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1349         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1350         if they are available.  Remove clear_once_control.
1351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1352         futexes if they are available.
1353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1354         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1355         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1356         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1357         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1358         Wake only when there are waiters.
1359         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1360         support.  Indicate that there are waiters.  Remove unnecessary
1361         extra cancellation test.
1362         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1363         left-over duplication of __sem_wait_cleanup.
1364
1365 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1366
1367         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1368         parameter to lll_futex_wait, lll_futex_timed_wait, and
1369         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1370         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1371         lll_private_futex_wake.
1372         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1373         * allocatestack.c: Adjust use of lll_futex_* macros.
1374         * init.c: Likewise.
1375         * lowlevellock.h: Likewise.
1376         * pthread_barrier_wait.c: Likewise.
1377         * pthread_cond_broadcast.c: Likewise.
1378         * pthread_cond_destroy.c: Likewise.
1379         * pthread_cond_signal.c: Likewise.
1380         * pthread_cond_timedwait.c: Likewise.
1381         * pthread_cond_wait.c: Likewise.
1382         * pthread_create.c: Likewise.
1383         * pthread_mutex_lock.c: Likewise.
1384         * pthread_mutex_setprioceiling.c: Likewise.
1385         * pthread_mutex_timedlock.c: Likewise.
1386         * pthread_mutex_unlock.c: Likewise.
1387         * pthread_rwlock_timedrdlock.c: Likewise.
1388         * pthread_rwlock_timedwrlock.c: Likewise.
1389         * pthread_rwlock_unlock.c: Likewise.
1390         * sysdeps/alpha/tls.h: Likewise.
1391         * sysdeps/i386/tls.h: Likewise.
1392         * sysdeps/ia64/tls.h: Likewise.
1393         * sysdeps/powerpc/tls.h: Likewise.
1394         * sysdeps/pthread/aio_misc.h: Likewise.
1395         * sysdeps/pthread/gai_misc.h: Likewise.
1396         * sysdeps/s390/tls.h: Likewise.
1397         * sysdeps/sh/tls.h: Likewise.
1398         * sysdeps/sparc/tls.h: Likewise.
1399         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1400         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1401         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1402         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1403         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1404         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1405         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1406         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1407         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1408         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1409         Likewise.
1410         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1411         * sysdeps/x86_64/tls.h: Likewise.
1412
1413 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1414
1415         * pthread_getattr_np.c: No need to install a cancellation handler,
1416         this is no cancellation point.
1417         * pthread_getschedparam.c: Likewise.
1418         * pthread_setschedparam.c: Likewise.
1419         * pthread_setschedprio.c: Likewise.
1420         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1421         lll_unlock_wake_cb.
1422         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1423         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1424         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1425         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1426         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1427         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1428         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1429         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1430         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1431         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1433         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1434
1435         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1436         whether there are more than one thread makes no sense here since
1437         we only call the slow path if the locks are taken.
1438         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1439
1440         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1441         COND_NWAITERS_SHIFT.
1442         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1443         COND_CLOCK_BITS.
1444         * pthread_cond_init.c: Likewise.
1445         * pthread_cond_timedwait.c: Likewise.
1446         * pthread_cond_wait.c: Likewise.
1447         * pthread_condattr_getclock.c: Likewise.
1448         * pthread_condattr_setclock.c: Likewise.
1449         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1454
1455 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1456
1457         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1458         unistd.h.
1459
1460         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1461         insn suffix.
1462         (THREAD_GSCOPE_GET_FLAG): Remove.
1463         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1464         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1465         changes.
1466         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1467         (THREAD_GSCOPE_GET_FLAG): Remove.
1468         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1469         instead of THREAD_GSCOPE_GET_FLAG.
1470         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1471         it.
1472         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1473         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1474         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1475         THREAD_GSCOPE_WAIT): Define.
1476         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1477         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1478         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1479         THREAD_GSCOPE_WAIT): Define.
1480         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1481         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1482         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1483         THREAD_GSCOPE_WAIT): Define.
1484         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1485         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1486         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1487         THREAD_GSCOPE_WAIT): Define.
1488
1489 2007-05-24  Richard Henderson  <rth@redhat.com>
1490
1491         * descr.h (struct pthread): Add header.gscope_flag.
1492         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1493         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1494         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1495         THREAD_GSCOPE_WAIT): Define.
1496
1497 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1498
1499         * init.c: Make it compile with older kernel headers.
1500
1501         * tst-initializers1.c: Show through exit code which test failed.
1502
1503         * pthread_rwlock_init.c: Also initialize __shared field.
1504         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1505         element in rwlock structure into four byte elements.  One of them is
1506         the new __shared element.
1507         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1508         Likewise.
1509         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1510         __shared, adjust names of other padding elements.
1511         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1512         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1513         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1514         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1515         FUTEX_PRIVATE_FLAG.
1516         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1517         futex to use private operations if possible.
1518         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1519         Likewise.
1520         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1521         Likewise.
1522         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1523         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1524         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1525         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1526         Likewise.
1527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1528         Likewise.
1529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1530         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1531
1532 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1533
1534         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1535         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1536         * pthread_rwlock_timedrdlock.c: Likewise.
1537         * pthread_rwlock_tryrdlock.c: Likewise.
1538
1539         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1540         optimization.
1541
1542         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1543         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1544         duplication of __sem_wait_cleanup.
1545
1546         * allocatestack.c: Revert last change.
1547         * init.c: Likewise.
1548         * sysdeps/i386/tls.h: Likewise.
1549         * sysdeps/x86_64/tls.h: Likewise.
1550         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1551         header structure.
1552         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1553
1554         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1555         Add private field.
1556         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1557         * pthread_barrier_init.c: Set private flag if pshared and private
1558         futexes are supported.
1559         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1560         private field in futex command setup.
1561         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1562
1563 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1564
1565         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1566         support.
1567         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1568         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1569         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1570         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1571         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1572
1573         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1574         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1575         fields in the structure.
1576         (__old_sem_init): New function.
1577         * sem_open.c: Initialize all fields of the structure.
1578         * sem_getvalue.c: Adjust for renamed element.
1579         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1580         (gen-as-const-headers): Add structsem.sym.
1581         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1582         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1583         struct new_sem.  Add struct old_sem.
1584         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1585         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1586         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1587         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1588         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1589         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1590         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1591         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1592         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1593         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1594         * tst-sem10.c: New file.
1595         * tst-sem11.c: New file.
1596         * tst-sem12.c: New file.
1597         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1598         of struct sem.
1599
1600 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1601             Jakub Jelinek  <jakub@redhat.com>
1602
1603         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1604         Move __pthread_enable_asynccancel right before futex syscall.
1605         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1606         Likewise.
1607
1608 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1609
1610         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1611         THREAD_COPY_PRIVATE_FUTEX): Define.
1612         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1613         THREAD_COPY_PRIVATE_FUTEX): Define.
1614         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1615         * init.c (__pthread_initialize_minimal_internal): Use
1616         THREAD_SET_PRIVATE_FUTEX.
1617
1618         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1619         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1620         THREAD_GSCOPE_FLAG_WAIT): Define.
1621         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1622         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1623         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1624         PTR_DEMANGLE.
1625         (THREAD_GSCOPE_GET_FLAG): Define.
1626         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1627         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1628         instead of ->header.gscope_flag directly.
1629
1630 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1631
1632         * init.c (__pthread_initialize_minimal_internal): Check whether
1633         private futexes are available.
1634         * allocatestack.c (allocate_stack): Copy private_futex field from
1635         current thread into the new stack.
1636         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1637         futexes if they are available.
1638         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1639         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1640         in libc-lowlevellock.S allow using private futexes.
1641         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1642         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1643         FUTEX_PRIVATE_FLAG.
1644         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1645         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1646         if they are available.
1647         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1648         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1649         * sysdeps/i386/tcb-offsets.sym: Likewise.
1650         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1651         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1652
1653 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1654
1655         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1656         Remove ptr_wait_lookup_done again.
1657         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1658         (__pthread_initialize_minimal_internal): Initialize
1659         _dl_wait_lookup_done pointer in _rtld_global directly.
1660         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1661         Remove code to code _dl_wait_lookup_done.
1662         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1663         encrypted for now.
1664
1665 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1666
1667         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1668         pthread_mutex_init failed with ENOTSUP.
1669
1670 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1671
1672         * allocatestack.c (__wait_lookup_done): New function.
1673         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1674         Add ptr_wait_lookup_done.
1675         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1676         * pthreadP.h: Declare __wait_lookup_done.
1677         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1678         Define macros to implement reference handling of global scope.
1679         * sysdeps/x86_64/tls.h: Likewise.
1680         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1681         Initialize GL(dl_wait_lookup_done).
1682
1683 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1684
1685         [BZ #4512]
1686         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1687         is detected.
1688         * pthread_mutex_timedlock.c: Likewise.
1689         * pthread_mutex_trylock.c: Likewise.
1690         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1691
1692         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1693         * tst-robust9.c: New file.
1694         * tst-robustpi9.c: New file.
1695
1696         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1697         unnecessary extra cancellation test.
1698
1699 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1700
1701         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1702         extra cancellation test.
1703         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1704
1705 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1706
1707         * descr.h (struct pthread): Rearrange members to fill hole in
1708         64-bit layout.
1709
1710         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1711         (__pthread_setaffinity_new): If syscall was successful and
1712         RESET_VGETCPU_CACHE is defined, use it before returning.
1713         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1714
1715 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1716
1717         [BZ #4455]
1718         * tst-align2.c: Include stackinfo.h.
1719         * tst-getpid1.c: Likewise.
1720
1721 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1722
1723         [BZ #4455]
1724         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1725         * tst-getpid1.c (do_test): Likewise.
1726
1727         [BZ #4456]
1728         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1729         (allocate_stack): Likewise.
1730
1731 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1732
1733         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1734         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1735         (__lll_robust_timedlock_wait): Likewise.
1736         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1737
1738 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1739
1740         [BZ #4465]
1741         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1742         * tst-cancel4.c (tf_fdatasync): New test.
1743
1744 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1745
1746         [BZ #4392]
1747         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1748         check mutexes like normal mutexes.
1749
1750         [BZ #4306]
1751         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1752         Initialize the whole sigevent structure to appease valgrind.
1753
1754 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1755
1756         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1757         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1758
1759 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1760
1761         * tst-locale1.c: Avoid warnings.
1762         * tst-locale2.c: Likewise.
1763
1764 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1765
1766         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1767         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1768
1769 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1770
1771         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1772         __extern_always_inline where appropriate.
1773         * sysdeps/pthread/pthread.h: Likewise.
1774
1775 2007-03-13  Richard Henderson  <rth@redhat.com>
1776
1777         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1778         separate cfi regions for the two subsections.
1779
1780 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1781
1782         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1783         new thread, don't just decrement it.
1784         Patch by Suzuki K P <suzuki@in.ibm.com>.
1785
1786 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1787
1788         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1789         PTHFCT_CALL definition.
1790
1791 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1792
1793         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1794         available, don't use it.
1795
1796 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1797
1798         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1799         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1800         call into the kernel to delay.
1801
1802 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1803
1804         * tst-initializers1.c: We want to test the initializers as seen
1805         outside of libc, so undefined _LIBC.
1806
1807         * pthread_join.c (cleanup): Avoid warning.
1808
1809 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1810
1811         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1812         (__lll_timedwait_tid): Add unwind info.
1813
1814         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1815         function table, mangle the pointers.
1816         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1817         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1818         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1819         demangle pointers before use.
1820         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1821         demangle pointer.
1822         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1823         * sysdeps/pthread/setxid.h: Likewise.
1824
1825 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1826
1827         * tst-rwlock7.c: Show some more information in case of correct
1828         behavior.
1829
1830 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1831
1832         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1833         (lll_futex_timed_wait): Undo part of last change, don't negate
1834         return value.
1835
1836 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1837
1838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1839         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1840
1841 2006-12-28  David S. Miller  <davem@davemloft.net>
1842
1843         * shlib-versions: Fix sparc64 linux target specification.
1844
1845 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1846
1847         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1848         Adjust include path for pthread_barrier_wait.c move.
1849
1850 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1851
1852         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1853         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1854
1855 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1856
1857         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1858         6 argument cancellable syscalls.
1859         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1860         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1861         6 argument cancellable syscalls.
1862         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1863
1864 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1865
1866         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1867         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1868
1869 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1870
1871         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1872         __sync_lock_release instead of __sync_lock_release_si.
1873
1874 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1875
1876         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1877         Define.
1878         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1879         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1880         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1881         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1882         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1883         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1884         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1885         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1886         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1887         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1888         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1889
1890 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1891
1892         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1893         * pthread_barrier_wait.c: ...here.
1894         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1895         * pthread_cond_broadcast.c: ...here.
1896         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1897         * pthread_cond_signal.c: ...here.
1898         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1899         * pthread_cond_timedwait.c: ...here.
1900         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1901         * pthread_cond_wait.c: ...here.
1902         * sysdeps/pthread/pthread_once.c: Move to...
1903         * pthread_once.c: ...here.
1904         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1905         * pthread_rwlock_rdlock.c: ...here.
1906         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1907         * pthread_rwlock_timedrdlock.c: ...here.
1908         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1909         * pthread_rwlock_timedwrlock.c: ...here.
1910         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1911         * pthread_rwlock_unlock.c: ...here.
1912         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1913         * pthread_rwlock_wrlock.c: ...here.
1914         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1915         * pthread_spin_destroy.c: ...here.
1916         * sysdeps/pthread/pthread_spin_init.c: Move to...
1917         * pthread_spin_init.c: ...here.
1918         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1919         * pthread_spin_unlock.c: ...here.
1920         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1921         * pthread_getcpuclockid.c: ...here.
1922
1923         * init.c: USE_TLS support is now always enabled.
1924         * tst-tls5.h: Likewise.
1925         * sysdeps/alpha/tls.h: Likewise.
1926         * sysdeps/i386/tls.h: Likewise.
1927         * sysdeps/ia64/tls.h: Likewise.
1928         * sysdeps/powerpc/tls.h: Likewise.
1929         * sysdeps/s390/tls.h: Likewise.
1930         * sysdeps/sh/tls.h: Likewise.
1931         * sysdeps/sparc/tls.h: Likewise.
1932         * sysdeps/x86_64/tls.h: Likewise.
1933
1934 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1935
1936         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1937         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1938         failed.
1939
1940         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1941         Define to THREAD_SELF->header.multiple_threads.
1942         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1943         Likewise.
1944         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1945         Likewise.
1946         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1947         (SINGLE_THREAD_P): Likewise.
1948         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1949         (SINGLE_THREAD_P): Likewise.
1950         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1951         (SINGLE_THREAD_P): Likewise.
1952         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1953         (SINGLE_THREAD_P): Likewise.
1954         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1955         Likewise.
1956         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1957         (SINGLE_THREAD_P): Likewise.
1958         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1959         (SINGLE_THREAD_P): Likewise.
1960         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1961         Likewise.
1962
1963 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1964
1965         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1966         by default rather than 2_3_3.
1967
1968 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1969
1970         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1971         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1972         atomic_* instead of catomic_* macros.
1973
1974 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1975
1976         [BZ #3285]
1977         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1978         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1979         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1980         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1981         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1982         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1983         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1984         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1985         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1986         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1987         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1988         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1989         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1990
1991 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1992
1993         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1994         cancelable syscalls with six parameters.
1995
1996         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1997         operations instead of atomic_*.
1998
1999 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2000
2001         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2002
2003 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2004
2005         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2006         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2007         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2008         New file.
2009         * pthread_attr_setstack.c: Allow overwriting the version number of the
2010         new symbol.
2011         * pthread_attr_setstacksize.c: Likewise.
2012         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2013         it.
2014         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2015         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2016
2017 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2018
2019         [BZ #3251]
2020         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2021         Patch by Petr Baudis.
2022
2023 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2024
2025         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2026
2027         * tst-cancel2.c (tf): Loop as long as something was written.
2028
2029 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2030
2031         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2032         mutexes wake all mutexes.
2033         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2034         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2035         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2036
2037 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2038
2039         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2040         to guarantee the thread is always canceled.
2041
2042 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2043
2044         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2045         Include stdlib.h.
2046         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2047         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2048         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2049         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2051
2052 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2053
2054         [BZ #3123]
2055         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2056         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2060         * Makefile (tests): Add tst-cond22.
2061         * tst-cond22.c: New file.
2062
2063 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2064
2065         [BZ #3124]
2066         * descr.h (struct pthread): Add parent_cancelhandling.
2067         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2068         cancelhandling value to child.
2069         * pthread_create.c (start_thread): If parent thread was canceled
2070         reset the SIGCANCEL mask.
2071         * Makefile (tests): Add tst-cancel25.
2072         * tst-cancel25.c: New file.
2073
2074 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2075             Ulrich Drepper  <drepper@redhat.com>
2076
2077         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2078         counterp if it is already zero.
2079         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2080
2081 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2082             Roland McGrath  <roland@redhat.com>
2083
2084         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2085         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2086         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2087         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2088         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2089         lll_robust_mutex_timedlock, lll_mutex_unlock,
2090         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2091         Add _L_*_ symbols around the subsection.
2092         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2093         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2094
2095 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2096             Roland McGrath  <roland@redhat.com>
2097
2098         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2099         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2100         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2101         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2102         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2103         lll_robust_mutex_timedlock, lll_mutex_unlock,
2104         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2105         Add _L_*_ symbols around the subsection.
2106         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2107         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2108
2109 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2110
2111         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2112         change because it can disturb too much existing code.  If real hard
2113         reader preference is needed we'll introduce another type.
2114         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2115         (pthread_rwlock_timedwrlock): Likewise.
2116         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2117         Likewise.
2118
2119 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2120
2121         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2122         reader preference.
2123         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2124         (pthread_rwlock_timedwrlock): Likewise.
2125         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2126         Likewise.
2127
2128 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2129
2130         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2131         Only define ifdef SHARED.
2132
2133 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2134
2135         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2136         (free_stacks): ...here.
2137         (__free_stack_cache): New function.
2138         * pthreadP.h: Declare __free_stack_cache.
2139         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2140         ptr_freeres.
2141         * init.c (pthread_functions): Initialize ptr_freeres.
2142         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2143         New freeres function.
2144
2145 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2146
2147         [BZ #3018]
2148         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2149
2150 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2151
2152         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2153         _XOPEN_REALTIME_THREADS.
2154
2155 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2156
2157         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2158         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2159         HAVE_CLOCK_GETTIME_VSYSCALL.
2160         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2161
2162 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2163
2164         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2165         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2166         * descr.h (struct priority_protection_data): New type.
2167         (struct pthread): Add tpp field.
2168         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2169         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2170         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2171         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2172         TPP mutexes.
2173         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2174         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2175         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2176         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2177         * tpp.c: New file.
2178         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2179         boosted by TPP.
2180         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2181         * pthread_mutexattr_getprioceiling.c
2182         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2183         in the SCHED_FIFO priority range.
2184         * pthread_mutexattr_setprioceiling.c
2185         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2186         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2187         if mutex is not TPP.  Ceiling is now in __data.__lock.
2188         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2189         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2190         is now in __data.__lock.  Add locking.
2191         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2192         * Makefile (libpthread-routines): Add tpp.
2193         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2194         * tst-tpp.h: New file.
2195         * tst-mutexpp1.c: New file.
2196         * tst-mutexpp6.c: New file.
2197         * tst-mutexpp10.c: New file.
2198         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2199         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2200
2201 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2202
2203         [BZ #2843]
2204         * pthread_join.c (pthread_join): Account for self being canceled
2205         when checking for deadlocks.
2206         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2207         (tf1): Don't print anything after pthread_join returns, this would be
2208         another cancellation point.
2209         (tf2): Likewise.
2210         * tst-join6.c: New file.
2211         * Makefile (tests): Add tst-join6.
2212
2213 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2214
2215         [BZ #2892]
2216         * pthread_setspecific.c (__pthread_setspecific): Check
2217         out-of-range index before checking for unused key.
2218
2219         * sysdeps/pthread/gai_misc.h: New file.
2220
2221 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2222
2223         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2224         file.  Don't use sysctl.
2225         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2226         overwrite the file if this is likely not true.
2227
2228 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2229
2230         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2231         * Makefile (tests): Add tst-getpid3.
2232         * tst-getpid3.c: New file.
2233
2234 2006-07-30  Roland McGrath  <roland@redhat.com>
2235
2236         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2237
2238         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2239         (pause_not_cancel): New macro.
2240         (nanosleep_not_cancel): New macro.
2241         (sigsuspend_not_cancel): New macro.
2242         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2243         nanosleep_not_cancel macro from <not-cancel.h>.
2244         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2245         macro from <not-cancel.h>.
2246
2247 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2248             Jakub Jelinek  <jakub@redhat.com>
2249
2250         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2251         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2252         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2253         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2254         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2255         * pthread_mutex_lock.c: Likewise.
2256         * pthread_mutex_timedlock.c: Likewise.
2257         * pthread_mutex_trylock.c: Likewise.
2258         * pthread_mutex_unlock.c: Likewise.
2259         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2260         all mutexes.
2261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2263         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2264         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2265         pthread-pi-defines.sym.
2266         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2267         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2268         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2269         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2271         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2272         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2273         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2274         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2275         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2276         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2277         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2278         * tst-mutex2.c: Likewise.
2279         * tst-mutex3.c: Likewise.
2280         * tst-mutex4.c: Likewise.
2281         * tst-mutex5.c: Likewise.
2282         * tst-mutex6.c: Likewise.
2283         * tst-mutex7.c: Likewise.
2284         * tst-mutex7a.c: Likewise.
2285         * tst-mutex8.c: Likewise.
2286         * tst-mutex9.c: Likewise.
2287         * tst-robust1.c: Likewise.
2288         * tst-robust7.c: Likewise.
2289         * tst-robust8.c: Likewise.
2290         * tst-mutexpi1.c: New file.
2291         * tst-mutexpi2.c: New file.
2292         * tst-mutexpi3.c: New file.
2293         * tst-mutexpi4.c: New file.
2294         * tst-mutexpi5.c: New file.
2295         * tst-mutexpi6.c: New file.
2296         * tst-mutexpi7.c: New file.
2297         * tst-mutexpi7a.c: New file.
2298         * tst-mutexpi8.c: New file.
2299         * tst-mutexpi9.c: New file.
2300         * tst-robust1.c: New file.
2301         * tst-robust2.c: New file.
2302         * tst-robust3.c: New file.
2303         * tst-robust4.c: New file.
2304         * tst-robust5.c: New file.
2305         * tst-robust6.c: New file.
2306         * tst-robust7.c: New file.
2307         * tst-robust8.c: New file.
2308         * Makefile (tests): Add the new tests.
2309
2310         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2311         * pthread_mutex_destroy.c: Remove unneeded label.
2312
2313 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2314
2315         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2316         computations to compile time.
2317
2318 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2319
2320         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2321
2322 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2323
2324         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2325
2326 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2327
2328         * pthread_key_create.c (__pthread_key_create): Do away with
2329         __pthread_keys_lock.
2330
2331         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2332         (__kernel_cpumask_size): Mark as hidden.
2333         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2334
2335         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2336         * semaphoreP.h (__sem_mappings_lock): Likewise.
2337
2338 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2339
2340         * pthread_atfork.c: Mark __dso_handle as hidden.
2341
2342 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2343
2344         [BZ #2644]
2345         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2346         the reload problem.  Change the one path in pthread_cancel_init
2347         which causes the problem.  Force gcc to reload.  Simplify callers.
2348         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2349         (_Unwind_GetBSP): Undo last patch.
2350
2351 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2352
2353         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2354         function pointer is reloaded after pthread_cancel_init calls.
2355
2356         [BZ #2644]
2357         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2358         pointers are reloaded after pthread_cancel_init calls.
2359
2360 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2361
2362         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2363         __always_inline.
2364
2365 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2366
2367         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2368         Allocate new object which is passed to timer_sigev_thread so that
2369         the timer can be deleted before the new thread is scheduled.
2370
2371 2006-04-26  Roland McGrath  <roland@redhat.com>
2372
2373         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2374
2375 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2376
2377         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2378         suffix for conditional jumps.
2379         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2380         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2381         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2382         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2383         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2384         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2385
2386         * init.c (sigcancel_handler): Compare with correct PID even if the
2387         thread is in the middle of a fork call.
2388         (sighandler_setxid): Likewise.
2389         Reported by Suzuki K P <suzuki@in.ibm.com> .
2390
2391 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2392
2393         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2394
2395 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2396
2397         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2398         fails [Coverity CID 105].
2399
2400 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2401
2402         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2403
2404 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2405
2406         [BZ #2505]
2407         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2408         Define __lll_rel_instr using lwsync.
2409
2410 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2411
2412         * allocatestack.c (allocate_stack): Always initialize robust_head.
2413         * descr.h: Define struct robust_list_head.
2414         (struct pthread): Use robust_list_head in robust mutex list definition.
2415         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2416         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2417         (__pthread_initialize_minimal_internal): Register robust_list with
2418         the kernel.
2419         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2420         Declare __set_robust_list_avail.
2421         * pthread_create.c (start_thread): Register robust_list of new thread.
2422         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2423         waiters.
2424         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2425         number of users, it's unreliable.
2426         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2427         set_robust_list syscall is available.
2428         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2429         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2430         Set robust_head.list_op_pending before trying to lock a robust mutex.
2431         * pthread_mutex_timedlock.c: Likewise.
2432         * pthread_mutex_trylock.c: Likewise.
2433         * pthread_mutex_unlock.c: Likewise for unlocking.
2434         * Makefile (tests): Add tst-robust8.
2435         * tst-robust8.c: New file.
2436
2437 2006-03-08  Andreas Schwab  <schwab@suse.de>
2438
2439         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2440         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2441
2442 2006-03-05  Roland McGrath  <roland@redhat.com>
2443
2444         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2445         and $config_os doesn't match *linux*.
2446
2447 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2448
2449         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2450         Use __syscall_error.
2451         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2452         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2453         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2454         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2455         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2456         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2457
2458 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2459
2460         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2461
2462 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2463
2464         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2465         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2466         mutex.
2467         (__lll_robust_timedlock_wait): Likewise.
2468         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2469         (__lll_robust_lock_wait): Likewise.
2470         (__lll_robust_timedlock_wait): Likewise.
2471         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2472         (__lll_robust_lock_wait): Likewise.
2473         (__lll_robust_timedlock_wait): Likewise.
2474
2475 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2476
2477         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2478         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2479         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2480         lll_robust_mutex_unlock): Define.
2481         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2482
2483 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2484
2485         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2486         instead of <clone.S>.
2487
2488 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2489
2490         * Makefile (libpthread-routines): Add
2491         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2492         and pthread_mutex_[sg]etprioceiling.
2493         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2494         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2495         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2496         pthread_mutex_setprioceiling.
2497         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2498         PTHREAD_PRIO_PROTECT): New enum values.
2499         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2500         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2501         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2502         prototypes.
2503         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2504         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2505         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2506         Define.
2507         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2508         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2509         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2510         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2511         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2512         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2513         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2514         protocol mutexes.
2515         * pthread_mutex_getprioceiling.c: New file.
2516         * pthread_mutex_setprioceiling.c: New file.
2517         * pthread_mutexattr_getprioceiling.c: New file.
2518         * pthread_mutexattr_setprioceiling.c: New file.
2519         * pthread_mutexattr_getprotocol.c: New file.
2520         * pthread_mutexattr_setprotocol.c: New file.
2521
2522 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2523
2524         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2525
2526 2006-02-27  Roland McGrath  <roland@redhat.com>
2527
2528         * sysdeps/pthread/Subdirs: List nptl here too.
2529         * configure (libc_add_on_canonical): New variable.
2530
2531         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2532
2533         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2534         self to get main source tree's file.
2535         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2536         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2537         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2538         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2539         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2540         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2541         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2542         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2543         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2544         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2545         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2546         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2547         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2548
2549         * Makefile: Use $(sysdirs) in vpath directive.
2550
2551         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2552         (CPPFLAGS-timer_routines.c): Likewise.
2553
2554         * Makeconfig (includes): Variable removed.
2555
2556 2006-02-26  Roland McGrath  <roland@redhat.com>
2557
2558         * sysdeps/generic/pt-raise.c: Moved to ...
2559         * pt-raise.c: ... here.
2560         * sysdeps/generic/lowlevellock.h: Moved to ...
2561         * lowlevellock.h: ... here.
2562
2563 2006-02-23  Roland McGrath  <roland@redhat.com>
2564
2565         * descr.h (struct pthread): Add final member `end_padding'.
2566         (PTHREAD_STRUCT_END_PADDING): Use it.
2567
2568 2006-02-20  Roland McGrath  <roland@redhat.com>
2569
2570         * sysdeps/mips: Directory removed, saved in ports repository.
2571         * sysdeps/unix/sysv/linux/mips: Likewise.
2572
2573 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2574
2575         * tst-robust1.c: Add second mutex to check that the mutex list is
2576         handled correctly.
2577
2578 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2579
2580         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2581         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2582         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2583         lll_robust_mutex_unlock): New macros.
2584         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2585         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2586         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2587         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2588         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2589
2590 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2591
2592         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2593         definitions.
2594         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2595
2596 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2597
2598         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2599         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2600         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2601         (lll_robust_mutex_unlock): Likewise.
2602
2603 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2604
2605         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2606         Set robust_list.__next rather than robust_list.
2607         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2608         (__pthread_list_t): New typedef.
2609         (pthread_mutex_t): Replace __next and __prev fields with __list.
2610         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2611         (__pthread_list_t): New typedef.
2612         (pthread_mutex_t): Replace __next and __prev fields with __list.
2613         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2614         (__pthread_list_t, __pthread_slist_t): New typedefs.
2615         (pthread_mutex_t): Replace __next and __prev fields with __list.
2616         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2617         (__pthread_list_t, __pthread_slist_t): New typedefs.
2618         (pthread_mutex_t): Replace __next and __prev fields with __list.
2619         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2620         (__pthread_list_t, __pthread_slist_t): New typedefs.
2621         (pthread_mutex_t): Replace __next and __prev fields with __list.
2622         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2623         (__pthread_slist_t): New typedef.
2624         (pthread_mutex_t): Replace __next field with __list.
2625
2626 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2627
2628         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2629         PTHREAD_MUTEX_OWNERDEAD.
2630         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2631         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2632         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2633         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2634         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2635         to PTHREAD_MUTEX_INCONSISTENT.
2636         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2637         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2638         * pthread_mutex_trylock.c: Likewise.
2639         * pthread_mutex_timedlock.c: Likewise.
2640         * pthread_mutex_unlock.c: Likewise.
2641         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2642         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2643         lowlevelrobustlock.sym.
2644         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2645         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2646         definitions.
2647         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2648         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2649         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2650         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2651         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2652
2653 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2654
2655         * allocatestack.c (allocate_stack): Initialize robust_list.
2656         * init.c (__pthread_initialize_minimal_internal): Likewise.
2657         * descr.h (struct xid_command): Pretty printing.
2658         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2659         robust_list.  Adjust macros.
2660         * pthread_create.c (start_thread): Adjust robust_list handling.
2661         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2662         but the owner for all robust mutex types.
2663         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2664         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2665         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2666         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2667
2668         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2669         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2670
2671 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2672
2673         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2674         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2675
2676 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2677
2678         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2679         Return status.
2680         (lll_futex_timed_wait): Define.
2681
2682 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2683
2684         * tst-cancel4.c: Test ppoll.
2685
2686 2006-01-18  Andreas Jaeger  <aj@suse.de>
2687
2688         [BZ #2167]
2689         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2690         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2691         by Jim Gifford <patches@jg555.com>.
2692
2693 2006-01-13  Richard Henderson  <rth@redhat.com>
2694
2695         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2696
2697 2006-01-10  Roland McGrath  <roland@redhat.com>
2698
2699         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2700         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2701         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2702         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2703         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2704         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2705         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2706         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2707         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2708         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2709
2710 2006-01-09  Roland McGrath  <roland@redhat.com>
2711
2712         * tst-initializers1-c89.c: New file.
2713         * tst-initializers1-c99.c: New file.
2714         * tst-initializers1-gnu89.c: New file.
2715         * tst-initializers1-gnu99.c: New file.
2716         * Makefile (tests): Add them.
2717         (CFLAGS-tst-initializers1-c89.c): New variable.
2718         (CFLAGS-tst-initializers1-c99.c): New variable.
2719         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2720         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2721
2722         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2723         Use __extension__ on anonymous union definition.
2724         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2725         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2726         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2727         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2728         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2729
2730 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2731
2732         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2733         Don't give the union a name because it changes the mangled name.
2734         Instead name the struct for __data.
2735         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2736         Likewise.
2737         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2738         Likewise.
2739
2740 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2741
2742         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2743         stack bias to mc_ftp field.
2744
2745 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2746
2747         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2748         being too clever and reloading the futex value where it shouldn't.
2749
2750 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2751
2752         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2753         correct type.
2754
2755 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2756
2757         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2758         Add cfi directives.
2759
2760 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2761
2762         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2763         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2764         rename in tcbhead_t.
2765
2766         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2767         Don't give the union a name because it changes the mangled name.
2768         Instead name the struct for __data.
2769         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2770         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2771         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2772         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2773         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2774         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2775
2776 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2777
2778         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2779         Return status.
2780         (lll_futex_timed_wait): Define.
2781         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2782         * sysdeps/pthread/aio_misc.h: New file.
2783
2784 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2785
2786         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2787
2788 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2789
2790         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2791         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2792         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2793
2794 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2795
2796         * tst-cancel24.cc: Use C headers instead of C++ headers.
2797
2798 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2799
2800         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2801         sparc-linux configured glibc.
2802         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2803         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2804         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2805         atomic_compare_and_exchange_val_24_acq instead of
2806         atomic_compare_and_exchange_val_acq.
2807         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2808         instead of atomic_exchange_rel.
2809         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2810         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2811         file.
2812         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2813         file.
2814         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2815         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2816         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2817         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2818         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2819         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2820         New file.
2821         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2822         New file.
2823         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2824         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2825         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2826         file.
2827         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2828         file.
2829         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2830
2831 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2832
2833         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2834         mutex initializers.
2835
2836 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2837
2838         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2839         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2840         THREAD_COPY_POINTER_GUARD): Define.
2841         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2842         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2843
2844 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2845
2846         * version.c: Update copyright year.
2847
2848 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2849
2850         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2851         .eh_frame section, use cfi_* directives.
2852         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2853
2854 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2855
2856         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2857         now.
2858
2859 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2860
2861         * sysdeps/pthread/sigaction.c: Removed.
2862         * sigaction.c: New file.
2863         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2864
2865 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2866
2867         * Makefile (tests): Add tst-signal7.
2868         * tst-signal7.c: New file.
2869
2870 2005-12-27  Roland McGrath  <roland@redhat.com>
2871
2872         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2873         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2874         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2875         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2876         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2877         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2878         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2879         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2880         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2881         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2882         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2883
2884 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2885
2886         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2887         and __prev field to pthread_mutex_t.
2888         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2889         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2890         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2891         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2892         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2893         to pthread_mutex_t.
2894
2895 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2896
2897         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2898         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2899         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2900         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2901         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2902         and PTHREAD_MUTEXATTR_FLAG_BITS.
2903         * descr.h (struct pthread): Add robust_list field and define
2904         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2905         * pthread_mutexattr_getrobust.c: New file.
2906         * pthread_mutexattr_setrobust.c: New file.
2907         * pthread_mutex_consistent.c: New file.
2908         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2909         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2910         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2911         Adjust pthread_mutex_t initializers.
2912         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2913         field to pthread_mutex_t.
2914         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2915         and __prev field to pthread_mutex_t.
2916         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2917         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2918         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2919         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2920         * pthread_mutexattr_gettype.c: Likewise.
2921         * pthread_mutexattr_setpshared.c: Likewise.
2922         * pthread_mutexattr_settype.c: Likewise.
2923         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2924         Initialize mutex kind according to robust flag.
2925         * pthread_mutex_lock.c: Implement local robust mutex.
2926         * pthread_mutex_timedlock.c: Likewise.
2927         * pthread_mutex_trylock.c: Likewise.
2928         * pthread_mutex_unlock.c: Likewise.
2929         * pthread_create.c (start_thread): Mark robust mutexes which remained
2930         locked as dead.
2931         * tst-robust1.c: New file.
2932         * tst-robust2.c: New file.
2933         * tst-robust3.c: New file.
2934         * tst-robust4.c: New file.
2935         * tst-robust5.c: New file.
2936         * tst-robust6.c: New file.
2937         * tst-robust7.c: New file.
2938         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2939         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2940         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2941         tst-robust5, tst-robust6, and tst-robust7.
2942
2943         * tst-typesizes.c: New file.
2944         * Makefile (tests): Add tst-typesizes.
2945
2946         * tst-once3.c: More debug output.
2947
2948 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2949
2950         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2951         missing after last change.
2952
2953         * version.c: Update copyright year.
2954
2955 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2956
2957         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2958         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2959         * pthread_mutex_trylock.c: Likewise.
2960         * pthread_mutex_timedlock.c: Likewise.
2961         * pthread_mutex_unlock.c: Likewise.
2962
2963 2005-12-22  Roland McGrath  <roland@redhat.com>
2964
2965         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2966         so that #include_next's search location is not reset to the -I..
2967         directory where <nptl/...> can be found.
2968
2969 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2970
2971         [BZ #1913]
2972         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2973         Fix unwind info.  Remove useless branch prediction prefix.
2974         * tst-cancel24.cc: New file.
2975         * Makefile: Add rules to build and run tst-cancel24.
2976
2977 2005-12-21  Roland McGrath  <roland@redhat.com>
2978
2979         * libc-cancellation.c: Use <> rather than "" #includes.
2980         * pt-cleanup.c: Likewise.
2981         * pthread_create.c: Likewise.
2982         * pthread_join.c: Likewise.
2983         * pthread_timedjoin.c: Likewise.
2984         * pthread_tryjoin.c: Likewise.
2985         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2986         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2987         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2988         * unwind.c: Likewise.
2989
2990 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2991
2992         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2993         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2994         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2995         THREAD_COPY_POINTER_GUARD): Define.
2996
2997 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2998
2999         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3000         rather than one.
3001         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3002         THREAD_COPY_POINTER_GUARD): Define.
3003         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3004         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3005         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3006         THREAD_COPY_POINTER_GUARD): Define.
3007         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3008         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3009         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3010         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3011         Use PTR_DEMANGLE for B0 if defined.
3012
3013 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3014
3015         * pthread_create.c (__pthread_create_2_1): Use
3016         THREAD_COPY_POINTER_GUARD if available.
3017         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3018         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3019         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3020         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3021         * sysdeps/x86_64/tls.h: Likewise.
3022
3023 2005-12-15  Roland McGrath  <roland@redhat.com>
3024
3025         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3026
3027 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3028
3029         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3030         sysdeps/generic.
3031         * errno-loc.c: New file.
3032
3033 2005-12-12  Roland McGrath  <roland@redhat.com>
3034
3035         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3036         adjustments before choosing stack size.  Update minimum stack size
3037         calculation to match allocate_stack change.
3038
3039 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3040
3041         * allocatestack.c (allocate_stack): Don't demand that there is an
3042         additional full page available on the stack beside guard, TLS, the
3043         minimum stack.
3044
3045 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3046
3047         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3048         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3049
3050         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3051         compiling 32-bit code we must define __cleanup_fct_attribute.
3052
3053 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3054
3055         [BZ #1920]
3056         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3057         __attribute__ instead of __attribute.
3058         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3059         (__cleanup_fct_attribute): Likewise.
3060
3061 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3062
3063         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3064         a write barrier before writing libgcc_s_getcfa.
3065
3066 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3067
3068         * sysdeps/unix/sysv/linux/configure: Removed.
3069
3070 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3071
3072         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3073         optional init_array/fini_array support.
3074
3075 2005-10-24  Roland McGrath  <roland@redhat.com>
3076
3077         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3078         versioned_symbol use.
3079
3080 2005-10-16  Roland McGrath  <roland@redhat.com>
3081
3082         * init.c (__pthread_initialize_minimal_internal): Even when using a
3083         compile-time default stack size, apply the minimum that allocate_stack
3084         will require, and round up to page size.
3085
3086 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3087
3088         * Makefile ($(test-modules)): Remove static pattern rule.
3089
3090 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3091             Ulrich Drepper  <drepper@redhat.com>
3092
3093         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3094         alignment in callback function.
3095         * Makefile: Add rules to build and run tst-align3.
3096         * tst-align3.c: New file.
3097
3098 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3099
3100         * allocatestack.c (setxid_signal_thread): Add
3101         INTERNAL_SYSCALL_DECL (err).
3102
3103 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3104
3105         * allocatestack.c (setxid_signal_thread): Need to use
3106         atomic_compare_and_exchange_bool_acq.
3107
3108 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3109             Jakub Jelinek  <jakub@redhat.com>
3110
3111         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3112         CANCEL_RESTMASK.
3113         (struct pthread): Move specific_used field to avoid padding.
3114         Add setxid_futex field.
3115         * init.c (sighandler_setxid): Reset setxid flag and release the
3116         setxid futex.
3117         * allocatestack.c (setxid_signal_thread): New function.  Broken
3118         out of the bodies of the two loops in __nptl_setxid.  For undetached
3119         threads check whether they are exiting and if yes, don't send a signal.
3120         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3121         * pthread_create.c (start_thread): For undetached threads, check
3122         whether setxid bit is set.  If yes, wait until signal has been
3123         processed.
3124
3125         * allocatestack.c (STACK_VARIABLES): Initialize them.
3126         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3127
3128 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3129
3130         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3131         waiters, awake all waiters on the associated mutex.
3132
3133 2005-09-22  Roland McGrath  <roland@redhat.com>
3134
3135         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3136         ../sysdeps/x86_64/hp-timing.h).
3137
3138 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3139
3140         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3141         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3142         (lll_futex_wake_unlock): Define.
3143         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3144         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3145         (lll_futex_wake_unlock): Define.
3146         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3147         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3148         (lll_futex_wake_unlock): Define.
3149         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3150         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3151         (lll_futex_wake_unlock): Define.
3152         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3153         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3154         (lll_futex_wake_unlock): Define.
3155         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3156         lll_futex_wake_unlock.
3157         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3158         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3159         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3161         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3162         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3163
3164 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3165
3166         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3167         Fix typo in register name.
3168
3169 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3170
3171         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3172         Use __sigfillset.  Document that sigfillset does the right thing wrt
3173         to SIGSETXID.
3174
3175 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3176
3177         [BZ #1102]
3178         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3179         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3180         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3181         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3182         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3183         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3184         in the structure.
3185         * Makefile (tests): Add tst-initializers1.
3186         (CFLAGS-tst-initializers1.c): Set.
3187         * tst-initializers1.c: New test.
3188
3189 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3190
3191         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3192         Make sure __flags are located at offset 48 from the start of the
3193         structure.
3194
3195 2005-07-02  Roland McGrath  <roland@redhat.com>
3196
3197         * Makeconfig: Comment fix.
3198
3199 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3200
3201         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3202         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3203         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3204         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3205         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3206         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3207         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3208         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3209         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3210         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3211
3212 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3213
3214         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3215         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3216         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3217         fields.
3218         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3219         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3220         field.  Put in sysinfo field unconditionally.
3221         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3222         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3223         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3224         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3225         fields.
3226         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3227         * pthread_create.c (__pthread_create_2_1): Use
3228         THREAD_COPY_STACK_GUARD macro.
3229         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3230         tests.
3231         * tst-stackguard1.c: New file.
3232         * tst-stackguard1-static.c: New file.
3233
3234 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3235
3236         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3237         Invoke CGOTSETUP and CGOTRESTORE.
3238         (CGOTSETUP, CGOTRESTORE): Define.
3239
3240 2005-05-29  Richard Henderson  <rth@redhat.com>
3241
3242         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3243         (tf_write, tf_writev): Use it.
3244         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3245         the system minimum.
3246
3247 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3248
3249         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3250         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3251         __librt_*_asynccancel@local.
3252
3253 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3254
3255         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3256         all occurrences of JUMPTARGET.  Instead append @local to labels.
3257
3258 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3259
3260         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3261         size/alignment of struct pthread rather than tcbhead_t.
3262         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3263         Likewise.
3264         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3265         Likewise.
3266         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3267         Likewise.
3268
3269 2005-05-19  Richard Henderson  <rth@redhat.com>
3270
3271         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3272         __sync_val_compare_and_swap, not explicit _si variant.
3273         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3274
3275 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3276
3277         [BZ #915]
3278         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3279
3280 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3281
3282         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3283         .eh_frame section, use cfi_* directives.
3284
3285 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3286
3287         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3288         of "" includes.
3289
3290 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3291
3292         [BZ #1075]
3293         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3294         aio_write blocks.
3295
3296 2005-04-27  Roland McGrath  <roland@redhat.com>
3297
3298         * Makefile (tests): Remove tst-clock2.
3299
3300         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3301         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3302         translating to the kernel clockid_t for our own process/thread clock.
3303
3304         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3305
3306 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3307
3308         * old_pthread_cond_init.c: Include <errno.h>.
3309         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3310         process shared or uses clock other than CLOCK_REALTIME.
3311         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3312
3313 2005-04-13  David S. Miller  <davem@davemloft.net>
3314
3315         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3316         * sysdeps/sparc/sparc64/clone.S: New file.
3317
3318 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3319
3320         [BZ #1102]
3321         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3322         __inline instead of inline.
3323         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3324
3325 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3326
3327         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3328         functionally equivalent, but shorter instructions.
3329         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3330         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3331         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3332         Likewise.
3333         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3334         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3335         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3336         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3337         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3338         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3339         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3340         Likewise.
3341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3342         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3344         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3345         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3346
3347 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3348
3349         * sysdeps/mips/Makefile: New file.
3350         * sysdeps/mips/nptl-sysdep.S: New file.
3351         * sysdeps/mips/tcb-offsets.sym: New file.
3352         * sysdeps/mips/pthread_spin_lock.S: New file.
3353         * sysdeps/mips/pthread_spin_trylock.S: New file.
3354         * sysdeps/mips/pthreaddef.h: New file.
3355         * sysdeps/mips/tls.h: New file.
3356         * sysdeps/mips/jmpbuf-unwind.h: New file.
3357         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3358         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3359         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3360         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3361         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3362         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3363         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3364         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3365         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3366         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3367
3368 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3369
3370         [BZ #1112]
3371         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3372         variable to scerr.
3373
3374 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3375
3376         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3377
3378 2005-02-25  Roland McGrath  <roland@redhat.com>
3379
3380         * alloca_cutoff.c: Correct license text.
3381         * tst-unload.c: Likewise.
3382         * sysdeps/pthread/allocalim.h: Likewise.
3383         * sysdeps/pthread/pt-initfini.c: Likewise.
3384         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3385         * sysdeps/pthread/bits/sigthread.h: Likewise.
3386         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3387         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3388
3389 2005-02-16  Roland McGrath  <roland@redhat.com>
3390
3391         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3392         Use unsigned int * for ptr_nthreads.
3393
3394 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3395
3396         [BZ #721]
3397         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3398         gcc4.
3399
3400 2005-02-07  Richard Henderson  <rth@redhat.com>
3401
3402         [BZ #787]
3403         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3404         argument.
3405
3406 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3407
3408         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3409         order of arguments in invocation of atomic_add_zero.
3410
3411 2005-01-26  Jakub Jelinek  <jakub@redhat.com>