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