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