.
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2
3         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4         (__lll_timedwait_tid): Add unwind info.
5
6         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
7         function table, mangle the pointers.
8         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
9         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
10         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
11         demangle pointers before use.
12         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
13         demangle pointer.
14         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
15         * sysdeps/pthread/setxid.h: Likewise.
16
17 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
18
19         * tst-rwlock7.c: Show some more information in case of correct
20         behavior.
21
22 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
23
24         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
25         (lll_futex_timed_wait): Undo part of last change, don't negate
26         return value.
27
28 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
29
30         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
31         FUTEX_CMP_REQUEUE and lll_futex_requeue.
32
33 2006-12-28  David S. Miller  <davem@davemloft.net>
34
35         * shlib-versions: Fix sparc64 linux target specification.
36
37 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
38
39         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
40         Adjust include path for pthread_barrier_wait.c move.
41
42 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
43
44         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
45         tid isn't reread from pd->tid in between ESRCH test and the syscall.
46
47 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
48
49         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
50         6 argument cancellable syscalls.
51         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
52         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
53         6 argument cancellable syscalls.
54         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
55
56 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
57
58         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
59         (__rtld_mrlock_initialize): Add missing closing parenthesis.
60
61 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
62
63         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
64         __sync_lock_release instead of __sync_lock_release_si.
65
66 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
67
68         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
69         Define.
70         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
71         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
72         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
73         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
74         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
75         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
76         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
77         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
78         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
79         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
80         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
81
82 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
83
84         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
85         * pthread_barrier_wait.c: ...here.
86         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
87         * pthread_cond_broadcast.c: ...here.
88         * sysdeps/pthread/pthread_cond_signal.c: Move to...
89         * pthread_cond_signal.c: ...here.
90         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
91         * pthread_cond_timedwait.c: ...here.
92         * sysdeps/pthread/pthread_cond_wait.c: Move to...
93         * pthread_cond_wait.c: ...here.
94         * sysdeps/pthread/pthread_once.c: Move to...
95         * pthread_once.c: ...here.
96         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
97         * pthread_rwlock_rdlock.c: ...here.
98         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
99         * pthread_rwlock_timedrdlock.c: ...here.
100         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
101         * pthread_rwlock_timedwrlock.c: ...here.
102         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
103         * pthread_rwlock_unlock.c: ...here.
104         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
105         * pthread_rwlock_wrlock.c: ...here.
106         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
107         * pthread_spin_destroy.c: ...here.
108         * sysdeps/pthread/pthread_spin_init.c: Move to...
109         * pthread_spin_init.c: ...here.
110         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
111         * pthread_spin_unlock.c: ...here.
112         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
113         * pthread_getcpuclockid.c: ...here.
114
115         * init.c: USE_TLS support is now always enabled.
116         * tst-tls5.h: Likewise.
117         * sysdeps/alpha/tls.h: Likewise.
118         * sysdeps/i386/tls.h: Likewise.
119         * sysdeps/ia64/tls.h: Likewise.
120         * sysdeps/powerpc/tls.h: Likewise.
121         * sysdeps/s390/tls.h: Likewise.
122         * sysdeps/sh/tls.h: Likewise.
123         * sysdeps/sparc/tls.h: Likewise.
124         * sysdeps/x86_64/tls.h: Likewise.
125
126 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
127
128         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
129         __rtld_mrlock_change): Update oldval if atomic compare and exchange
130         failed.
131
132         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
133         Define to THREAD_SELF->header.multiple_threads.
134         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
135         Likewise.
136         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
137         Likewise.
138         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
139         (SINGLE_THREAD_P): Likewise.
140         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
141         (SINGLE_THREAD_P): Likewise.
142         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
143         (SINGLE_THREAD_P): Likewise.
144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
145         (SINGLE_THREAD_P): Likewise.
146         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
147         Likewise.
148         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
149         (SINGLE_THREAD_P): Likewise.
150         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
151         (SINGLE_THREAD_P): Likewise.
152         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
153         Likewise.
154
155 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
156
157         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
158         by default rather than 2_3_3.
159
160 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
161
162         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
163         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
164         atomic_* instead of catomic_* macros.
165
166 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
167
168         [BZ #3285]
169         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
170         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
171         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
172         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
173         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
174         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
175         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
176         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
177         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
178         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
179         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
180         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
181         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
182
183 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
184
185         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
186         cancelable syscalls with six parameters.
187
188         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
189         operations instead of atomic_*.
190
191 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
192
193         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
194
195 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
196
197         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
198         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
199         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
200         New file.
201         * pthread_attr_setstack.c: Allow overwriting the version number of the
202         new symbol.
203         * pthread_attr_setstacksize.c: Likewise.
204         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
205         it.
206         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
207         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
208
209 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
210
211         [BZ #3251]
212         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
213         Patch by Petr Baudis.
214
215 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
216
217         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
218
219         * tst-cancel2.c (tf): Loop as long as something was written.
220
221 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
222
223         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
224         mutexes wake all mutexes.
225         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
226         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
227         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
228
229 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
230
231         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
232         to guarantee the thread is always canceled.
233
234 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
235
236         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
237         Include stdlib.h.
238         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
239         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
243
244 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
245
246         [BZ #3123]
247         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
248         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
249         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
252         * Makefile (tests): Add tst-cond22.
253         * tst-cond22.c: New file.
254
255 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
256
257         [BZ #3124]
258         * descr.h (struct pthread): Add parent_cancelhandling.
259         * sysdeps/pthread/createthread.c (create_thread): Pass parent
260         cancelhandling value to child.
261         * pthread_create.c (start_thread): If parent thread was canceled
262         reset the SIGCANCEL mask.
263         * Makefile (tests): Add tst-cancel25.
264         * tst-cancel25.c: New file.
265
266 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
267             Ulrich Drepper  <drepper@redhat.com>
268
269         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
270         counterp if it is already zero.
271         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
272
273 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
274             Roland McGrath  <roland@redhat.com>
275
276         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
277         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
278         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
279         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
280         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
281         lll_robust_mutex_timedlock, lll_mutex_unlock,
282         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
283         Add _L_*_ symbols around the subsection.
284         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
285         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
286
287 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
288             Roland McGrath  <roland@redhat.com>
289
290         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
291         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
292         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
293         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
294         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
295         lll_robust_mutex_timedlock, lll_mutex_unlock,
296         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
297         Add _L_*_ symbols around the subsection.
298         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
299         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
300
301 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
302
303         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
304         change because it can disturb too much existing code.  If real hard
305         reader preference is needed we'll introduce another type.
306         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
307         (pthread_rwlock_timedwrlock): Likewise.
308         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
309         Likewise.
310
311 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
312
313         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
314         reader preference.
315         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
316         (pthread_rwlock_timedwrlock): Likewise.
317         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
318         Likewise.
319
320 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
321
322         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
323         Only define ifdef SHARED.
324
325 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
326
327         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
328         (free_stacks): ...here.
329         (__free_stack_cache): New function.
330         * pthreadP.h: Declare __free_stack_cache.
331         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
332         ptr_freeres.
333         * init.c (pthread_functions): Initialize ptr_freeres.
334         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
335         New freeres function.
336
337 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
338
339         [BZ #3018]
340         * Makefile (extra-objs): Add modules to extra-test-objs instead.
341
342 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
343
344         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
345         _XOPEN_REALTIME_THREADS.
346
347 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
348
349         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
350         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
351         HAVE_CLOCK_GETTIME_VSYSCALL.
352         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
353
354 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
355
356         * sysdeps/unix/sysv/linux/bits/posix_opt.h
357         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
358         * descr.h (struct priority_protection_data): New type.
359         (struct pthread): Add tpp field.
360         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
361         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
362         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
363         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
364         TPP mutexes.
365         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
366         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
367         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
368         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
369         * tpp.c: New file.
370         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
371         boosted by TPP.
372         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
373         * pthread_mutexattr_getprioceiling.c
374         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
375         in the SCHED_FIFO priority range.
376         * pthread_mutexattr_setprioceiling.c
377         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
378         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
379         if mutex is not TPP.  Ceiling is now in __data.__lock.
380         * pthread_mutex_setprioceiling.c: Include stdbool.h.
381         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
382         is now in __data.__lock.  Add locking.
383         * pthread_create.c (__free_tcb): Free pd->tpp structure.
384         * Makefile (libpthread-routines): Add tpp.
385         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
386         * tst-tpp.h: New file.
387         * tst-mutexpp1.c: New file.
388         * tst-mutexpp6.c: New file.
389         * tst-mutexpp10.c: New file.
390         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
391         * tst-mutex6.c (TEST_FUNCTION): Likewise.
392
393 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
394
395         [BZ #2843]
396         * pthread_join.c (pthread_join): Account for self being canceled
397         when checking for deadlocks.
398         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
399         (tf1): Don't print anything after pthread_join returns, this would be
400         another cancellation point.
401         (tf2): Likewise.
402         * tst-join6.c: New file.
403         * Makefile (tests): Add tst-join6.
404
405 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
406
407         [BZ #2892]
408         * pthread_setspecific.c (__pthread_setspecific): Check
409         out-of-range index before checking for unused key.
410
411         * sysdeps/pthread/gai_misc.h: New file.
412
413 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
414
415         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
416         file.  Don't use sysctl.
417         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
418         overwrite the file if this is likely not true.
419
420 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
421
422         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
423         * Makefile (tests): Add tst-getpid3.
424         * tst-getpid3.c: New file.
425
426 2006-07-30  Roland McGrath  <roland@redhat.com>
427
428         * Makefile (libpthread-routines): Add ptw-sigsuspend.
429
430         * sysdeps/unix/sysv/linux/i386/not-cancel.h
431         (pause_not_cancel): New macro.
432         (nanosleep_not_cancel): New macro.
433         (sigsuspend_not_cancel): New macro.
434         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
435         nanosleep_not_cancel macro from <not-cancel.h>.
436         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
437         macro from <not-cancel.h>.
438
439 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
440             Jakub Jelinek  <jakub@redhat.com>
441
442         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
443         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
444         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
445         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
446         * pthread_mutex_init.c: Add support for priority inheritance mutex.
447         * pthread_mutex_lock.c: Likewise.
448         * pthread_mutex_timedlock.c: Likewise.
449         * pthread_mutex_trylock.c: Likewise.
450         * pthread_mutex_unlock.c: Likewise.
451         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
452         all mutexes.
453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
455         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
456         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
457         pthread-pi-defines.sym.
458         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
459         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
460         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
461         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
462         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
463         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
464         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
465         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
466         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
467         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
468         _POSIX_THREAD_PRIO_INHERIT to 200112L.
469         * tst-mutex1.c: Adjust to allow use in PI mutex test.
470         * tst-mutex2.c: Likewise.
471         * tst-mutex3.c: Likewise.
472         * tst-mutex4.c: Likewise.
473         * tst-mutex5.c: Likewise.
474         * tst-mutex6.c: Likewise.
475         * tst-mutex7.c: Likewise.
476         * tst-mutex7a.c: Likewise.
477         * tst-mutex8.c: Likewise.
478         * tst-mutex9.c: Likewise.
479         * tst-robust1.c: Likewise.
480         * tst-robust7.c: Likewise.
481         * tst-robust8.c: Likewise.
482         * tst-mutexpi1.c: New file.
483         * tst-mutexpi2.c: New file.
484         * tst-mutexpi3.c: New file.
485         * tst-mutexpi4.c: New file.
486         * tst-mutexpi5.c: New file.
487         * tst-mutexpi6.c: New file.
488         * tst-mutexpi7.c: New file.
489         * tst-mutexpi7a.c: New file.
490         * tst-mutexpi8.c: New file.
491         * tst-mutexpi9.c: New file.
492         * tst-robust1.c: New file.
493         * tst-robust2.c: New file.
494         * tst-robust3.c: New file.
495         * tst-robust4.c: New file.
496         * tst-robust5.c: New file.
497         * tst-robust6.c: New file.
498         * tst-robust7.c: New file.
499         * tst-robust8.c: New file.
500         * Makefile (tests): Add the new tests.
501
502         * pthread_create.c (start_thread): Add some casts to avoid warnings.
503         * pthread_mutex_destroy.c: Remove unneeded label.
504
505 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
506
507         * pthread_mutex_init.c (__pthread_mutex_init): Move some
508         computations to compile time.
509
510 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
511
512         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
513
514 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
515
516         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
517
518 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
519
520         * pthread_key_create.c (__pthread_key_create): Do away with
521         __pthread_keys_lock.
522
523         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
524         (__kernel_cpumask_size): Mark as hidden.
525         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
526
527         * sem_open.c (__sem_mappings_lock): Mark as hidden.
528         * semaphoreP.h (__sem_mappings_lock): Likewise.
529
530 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
531
532         * pthread_atfork.c: Mark __dso_handle as hidden.
533
534 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
535
536         [BZ #2644]
537         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
538         the reload problem.  Change the one path in pthread_cancel_init
539         which causes the problem.  Force gcc to reload.  Simplify callers.
540         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
541         (_Unwind_GetBSP): Undo last patch.
542
543 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
544
545         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
546         function pointer is reloaded after pthread_cancel_init calls.
547
548         [BZ #2644]
549         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
550         pointers are reloaded after pthread_cancel_init calls.
551
552 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
553
554         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
555         __always_inline.
556
557 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
558
559         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
560         Allocate new object which is passed to timer_sigev_thread so that
561         the timer can be deleted before the new thread is scheduled.
562
563 2006-04-26  Roland McGrath  <roland@redhat.com>
564
565         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
566
567 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
568
569         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
570         suffix for conditional jumps.
571         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
572         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
573         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
574         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
575         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
576         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
577
578         * init.c (sigcancel_handler): Compare with correct PID even if the
579         thread is in the middle of a fork call.
580         (sighandler_setxid): Likewise.
581         Reported by Suzuki K P <suzuki@in.ibm.com> .
582
583 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
584
585         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
586
587 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
588
589         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
590         fails [Coverity CID 105].
591
592 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
593
594         * sysdeps/pthread/pthread.h: Add nonnull attributes.
595
596 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
597
598         [BZ #2505]
599         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
600         Define __lll_rel_instr using lwsync.
601
602 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
603
604         * allocatestack.c (allocate_stack): Always initialize robust_head.
605         * descr.h: Define struct robust_list_head.
606         (struct pthread): Use robust_list_head in robust mutex list definition.
607         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
608         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
609         (__pthread_initialize_minimal_internal): Register robust_list with
610         the kernel.
611         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
612         Declare __set_robust_list_avail.
613         * pthread_create.c (start_thread): Register robust_list of new thread.
614         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
615         waiters.
616         * pthread_mutex_destroy.c: For robust mutexes don't look at the
617         number of users, it's unreliable.
618         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
619         set_robust_list syscall is available.
620         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
621         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
622         Set robust_head.list_op_pending before trying to lock a robust mutex.
623         * pthread_mutex_timedlock.c: Likewise.
624         * pthread_mutex_trylock.c: Likewise.
625         * pthread_mutex_unlock.c: Likewise for unlocking.
626         * Makefile (tests): Add tst-robust8.
627         * tst-robust8.c: New file.
628
629 2006-03-08  Andreas Schwab  <schwab@suse.de>
630
631         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
632         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
633
634 2006-03-05  Roland McGrath  <roland@redhat.com>
635
636         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
637         and $config_os doesn't match *linux*.
638
639 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
640
641         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
642         Use __syscall_error.
643         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
644         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
645         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
646         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
647         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
648         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
649
650 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
651
652         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
653
654 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
655
656         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
657         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
658         mutex.
659         (__lll_robust_timedlock_wait): Likewise.
660         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
661         (__lll_robust_lock_wait): Likewise.
662         (__lll_robust_timedlock_wait): Likewise.
663         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
664         (__lll_robust_lock_wait): Likewise.
665         (__lll_robust_timedlock_wait): Likewise.
666
667 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
668
669         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
670         lll_robust_mutex_trylock, lll_robust_mutex_lock,
671         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
672         lll_robust_mutex_unlock): Define.
673         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
674
675 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
676
677         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
678         instead of <clone.S>.
679
680 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
681
682         * Makefile (libpthread-routines): Add
683         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
684         and pthread_mutex_[sg]etprioceiling.
685         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
686         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
687         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
688         pthread_mutex_setprioceiling.
689         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
690         PTHREAD_PRIO_PROTECT): New enum values.
691         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
692         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
693         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
694         prototypes.
695         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
696         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
697         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
698         Define.
699         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
700         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
701         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
702         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
703         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
704         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
705         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
706         protocol mutexes.
707         * pthread_mutex_getprioceiling.c: New file.
708         * pthread_mutex_setprioceiling.c: New file.
709         * pthread_mutexattr_getprioceiling.c: New file.
710         * pthread_mutexattr_setprioceiling.c: New file.
711         * pthread_mutexattr_getprotocol.c: New file.
712         * pthread_mutexattr_setprotocol.c: New file.
713
714 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
715
716         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
717
718 2006-02-27  Roland McGrath  <roland@redhat.com>
719
720         * sysdeps/pthread/Subdirs: List nptl here too.
721         * configure (libc_add_on_canonical): New variable.
722
723         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
724
725         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
726         self to get main source tree's file.
727         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
728         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
729         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
730         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
731         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
732         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
733         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
734         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
735         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
736         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
737         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
738         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
739         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
740
741         * Makefile: Use $(sysdirs) in vpath directive.
742
743         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
744         (CPPFLAGS-timer_routines.c): Likewise.
745
746         * Makeconfig (includes): Variable removed.
747
748 2006-02-26  Roland McGrath  <roland@redhat.com>
749
750         * sysdeps/generic/pt-raise.c: Moved to ...
751         * pt-raise.c: ... here.
752         * sysdeps/generic/lowlevellock.h: Moved to ...
753         * lowlevellock.h: ... here.
754
755 2006-02-23  Roland McGrath  <roland@redhat.com>
756
757         * descr.h (struct pthread): Add final member `end_padding'.
758         (PTHREAD_STRUCT_END_PADDING): Use it.
759
760 2006-02-20  Roland McGrath  <roland@redhat.com>
761
762         * sysdeps/mips: Directory removed, saved in ports repository.
763         * sysdeps/unix/sysv/linux/mips: Likewise.
764
765 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
766
767         * tst-robust1.c: Add second mutex to check that the mutex list is
768         handled correctly.
769
770 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
771
772         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
773         lll_robust_mutex_trylock, lll_robust_mutex_lock,
774         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
775         lll_robust_mutex_unlock): New macros.
776         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
777         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
778         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
779         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
780         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
781
782 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
783
784         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
785         definitions.
786         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
787
788 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
789
790         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
791         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
792         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
793         (lll_robust_mutex_unlock): Likewise.
794
795 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
796
797         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
798         Set robust_list.__next rather than robust_list.
799         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
800         (__pthread_list_t): New typedef.
801         (pthread_mutex_t): Replace __next and __prev fields with __list.
802         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
803         (__pthread_list_t): New typedef.
804         (pthread_mutex_t): Replace __next and __prev fields with __list.
805         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
806         (__pthread_list_t, __pthread_slist_t): New typedefs.
807         (pthread_mutex_t): Replace __next and __prev fields with __list.
808         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
809         (__pthread_list_t, __pthread_slist_t): New typedefs.
810         (pthread_mutex_t): Replace __next and __prev fields with __list.
811         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
812         (__pthread_list_t, __pthread_slist_t): New typedefs.
813         (pthread_mutex_t): Replace __next and __prev fields with __list.
814         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
815         (__pthread_slist_t): New typedef.
816         (pthread_mutex_t): Replace __next field with __list.
817
818 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
819
820         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
821         PTHREAD_MUTEX_OWNERDEAD.
822         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
823         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
824         * Makefile (libpthread-routines): Add lowlevelrobustlock.
825         * pthread_create.c (start_thread): Very much simplify robust_list loop.
826         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
827         to PTHREAD_MUTEX_INCONSISTENT.
828         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
829         * pthread_mutex_lock.c: Reimplement robust mutex handling.
830         * pthread_mutex_trylock.c: Likewise.
831         * pthread_mutex_timedlock.c: Likewise.
832         * pthread_mutex_unlock.c: Likewise.
833         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
834         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
835         lowlevelrobustlock.sym.
836         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
837         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
838         definitions.
839         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
840         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
841         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
842         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
843         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
844
845 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
846
847         * allocatestack.c (allocate_stack): Initialize robust_list.
848         * init.c (__pthread_initialize_minimal_internal): Likewise.
849         * descr.h (struct xid_command): Pretty printing.
850         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
851         robust_list.  Adjust macros.
852         * pthread_create.c (start_thread): Adjust robust_list handling.
853         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
854         but the owner for all robust mutex types.
855         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
856         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
857         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
858         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
859
860         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
861         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
862
863 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
864
865         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
866         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
867
868 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
869
870         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
871         Return status.
872         (lll_futex_timed_wait): Define.
873
874 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
875
876         * tst-cancel4.c: Test ppoll.
877
878 2006-01-18  Andreas Jaeger  <aj@suse.de>
879
880         [BZ #2167]
881         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
882         (pthread_mutex_t): Follow changes for other archs.  Based on patch
883         by Jim Gifford <patches@jg555.com>.
884
885 2006-01-13  Richard Henderson  <rth@redhat.com>
886
887         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
888
889 2006-01-10  Roland McGrath  <roland@redhat.com>
890
891         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
892         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
893         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
894         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
895         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
896         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
897         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
898         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
899         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
900         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
901
902 2006-01-09  Roland McGrath  <roland@redhat.com>
903
904         * tst-initializers1-c89.c: New file.
905         * tst-initializers1-c99.c: New file.
906         * tst-initializers1-gnu89.c: New file.
907         * tst-initializers1-gnu99.c: New file.
908         * Makefile (tests): Add them.
909         (CFLAGS-tst-initializers1-c89.c): New variable.
910         (CFLAGS-tst-initializers1-c99.c): New variable.
911         (CFLAGS-tst-initializers1-gnu89.c): New variable.
912         (CFLAGS-tst-initializers1-gnu99.c): New variable.
913
914         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
915         Use __extension__ on anonymous union definition.
916         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
917         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
918         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
919         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
920         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
921
922 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
923
924         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
925         Don't give the union a name because it changes the mangled name.
926         Instead name the struct for __data.
927         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
928         Likewise.
929         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
930         Likewise.
931
932 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
933
934         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
935         stack bias to mc_ftp field.
936
937 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
938
939         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
940         being too clever and reloading the futex value where it shouldn't.
941
942 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
943
944         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
945         correct type.
946
947 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
948
949         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
950         Add cfi directives.
951
952 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
953
954         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
955         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
956         rename in tcbhead_t.
957
958         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
959         Don't give the union a name because it changes the mangled name.
960         Instead name the struct for __data.
961         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
962         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
963         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
964         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
965         * pthread_create.c (start_thread): Adjust robust mutex free loop.
966         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
967
968 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
969
970         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
971         Return status.
972         (lll_futex_timed_wait): Define.
973         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
974         * sysdeps/pthread/aio_misc.h: New file.
975
976 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
977
978         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
979
980 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
981
982         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
983         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
985
986 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
987
988         * tst-cancel24.cc: Use C headers instead of C++ headers.
989
990 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
991
992         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
993         sparc-linux configured glibc.
994         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
995         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
996         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
997         atomic_compare_and_exchange_val_24_acq instead of
998         atomic_compare_and_exchange_val_acq.
999         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
1000         instead of atomic_exchange_rel.
1001         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
1002         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
1003         file.
1004         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
1005         file.
1006         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
1007         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
1008         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
1009         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
1010         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
1011         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1012         New file.
1013         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1014         New file.
1015         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
1016         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
1017         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
1018         file.
1019         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
1020         file.
1021         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
1022
1023 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
1024
1025         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
1026         mutex initializers.
1027
1028 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
1029
1030         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
1031         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1032         THREAD_COPY_POINTER_GUARD): Define.
1033         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
1034         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
1035
1036 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
1037
1038         * version.c: Update copyright year.
1039
1040 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1041
1042         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
1043         .eh_frame section, use cfi_* directives.
1044         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
1045
1046 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
1047
1048         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
1049         now.
1050
1051 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
1052
1053         * sysdeps/pthread/sigaction.c: Removed.
1054         * sigaction.c: New file.
1055         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1056
1057 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
1058
1059         * Makefile (tests): Add tst-signal7.
1060         * tst-signal7.c: New file.
1061
1062 2005-12-27  Roland McGrath  <roland@redhat.com>
1063
1064         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1065         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1066         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1067         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1068         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1069         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1070         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1071         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1072         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1073         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1074         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1075
1076 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
1077
1078         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1079         and __prev field to pthread_mutex_t.
1080         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1081         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1082         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1083         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1084         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1085         to pthread_mutex_t.
1086
1087 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
1088
1089         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1090         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1091         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1092         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1093         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1094         and PTHREAD_MUTEXATTR_FLAG_BITS.
1095         * descr.h (struct pthread): Add robust_list field and define
1096         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1097         * pthread_mutexattr_getrobust.c: New file.
1098         * pthread_mutexattr_setrobust.c: New file.
1099         * pthread_mutex_consistent.c: New file.
1100         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1101         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1102         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1103         Adjust pthread_mutex_t initializers.
1104         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1105         field to pthread_mutex_t.
1106         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1107         and __prev field to pthread_mutex_t.
1108         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1109         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1110         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1111         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1112         * pthread_mutexattr_gettype.c: Likewise.
1113         * pthread_mutexattr_setpshared.c: Likewise.
1114         * pthread_mutexattr_settype.c: Likewise.
1115         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1116         Initialize mutex kind according to robust flag.
1117         * pthread_mutex_lock.c: Implement local robust mutex.
1118         * pthread_mutex_timedlock.c: Likewise.
1119         * pthread_mutex_trylock.c: Likewise.
1120         * pthread_mutex_unlock.c: Likewise.
1121         * pthread_create.c (start_thread): Mark robust mutexes which remained
1122         locked as dead.
1123         * tst-robust1.c: New file.
1124         * tst-robust2.c: New file.
1125         * tst-robust3.c: New file.
1126         * tst-robust4.c: New file.
1127         * tst-robust5.c: New file.
1128         * tst-robust6.c: New file.
1129         * tst-robust7.c: New file.
1130         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1131         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1132         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1133         tst-robust5, tst-robust6, and tst-robust7.
1134
1135         * tst-typesizes.c: New file.
1136         * Makefile (tests): Add tst-typesizes.
1137
1138         * tst-once3.c: More debug output.
1139
1140 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
1141
1142         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1143         missing after last change.
1144
1145         * version.c: Update copyright year.
1146
1147 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
1148
1149         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1150         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1151         * pthread_mutex_trylock.c: Likewise.
1152         * pthread_mutex_timedlock.c: Likewise.
1153         * pthread_mutex_unlock.c: Likewise.
1154
1155 2005-12-22  Roland McGrath  <roland@redhat.com>
1156
1157         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1158         so that #include_next's search location is not reset to the -I..
1159         directory where <nptl/...> can be found.
1160
1161 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
1162
1163         [BZ #1913]
1164         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1165         Fix unwind info.  Remove useless branch prediction prefix.
1166         * tst-cancel24.cc: New file.
1167         * Makefile: Add rules to build and run tst-cancel24.
1168
1169 2005-12-21  Roland McGrath  <roland@redhat.com>
1170
1171         * libc-cancellation.c: Use <> rather than "" #includes.
1172         * pt-cleanup.c: Likewise.
1173         * pthread_create.c: Likewise.
1174         * pthread_join.c: Likewise.
1175         * pthread_timedjoin.c: Likewise.
1176         * pthread_tryjoin.c: Likewise.
1177         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1178         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1179         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1180         * unwind.c: Likewise.
1181
1182 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1183
1184         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1185         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1186         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1187         THREAD_COPY_POINTER_GUARD): Define.
1188
1189 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
1190
1191         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1192         rather than one.
1193         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1194         THREAD_COPY_POINTER_GUARD): Define.
1195         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1196         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1197         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1198         THREAD_COPY_POINTER_GUARD): Define.
1199         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1200         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1201         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1202         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1203         Use PTR_DEMANGLE for B0 if defined.
1204
1205 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
1206
1207         * pthread_create.c (__pthread_create_2_1): Use
1208         THREAD_COPY_POINTER_GUARD if available.
1209         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1210         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1211         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1212         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1213         * sysdeps/x86_64/tls.h: Likewise.
1214
1215 2005-12-15  Roland McGrath  <roland@redhat.com>
1216
1217         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1218
1219 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1220
1221         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1222         sysdeps/generic.
1223         * errno-loc.c: New file.
1224
1225 2005-12-12  Roland McGrath  <roland@redhat.com>
1226
1227         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1228         adjustments before choosing stack size.  Update minimum stack size
1229         calculation to match allocate_stack change.
1230
1231 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1232
1233         * allocatestack.c (allocate_stack): Don't demand that there is an
1234         additional full page available on the stack beside guard, TLS, the
1235         minimum stack.
1236
1237 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1238
1239         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1240         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1241
1242         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1243         compiling 32-bit code we must define __cleanup_fct_attribute.
1244
1245 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1246
1247         [BZ #1920]
1248         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1249         __attribute__ instead of __attribute.
1250         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1251         (__cleanup_fct_attribute): Likewise.
1252
1253 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1254
1255         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1256         a write barrier before writing libgcc_s_getcfa.
1257
1258 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1259
1260         * sysdeps/unix/sysv/linux/configure: Removed.
1261
1262 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1263
1264         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1265         optional init_array/fini_array support.
1266
1267 2005-10-24  Roland McGrath  <roland@redhat.com>
1268
1269         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1270         versioned_symbol use.
1271
1272 2005-10-16  Roland McGrath  <roland@redhat.com>
1273
1274         * init.c (__pthread_initialize_minimal_internal): Even when using a
1275         compile-time default stack size, apply the minimum that allocate_stack
1276         will require, and round up to page size.
1277
1278 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1279
1280         * Makefile ($(test-modules)): Remove static pattern rule.
1281
1282 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1283             Ulrich Drepper  <drepper@redhat.com>
1284
1285         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1286         alignment in callback function.
1287         * Makefile: Add rules to build and run tst-align3.
1288         * tst-align3.c: New file.
1289
1290 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1291
1292         * allocatestack.c (setxid_signal_thread): Add
1293         INTERNAL_SYSCALL_DECL (err).
1294
1295 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1296
1297         * allocatestack.c (setxid_signal_thread): Need to use
1298         atomic_compare_and_exchange_bool_acq.
1299
1300 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1301             Jakub Jelinek  <jakub@redhat.com>
1302
1303         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1304         CANCEL_RESTMASK.
1305         (struct pthread): Move specific_used field to avoid padding.
1306         Add setxid_futex field.
1307         * init.c (sighandler_setxid): Reset setxid flag and release the
1308         setxid futex.
1309         * allocatestack.c (setxid_signal_thread): New function.  Broken
1310         out of the bodies of the two loops in __nptl_setxid.  For undetached
1311         threads check whether they are exiting and if yes, don't send a signal.
1312         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1313         * pthread_create.c (start_thread): For undetached threads, check
1314         whether setxid bit is set.  If yes, wait until signal has been
1315         processed.
1316
1317         * allocatestack.c (STACK_VARIABLES): Initialize them.
1318         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1319
1320 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1321
1322         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1323         waiters, awake all waiters on the associated mutex.
1324
1325 2005-09-22  Roland McGrath  <roland@redhat.com>
1326
1327         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1328         ../sysdeps/x86_64/hp-timing.h).
1329
1330 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1331
1332         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1333         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1334         (lll_futex_wake_unlock): Define.
1335         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1336         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1337         (lll_futex_wake_unlock): Define.
1338         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1339         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1340         (lll_futex_wake_unlock): Define.
1341         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1342         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1343         (lll_futex_wake_unlock): Define.
1344         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1345         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1346         (lll_futex_wake_unlock): Define.
1347         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1348         lll_futex_wake_unlock.
1349         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1350         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1351         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1353         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1354         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1355
1356 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1357
1358         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1359         Fix typo in register name.
1360
1361 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1362
1363         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1364         Use __sigfillset.  Document that sigfillset does the right thing wrt
1365         to SIGSETXID.
1366
1367 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1368
1369         [BZ #1102]
1370         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1371         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1372         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1373         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1374         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1375         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1376         in the structure.
1377         * Makefile (tests): Add tst-initializers1.
1378         (CFLAGS-tst-initializers1.c): Set.
1379         * tst-initializers1.c: New test.
1380
1381 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1382
1383         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1384         Make sure __flags are located at offset 48 from the start of the
1385         structure.
1386
1387 2005-07-02  Roland McGrath  <roland@redhat.com>
1388
1389         * Makeconfig: Comment fix.
1390
1391 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1392
1393         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1394         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1395         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1396         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1397         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1398         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1399         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1400         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1401         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1402         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1403
1404 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1405
1406         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1407         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1408         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1409         fields.
1410         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1411         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1412         field.  Put in sysinfo field unconditionally.
1413         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1414         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1415         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1416         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1417         fields.
1418         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1419         * pthread_create.c (__pthread_create_2_1): Use
1420         THREAD_COPY_STACK_GUARD macro.
1421         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1422         tests.
1423         * tst-stackguard1.c: New file.
1424         * tst-stackguard1-static.c: New file.
1425
1426 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1427
1428         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1429         Invoke CGOTSETUP and CGOTRESTORE.
1430         (CGOTSETUP, CGOTRESTORE): Define.
1431
1432 2005-05-29  Richard Henderson  <rth@redhat.com>
1433
1434         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1435         (tf_write, tf_writev): Use it.
1436         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1437         the system minimum.
1438
1439 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1440
1441         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1442         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1443         __librt_*_asynccancel@local.
1444
1445 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1446
1447         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1448         all occurrences of JUMPTARGET.  Instead append @local to labels.
1449
1450 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1451
1452         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1453         size/alignment of struct pthread rather than tcbhead_t.
1454         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1455         Likewise.
1456         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1457         Likewise.
1458         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1459         Likewise.
1460
1461 2005-05-19  Richard Henderson  <rth@redhat.com>
1462
1463         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1464         __sync_val_compare_and_swap, not explicit _si variant.
1465         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1466
1467 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1468
1469         [BZ #915]
1470         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1471
1472 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1473
1474         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1475         .eh_frame section, use cfi_* directives.
1476
1477 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1478
1479         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1480         of "" includes.
1481
1482 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1483
1484         [BZ #1075]
1485         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1486         aio_write blocks.
1487
1488 2005-04-27  Roland McGrath  <roland@redhat.com>
1489
1490         * Makefile (tests): Remove tst-clock2.
1491
1492         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1493         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1494         translating to the kernel clockid_t for our own process/thread clock.
1495
1496         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1497
1498 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1499
1500         * old_pthread_cond_init.c: Include <errno.h>.
1501         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1502         process shared or uses clock other than CLOCK_REALTIME.
1503         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1504
1505 2005-04-13  David S. Miller  <davem@davemloft.net>
1506
1507         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1508         * sysdeps/sparc/sparc64/clone.S: New file.
1509
1510 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1511
1512         [BZ #1102]
1513         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1514         __inline instead of inline.
1515         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1516
1517 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1518
1519         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1520         functionally equivalent, but shorter instructions.
1521         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1522         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1523         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1524         Likewise.
1525         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1526         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1527         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1528         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1529         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1530         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1531         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1532         Likewise.
1533         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1534         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1535         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1536         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1537         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1538
1539 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1540
1541         * sysdeps/mips/Makefile: New file.
1542         * sysdeps/mips/nptl-sysdep.S: New file.
1543         * sysdeps/mips/tcb-offsets.sym: New file.
1544         * sysdeps/mips/pthread_spin_lock.S: New file.
1545         * sysdeps/mips/pthread_spin_trylock.S: New file.
1546         * sysdeps/mips/pthreaddef.h: New file.
1547         * sysdeps/mips/tls.h: New file.
1548         * sysdeps/mips/jmpbuf-unwind.h: New file.
1549         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1550         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1551         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1552         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1553         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1554         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1555         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1556         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1557         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1558         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1559
1560 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1561
1562         [BZ #1112]
1563         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1564         variable to scerr.
1565
1566 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1567
1568         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1569
1570 2005-02-25  Roland McGrath  <roland@redhat.com>
1571
1572         * alloca_cutoff.c: Correct license text.
1573         * tst-unload.c: Likewise.
1574         * sysdeps/pthread/allocalim.h: Likewise.
1575         * sysdeps/pthread/pt-initfini.c: Likewise.
1576         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1577         * sysdeps/pthread/bits/sigthread.h: Likewise.
1578         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1579         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1580
1581 2005-02-16  Roland McGrath  <roland@redhat.com>
1582
1583         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1584         Use unsigned int * for ptr_nthreads.
1585
1586 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1587
1588         [BZ #721]
1589         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1590         gcc4.
1591
1592 2005-02-07  Richard Henderson  <rth@redhat.com>
1593
1594         [BZ #787]
1595         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1596         argument.
1597
1598 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1599
1600         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1601         order of arguments in invocation of atomic_add_zero.
1602
1603 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1604
1605         [BZ #737]
1606         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1607         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1608         at least gotntpoff relocation and addition.
1609         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1610         Likewise.
1611         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1612         Likewise.
1613         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1614         Likewise.
1615
1616 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1617
1618         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1619         entry for static tls deallocation fix.
1620         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1621         also contains information whether the memory pointed to is static
1622         TLS or not.
1623         * sysdeps/i386/tls.h: Likewise.
1624         * sysdeps/ia64/tls.h: Likewise.
1625         * sysdeps/powerpc/tls.h: Likewise.
1626         * sysdeps/s390/tls.h: Likewise.
1627         * sysdeps/sh/tls.h: Likewise.
1628         * sysdeps/sparc/tls.h: Likewise.
1629         * sysdeps/x86_64/tls.h: Likewise.
1630
1631 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1632
1633         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1634
1635 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1636
1637         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1638         %esp.
1639         * Makefile (tests): Add tst-align2.
1640         * tst-align2.c: New test.
1641         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1642         -mpreferred-stack-boundary=4.
1643
1644 2004-12-18  Roland McGrath  <roland@redhat.com>
1645
1646         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1647         New file removed withdrawn for the moment.
1648
1649 2004-12-17  Richard Henderson  <rth@redhat.com>
1650
1651         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1652         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1653
1654 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1655
1656         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1657         Increased PTHREAD_STACK_MIN.
1658
1659         * tst-context1.c (stacks): Use bigger stack size.
1660
1661 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1662
1663         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1664         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1665
1666 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1667
1668         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1669         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1670         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1671
1672 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1673
1674         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1675
1676 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1677
1678         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1679         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1680
1681         * tst-getpid1.c: If child crashes, report this first.  Print which
1682         signal.
1683
1684 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1685
1686         * init.c (__pthread_initialize_minimal_internal): Also unblock
1687         SIGSETXID.
1688
1689 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1690
1691         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1692         _POSIX_THREAD_CPUTIME): Define to 0.
1693         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1694         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1695         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1696         __timer_signal_thread_tclk): Remove.
1697         (init_module): Remove their initialization.
1698         (thread_cleanup): Remove their cleanup assertions.
1699         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1700         __timer_signal_thread_tclk): Remove.
1701         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1702         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1703         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1704
1705 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1706
1707         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1708         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1709
1710         * Makefile (tests): Add tst-getpid2.
1711         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1712         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1713         * tst-getpid2.c: New test.
1714
1715 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1716
1717         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1718
1719 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1720
1721         * Makefile (tests): Add tst-getpid1.
1722         * tst-getpid1.c: New file.
1723         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1724         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1725
1726 2004-12-02  Roland McGrath  <roland@redhat.com>
1727
1728         * Makefile (libpthread-nonshared): Variable removed.
1729         ($(objpfx)libpthread_nonshared.a): Target removed.
1730         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1731         These are now handled by generic magic from
1732         libpthread-static-only-routines being set.
1733
1734 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1735
1736         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1737         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1738         _POSIX_THREAD_PRIO_PROTECT): Define.
1739         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1740         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1741         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1742
1743 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1744
1745         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1746         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1747         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1748         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1749         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1750         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1751         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1752
1753 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1754
1755         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1756
1757         * Makefile (libpthread-routines): Add pthread_setschedprio.
1758         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1759         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1760         * pthread_setschedprio.c: New file.
1761
1762 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1763
1764         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1765         * pthread_cancel.c (pthread_create): Likewise.
1766
1767         * Makefile (libpthread-routines): Add vars.
1768         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1769         * init.c (__default_stacksize, __is_smp): Remove.
1770         * vars.c: New file.
1771         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1772         and define a wrapper macro.
1773         (PTHREAD_STATIC_FN_REQUIRE): Define.
1774         * allocatestack.c (__find_thread_by_id): Undefine.
1775         * pthread_create (__pthread_keys): Remove.
1776         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1777         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1778         PTHREAD_STATIC_FN_REQUIRE.
1779
1780 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1781
1782         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1783         parameter to REGISTER macro.
1784
1785 2004-11-17  Roland McGrath  <roland@redhat.com>
1786
1787         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1788         Make sure SIGCANCEL is blocked as well.
1789
1790 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1791
1792         * sysdeps/pthread/setxid.h: New file.
1793         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1794         (struct xid_command): Add forward decl.
1795         (struct pthread_functions): Change return type of __nptl_setxid hook
1796         to int.
1797         * pthreadP.h (__nptl_setxid): Change return type to int.
1798         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1799         calling thread, return its return value and set errno on failure.
1800         * descr.h (struct xid_command): Change id type to long array.
1801
1802         * Makefile: Add rules to build and test tst-setuid1 and
1803         tst-setuid1-static.
1804         * tst-setuid1.c: New test.
1805         * tst-setuid1-static.c: New test.
1806
1807 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1808
1809         * Makefile (tests): Add tst-exit3.
1810         * tst-exit3.c: New test.
1811
1812 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1813
1814         * Makefile (tests): Add tst-exit2.
1815         * tst-exit2.c: New file.
1816
1817 2004-11-09  Roland McGrath  <roland@redhat.com>
1818
1819         [BZ #530]
1820         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1821         here, before calling clone.
1822         * pthread_create.c (start_thread): Don't do it here.
1823
1824 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1825
1826         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1827
1828 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1829
1830         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1831         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1832         assembler warning.
1833
1834 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1835
1836         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1837         if sched_priority is not between minprio and maxprio.
1838
1839 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1840
1841         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1842         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1843
1844         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1845         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1846
1847 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1848
1849         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1850         not-cancelable I/O functions.
1851
1852 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1853
1854         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1855         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1856         make sure 2 is stored in the futex and we looked at the old value.
1857         Fix a few other problems to return the correct value.
1858
1859 2004-10-14  Richard Henderson  <rth@redhat.com>
1860
1861         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1862         make gcc4 happy.
1863
1864 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1865
1866         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1867         of pthread-functions.h and pthreaddef.h.
1868         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1869
1870         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1871         Change __data.__nwaiters from int to unsigned int.
1872
1873         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1874         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1875
1876         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1877         before return type.
1878
1879         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1880         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1881
1882 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1883
1884         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1885         test fails, remove message queue.
1886         (tf_msgsnd): Likewise.
1887
1888 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1889
1890         * tst-clock1.c: Change #ifdef to #if defined.
1891         * tst-clock2.c: Likewise.
1892         * tst-cond11.c: Likewise.
1893
1894         * sysdeps/pthread/timer_create.c (timer_create): Use
1895         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1896         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1897         THREAD_CPUTIME.
1898
1899 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1900
1901         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1902         _POSIX_THREAD_CPUTIME): Define to 0.
1903
1904 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1905
1906         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1907         and _POSIX_THREAD_CPUTIME to zero.
1908         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1909         * tst-barrier2.c: Fix testing for POSIX feature.
1910         * tst-clock1.c: Likewise.
1911         * tst-clock2.c: Likewise.
1912         * tst-cond11.c: Likewise.
1913         * tst-cond4.c: Likewise.
1914         * tst-cond6.c: Likewise.
1915         * tst-flock2.c: Likewise.
1916         * tst-mutex4.c: Likewise.
1917         * tst-mutex9.c: Likewise.
1918         * tst-rwlock12.c: Likewise.
1919         * tst-rwlock4.c: Likewise.
1920         * tst-signal1.c: Likewise.
1921         * tst-spin2.c: Likewise.
1922         * sysdeps/pthread/posix-timer.h: Likewise.
1923         * sysdeps/pthread/timer_create.c: Likewise.
1924         * sysdeps/pthread/timer_routines.c: Likewise.
1925
1926 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1927
1928         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1929         (__lll_mutex_timedlock_wait): Address futex correctly.
1930
1931         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1932         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1933         make sure 2 is stored in the futex and we looked at the old value.
1934         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1935         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1936         which might very well made the code not working at all before.
1937         [BZ #417]
1938
1939 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1940
1941         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1942         allow SIGSETXID to be sent.
1943         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1944         for SIGSETXID to be defined.
1945         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1946         SIGSETXID cannot be blocked.
1947
1948         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1949         Add __extension__ to long long types.
1950         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1951         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1952         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1953         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1954         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1955         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1956         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1957
1958 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1959
1960         * descr.h (struct pthread): Add stopped_start field.
1961         * sysdeps/pthread/createthread.c (create_thread): Set
1962         start_stopped flag in descriptor for new thread appropriately.
1963         * pthread_create.c (start_thread): Only take lock to be stopped on
1964         startup if stopped_start flag says so.
1965
1966 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1967
1968         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1969         is created detached and if yes, do not try to free the stack in case
1970         the thread creation failed.
1971         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1972         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1973         case there has been no error.  [BZ #405]
1974
1975         * pthread_create.c (start_thread): Don't wait for scheduler data
1976         etc to be set at the beginning of the function.  The cancellation
1977         infrastructure must have been set up.  And enable async
1978         cancellation before potentially going to sleep.  [BZ #401]
1979
1980 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1981
1982         * Versions: Remove exports for pthread_set*id_np functions.
1983         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1984         for now.
1985         * Makefile: Don't build pthread_set*id code for now.
1986
1987 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1988
1989         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1990         internal use.
1991         * allocatestack.c (__nptl_setxid): New function.
1992         * descr.h (struct xid_command): Define type.
1993         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1994         (sighandler_setxid): New function.
1995         (__pthread_initialize_minimal): Register sighandler_setxid for
1996         SIGCANCEL.
1997         * pt-allocrtsig.c: Update comment.
1998         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1999         Declare __nptl_setxid.
2000         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
2001         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
2002         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2003         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2004         and pthread_setresuid_np.
2005         * pthread_setgid_np.c: New file.
2006         * pthread_setuid_np.c: New file.
2007         * pthread_setegid_np.c: New file.
2008         * pthread_seteuid_np.c: New file.
2009         * pthread_setregid_np.c: New file.
2010         * pthread_setreuid_np.c: New file.
2011         * pthread_setresgid_np.c: New file.
2012         * pthread_setresuid_np.c: New file.
2013         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
2014         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2015         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2016         and pthread_setresuid_np.
2017         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
2018         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
2019         pthread_setregid, and pthread_setresgid.
2020
2021 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
2022
2023         * allocatestack.c (allocate_stack): Return EAGAIN instead of
2024         ENOMEM when out of memory.
2025
2026 2004-09-10  Roland McGrath  <roland@redhat.com>
2027
2028         [BZ #379]
2029         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
2030         code, since we don't try to use the broken CLONE_STOPPED any more.
2031         * pthread_create.c (start_thread): Likewise.
2032
2033 2004-09-15  Richard Henderson  <rth@redhat.com>
2034
2035         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
2036
2037 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
2038
2039         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
2040         (__libc_unwind_longjmp): Delete macro and declare as function.
2041         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
2042         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
2043         nptl directory.
2044         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
2045         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
2046         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
2047
2048 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
2049
2050         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
2051         for __USE_XOPEN2K.
2052         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
2053         types also for __USE_XOPEN2K.
2054         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2055         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2056         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2057         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2058         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2059         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2060         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2061         [BZ #320]
2062
2063 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
2064
2065         * sysdeps/pthread/pthread.h
2066         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2067         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2068         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2069         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2070         [BZ #375]
2071
2072 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
2073
2074         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2075         PSEUDO to be used with . prefix.
2076
2077         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2078         Use atomic_increment instead of atomic_exchange_and_add.
2079         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2080         Likewise.
2081         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2082         Likewise.
2083         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2084         Likewise.
2085
2086         * allocatestack.c (allocate_stack): Use atomic_increment_val
2087         instead of atomic_exchange_and_add.
2088         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2089         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2090         Likewise.
2091         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2092         Likewise.
2093
2094         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2095         the initialization function might throw.
2096
2097 2005-09-05  Richard Henderson  <rth@redhat.com>
2098
2099         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2100         Move definition inside libpthread, libc, librt check.  Provide
2101         definition for rtld.
2102
2103 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
2104
2105         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2106         * sysdeps/i386/jmpbuf-unwind.h: Likewise
2107         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2108         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2109         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2110         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2111         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2112         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2113         * unwind.c: Use it.
2114
2115         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2116         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2117         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2118         Likewise.
2119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2120         Decrement __nwaiters.  If pthread_cond_destroy has been called and
2121         this is the last waiter, signal pthread_cond_destroy caller and
2122         avoid using the pthread_cond_t structure after unlock.
2123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2125         Read clock type from the least significant bits of __nwaiters instead
2126         of __clock.
2127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2128         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2129
2130 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
2131
2132         [BZ #342]
2133         * Makefile (tests): Add tst-cond20 and tst-cond21.
2134         * tst-cond20.c: New test.
2135         * tst-cond21.c: New test.
2136         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2137         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2138         it unsigned int.
2139         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2140         Likewise.
2141         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2142         (pthread_cond_t): Likewise.
2143         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2144         Likewise.
2145         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2146         Likewise.
2147         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2148         Likewise.
2149         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2150         (cond_nwaiters): New.
2151         (clock_bits): New.
2152         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2153         if there are waiters not signalled yet.
2154         Wait until all already signalled waiters wake up.
2155         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2156         __nwaiters.  If pthread_cond_destroy has been called and this is the
2157         last waiter, signal pthread_cond_destroy caller and avoid using
2158         the pthread_cond_t structure after unlock.
2159         (__pthread_cond_wait): Increment __nwaiters in the beginning,
2160         decrement it when leaving.  If pthread_cond_destroy has been called
2161         and this is the last waiter, signal pthread_cond_destroy caller.
2162         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2163         Likewise.  Read clock type from the least significant bits of
2164         __nwaiters instead of __clock.
2165         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2166         whether clock ID can be encoded in COND_CLOCK_BITS bits.
2167         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2168         clock type just from the last COND_CLOCK_BITS bits of value.
2169         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2170         instead of __clock, just from second bit of condattr's value.
2171
2172 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
2173
2174         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2175         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
2176         != 64.
2177         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2178
2179 2004-08-15  Roland McGrath  <roland@frob.com>
2180
2181         * pthread_atfork.c: Update copyright terms including special exception
2182         for these trivial files, which are statically linked into executables
2183         that use dynamic linking for the significant library code.
2184
2185 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
2186
2187         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2188         pthread_rwlock_rdlock.
2189         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2190         Decrease __nr_readers_queued after reacquiring lock.
2191         * sysdeps/pthread/pthread_rwlock_timedrdlock
2192         (pthread_rwlock_timedrdlock): Likewise.
2193         Reported by Bob Cook <bobcook47@hotmail.com>.
2194
2195 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
2196
2197         * tst-rwlock14.c (tf): Read main thread handle from *ARG
2198         before pthread_barrier_wait.
2199
2200 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
2201
2202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2203         Remove unnecessary exception handling data.
2204
2205 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
2206
2207         [BZ #284]
2208         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2209         instead of clockid_t.
2210
2211 2004-07-21  Roland McGrath  <roland@redhat.com>
2212
2213         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2214
2215 2004-07-19  Roland McGrath  <roland@redhat.com>
2216
2217         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2218
2219 2004-07-02  Roland McGrath  <roland@redhat.com>
2220
2221         * configure: Don't exit.
2222
2223 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2224
2225         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2226         (__pthread_cond_timedwait): Check for invalid nanosecond in
2227         timeout value.
2228
2229 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2230
2231         * Makefile: Add rules to build and run tst-fini1.
2232         * tst-fini1.c: New file.
2233         * tst-fini1mod.c: New file.
2234
2235 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2236
2237         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2238         if no cancellation support is needed.
2239         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2240         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2241         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2242         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2243         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2244         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2245         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2246         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2247         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2248
2249         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2250         only if not already defined.
2251
2252 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2253
2254         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2255         constraint "m" instead of "0" for futex.
2256
2257         * shlib-versions: Add powerpc64-.*-linux.*.
2258
2259 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2260
2261         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2262         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2263         for valid tv_nsec.
2264         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2265         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2266         bits.
2267
2268 2004-06-29  Roland McGrath  <roland@redhat.com>
2269
2270         * Banner: NPTL no longer has its own version number.
2271         * Makefile (nptl-version): Variable removed.
2272         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2273         using $(version), the glibc version number.
2274
2275 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2276
2277         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2278         Fix branch offset for a PLT entry.
2279         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2280         Likewise.
2281         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2282         Likewise.
2283         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2284         Likewise.
2285         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2286         Likewise.
2287
2288 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2289
2290         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2291         unconditionally.
2292
2293 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2294
2295         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2296         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2297         instead of tv_sec.
2298         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2299         (pthread_rwlock_timedrdlock): Likewise.
2300
2301 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2302
2303         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2304         Set __r7 to val, not mutex.
2305
2306 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2307
2308         * Makefile: Add rules to build tst-rwlock14.
2309         * tst-rwlock14.c: New file.
2310
2311 2004-06-24  Boris Hu  <boris.hu@intel.com>
2312
2313         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2314         check.
2315         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2316
2317 2004-06-19  Andreas Jaeger  <aj@suse.de>
2318
2319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2320         assembler in last patch.
2321
2322 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2323
2324         * sysdeps/pthread/pthread_cond_timedwait.c
2325         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2326         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2327         (__pthread_cond_timedwait): Check for invalid nanosecond in
2328         timeout value.
2329         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2330         * tst-cond19.c: New file.
2331         * Makefile: Add rules to build and run tst-cond19.
2332
2333 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2334
2335         * tst-context1.c (GUARD_PATTERN): Defined.
2336         (tst_context_t): Define struct containing ucontext_t & guard words.
2337         (ctx): Declare as an array of tst_context_t.
2338         (fct): Verify uc_link & guard words are still valid.
2339         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2340
2341 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2342
2343         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2344         Add __data.__futex field, reshuffle __data.__clock.
2345         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2346         (__pthread_cond_signal): Increment __futex at the same time as
2347         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2348         address of low 32-bits of __wakeup_seq to futex syscall.
2349         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2350         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2351         releasing internal lock to FUTEX_WAIT.
2352         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2353         (__pthread_cond_timedwait): Likewise.
2354         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2355         (FUTEX_CMP_REQUEUE): Define.
2356         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2357         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2358         Pass __futex value from before the unlock and __futex address instead
2359         of address of low 32-bits of __wakeup_seq to futex syscall.
2360         Fallback to FUTEX_WAKE all on any errors.
2361
2362 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2363
2364         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2365         comment typo.
2366         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2367         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2368         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2369         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2370         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2371
2372 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2373
2374         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2375         Add memory clobber to inline assembly.
2376         (__lll_mutex_trylock): Likewise.
2377         (__lll_mutex_cond_trylock): Likewise.
2378
2379 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2380
2381         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2382         Pass val argument as 6th system call argument in %r7.
2383
2384 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2385
2386         * Makefile (tests): Add tst-cond16.
2387         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2388         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2389         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2390         Add __data.__futex field, reshuffle __data.__clock.
2391         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2392         (__pthread_cond_signal): Increment __futex at the same time as
2393         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2394         address of low 32-bits of __wakeup_seq to futex syscall.
2395         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2396         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2397         releasing internal lock to FUTEX_WAIT.
2398         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2399         (__pthread_cond_timedwait): Likewise.
2400         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2401         (FUTEX_CMP_REQUEUE): Define.
2402         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2403         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2404         Pass __futex value from before the unlock and __futex address instead
2405         of address of low 32-bits of __wakeup_seq to futex syscall.
2406         Fallback to FUTEX_WAKE all on any errors.
2407         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2408         Define.
2409         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2410         internally.  Return non-zero if error, zero if success.
2411         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2412         Add __data.__futex field, reshuffle __data.__clock.
2413         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2414         Define.
2415         (lll_futex_requeue): Add val argument, return 1 unconditionally
2416         for the time being.
2417         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2418         Add __data.__futex field, reshuffle __data.__clock.
2419         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2420         Define.
2421         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2422         internally.  Return non-zero if error, zero if success.
2423         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2424         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2425         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2426         Define.
2427         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2428         internally.  Return non-zero if error, zero if success.
2429         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2430         Add __data.__futex field, reshuffle __data.__clock.
2431         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2432         Define.
2433         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2434         internally.  Return non-zero if error, zero if success.
2435         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2436         Add __data.__futex field, reshuffle __data.__clock.
2437         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2438         Add __data.__futex field, reshuffle __data.__clock.
2439         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2440         Increment __futex at the same time as __wakeup_seq or __total_seq.
2441         Pass address of __futex instead of address of low 32-bits of
2442         __wakeup_seq to futex syscall.
2443         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2444         Pass __futex value from before releasing internal lock
2445         to FUTEX_WAIT.
2446         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2447         Likewise.  Avoid unnecessary shadowing of variables.
2448         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2449         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2450         unlock and __futex address instead of address of low 32-bits of
2451         __wakeup_seq to futex_requeue macro, adjust for new return value
2452         meaning.
2453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2454         (__pthread_cond_signal): Increment __futex at the same time as
2455         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2456         address of low 32-bits of __wakeup_seq to futex syscall.
2457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2458         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2459         releasing internal lock to FUTEX_WAIT.
2460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2461         (__pthread_cond_timedwait): Likewise.
2462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2463         (FUTEX_CMP_REQUEUE): Define.
2464         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2465         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2466         Pass __futex value from before the unlock and __futex address instead
2467         of address of low 32-bits of __wakeup_seq to futex syscall.
2468         Fallback to FUTEX_WAKE all on any errors.
2469
2470 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2471
2472         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2473         Add nop to align the end of critical section.
2474         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2475
2476 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2477
2478         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2479         Add __broadcast_seq field.
2480         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2481         all waiters as woken with woken_seq and bump broadcast counter.
2482         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2483         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2484         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2485         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2486
2487 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2488
2489         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2490         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2491         Reported by Kaz Kojima.
2492
2493 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2494
2495         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2496
2497 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2498
2499         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2500         __broadcast_seq with bc_seq after acquiring internal lock instead of
2501         before it.
2502
2503 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2504
2505         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2506         compilation.
2507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2508         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2509         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2510         (pthread_cond_t): Add __data.__broadcast_seq field.
2511         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2512         (FRAME_SIZE): Define.
2513         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2514         Comment typo fixes.
2515         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2516         Define.
2517         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2518         typo fixes.
2519         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2520         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2521         fixes.
2522
2523 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2524
2525         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2526         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2527         Add __broadcast_seq field.
2528         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2529         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2530         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2531         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2532         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2534         all waiters as woken with woken_seq and bump broadcast counter.
2535         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2537         __broadcast_seq field.
2538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2539         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2540         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2541         * pthread_cond_init.c: Initialize __broadcast_seq field.
2542         * Makefile (tests): Add tst-cond17 and tst-cond18.
2543         Add .NOTPARALLEL goal.
2544         * tst-cond16.c: New file.  From Jakub.
2545         * tst-cond17.c: New file.  From Jakub.
2546         * tst-cond18.c: New file.  From Jakub.
2547
2548 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2549
2550         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2551         unwind info.
2552
2553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2554         Parametrize frame size.  Correct some unwind info.
2555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2556
2557 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2558
2559         * tst-stack3.c: Note testing functionality beyond POSIX.
2560
2561 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2562
2563         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2564         Change conditional from ifdef to if.
2565
2566 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2567
2568         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2569         SYSDEP_CANCEL_ERROR): Define.
2570         (PSEUDO): Use it.
2571
2572 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2573
2574         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2575
2576 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2577
2578         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2579
2580 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2581
2582         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2583         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2584         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2585         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2586
2587 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2588
2589         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2590         thread has all signals blocked.
2591
2592 2004-04-18  Andreas Jaeger  <aj@suse.de>
2593
2594         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2595         (SEM_VALUE_MAX): Add missing brace.
2596
2597 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2598
2599         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2600         in rt subdir.
2601         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2602         * sysdeps/pthread/tst-mqueue8x.c: New test.
2603         * tst-cancel4.c: Update comment about message queues.
2604
2605         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2606         return it_value { 0, 0 }.
2607         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2608         like SIGEV_SIGNAL.
2609         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2610         assertion for SIGEV_NONE.
2611         (thread_attr_compare): Compare all attributes, not just a partial
2612         subset.
2613
2614 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2615
2616         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2617
2618 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2619
2620         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2621         Just use a plain number.
2622         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2623         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2624         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2625         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2626         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2627         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2628         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2629
2630 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2631
2632         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2633         frame info.
2634         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2635
2636 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2637
2638         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2639         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2640         of calling sigwaitinfo.
2641
2642 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2643
2644         * allocatestack.c (allocate_stack): Set reported_guardsize
2645         unconditionally.
2646         * pthread_getattr_np.c (pthread_getattr_np): Use
2647         reported_guardsize instead of guardsize.
2648         * descr.h (struct pthread): Add reported_guardsize field.
2649
2650 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2651
2652         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2653
2654 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2655
2656         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2657
2658 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2659
2660         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2661         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2662         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2663         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2664         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2665         Define.
2666         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2667         (_POSIX_MESSAGE_PASSING): Define.
2668         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2669         (_POSIX_MESSAGE_PASSING): Define.
2670         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2671         (_POSIX_MESSAGE_PASSING): Define.
2672
2673 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2674
2675         * tst-context1.c (fct): Check whether correct stack is used.
2676
2677 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2678
2679         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2680         matching constraints for asm mem parameters.
2681
2682         * tst-clock2.c (tf): Don't define unless needed.
2683
2684 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2685
2686         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2687         $(gnulib).
2688
2689 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2690
2691         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2692         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2693         * pthreadP.h: Declare __nptl_deallocate_tsd.
2694         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2695         Adjust caller.
2696
2697         * Makefile (tests): Add tst-tsd5.
2698         * tst-tsd5.c: New file.
2699
2700 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2701
2702         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2703         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2704         is SHLIB_COMPAT check.
2705         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2706         (__pthread_attr_getaffinity_old): Likewise.
2707         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2708         (__pthread_getaffinity_old): Likewise.
2709         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2710         (__pthread_setaffinity_old): Likewise.
2711
2712 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2713
2714         * allocatestack.c (_make_stacks_executable): Call
2715         _dl_make_stack_executable first.
2716
2717 2004-03-24  Roland McGrath  <roland@redhat.com>
2718
2719         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2720         constraint instead of "0".
2721
2722 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2723
2724         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2725         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2726
2727         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2728         code to avoid warning.
2729
2730 2004-03-24  Andreas Jaeger  <aj@suse.de>
2731
2732         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2733         (__pthread_attr_setaffinity_old): Remove const.
2734
2735 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2736
2737         * sysdeps/unix/sysv/linux/smp.h: New file.
2738         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2739         * init.c: Define __is_smp.
2740         (__pthread_initialize_minimal_internal): Call is_smp_system to
2741         initialize __is_smp.
2742         * pthreadP.h: Declare __is_smp.
2743         Define MAX_ADAPTIVE_COUNT is necessary.
2744         * pthread_mutex_init.c: Add comment regarding __spins field.
2745         * pthread_mutex_lock.c: Implement adaptive mutex type.
2746         * pthread_mutex_timedlock.c: Likewise.
2747         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2748         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2749         Add __spins field.
2750         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2751         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2752         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2753         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2754         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2755         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2756         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2757         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2758         lll_mutex_cond_trylock.
2759         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2760         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2761         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2762         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2763         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2764         Define BUSY_WAIT_NOP.
2765         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2766         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2767
2768         * tst-mutex5.c: Add support for testing adaptive mutexes.
2769         * tst-mutex7.c: Likewise.
2770         * tst-mutex5a.c: New file.
2771         * tst-mutex7a.c: New file.
2772         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2773
2774         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2775         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2776         vgettimeofday call might destroy the content.
2777
2778         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2779         @pause in the loop.
2780
2781         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2782         No need to restrict type of ret.  Make it int.  Add comment.
2783
2784         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2785         Remove unnecessary setne instruction.
2786
2787 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2788
2789         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2790         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2791         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2792         If realloc fails, break out of the loop.
2793
2794 2004-03-20  Andreas Jaeger  <aj@suse.de>
2795
2796         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2797         (__pthread_setaffinity_old): Fix interface.
2798         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2799         (__pthread_getaffinity_old): Likewise.
2800
2801         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2802         (__pthread_setaffinity_new): Remove duplicate declaration.
2803
2804 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2805
2806         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2807         the return value to a safe register.
2808         (CDISABLE): Set the function argument correctly.
2809
2810 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2811
2812         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2813         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2814         Rewrite so that only one locked memory operation per round is needed.
2815         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2816         (pthread_barrier_wait): After wakeup, release lock only when the
2817         last thread stopped using the barrier object.
2818         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2819         (__pthread_cond_wait): Don't store mutex address if the current
2820         value is ~0l.  Add correct cleanup support and unwind info.
2821         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2822         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2823         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2824         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2825         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2826         Add correct cleanup support and unwind info.
2827         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2828         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2829         information for syscall wrappers.
2830
2831 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2832
2833         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2834         cpusetsize field, remove next.
2835         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2836         parameter for size of the CPU set.
2837         (pthread_setaffinity_np): Likewise.
2838         (pthread_attr_getaffinity_np): Likewise.
2839         (pthread_attr_setaffinity_np): Likewise.
2840         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2841         interface change, keep compatibility code.
2842         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2843         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2844         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2845         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2846         __pthread_getaffinity_np.
2847         * Versions: Add version for changed interfaces.
2848         * tst-attr3.c: Adjust test for interface change.
2849         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2850         increasing buffer sizes.
2851         * pthread_attr_destroy.c: Remove unused list handling.
2852         * pthread_attr_init.c: Likewise.
2853
2854 2004-03-17  Roland McGrath  <roland@redhat.com>
2855
2856         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2857         first argument to clock_getres so we ever enable kernel timers.
2858
2859 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2860
2861         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2862
2863 2004-03-12  Richard Henderson  <rth@redhat.com>
2864
2865         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2866         oldvalue from CENABLE to CDISABLE.
2867
2868 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2869
2870         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2871         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2872         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2873         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2874
2875 2004-03-11  Richard Henderson  <rth@redhat.com>
2876
2877         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2878         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2879         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2880
2881 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2882
2883         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2884         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2885         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2886
2887 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2888
2889         * forward.c (__pthread_cond_broadcast_2_0,
2890         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2891         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2892         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2893
2894 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2895
2896         * sysdeps/sh/tcb-offsets.sym: Add PID.
2897         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2898         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2899
2900 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2901
2902         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2903         include <sysdep-cancel.h>, vfork is no cancellation point.
2904         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2905         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2906         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2907
2908 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2909
2910         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2911         libc_hidden_def.
2912         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2913         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2914         Likewise.
2915         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2916         Likewise.
2917         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2918         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2919         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2920         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2921         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2922
2923         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2924         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2925         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2926         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2927         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2928         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2929
2930         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2931         a local register for saving old PID.  Negate PID in parent upon exit.
2932
2933         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2934         tcb-offsets.h.
2935         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2936         before syscall, set to the old value in the parent afterwards.
2937         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2938         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2939         tcb-offsets.h.
2940         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2941         before syscall, set to the old value in the parent afterwards.
2942         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2943         * sysdeps/s390/tcb-offsets.sym: Add PID.
2944
2945         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2946         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2947         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2948         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2949         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2950         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2951
2952 2004-03-10  Andreas Schwab  <schwab@suse.de>
2953
2954         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2955         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2956         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2957
2958 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2959
2960         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2961         * tst-cancel21.c (do_one_test): Likewise.
2962         Reported by Gordon Jin <gordon.jin@intel.com>.
2963
2964 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2965
2966         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2967         if non-zero and set to INT_MIN if zero.
2968         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2969         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2970         (SAVE_PID, RESTORE_PID): Define.
2971         (__vfork): Use it.
2972         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2973         Use relative path to avoid including NPTL i386/vfork.S.
2974         (SAVE_PID, RESTORE_PID): Define.
2975         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2976         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2977         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2978         tst-vfork2x.
2979         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2980         * tst-vfork1.c: New test.
2981         * tst-vfork2.c: New test.
2982         * tst-vfork1x.c: New test.
2983         * tst-vfork2x.c: New test.
2984
2985 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2986
2987         * sysdeps/i386/tcb-offsets.sym: Add PID.
2988         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2989         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2990         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2991
2992 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2993
2994         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2995
2996 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2997
2998         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2999         _rtld_global_ro.
3000
3001 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
3002
3003         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3004         _rtld_global_ro.
3005
3006         * tst-once4.c: Remove unnecessary macro definition.
3007
3008         * tst-mutex7.c (do_test): Limit thread stack size.
3009         * tst-once2.c (do_test): Likewise.
3010         * tst-tls3.c (do_test): Likewise.
3011         * tst-tls1.c (do_test): Likewise.
3012         * tst-signal3.c (do_test): Likewise.
3013         * tst-kill6.c (do_test): Likewise.
3014         * tst-key4.c (do_test): Likewise.
3015         * tst-join4.c (do_test): Likewise.
3016         * tst-fork1.c (do_test): Likewise.
3017         * tst-context1.c (do_test): Likewise.
3018         * tst-cond2.c (do_test): Likewise.
3019         * tst-cond10.c (do_test): Likewise.
3020         * tst-clock2.c (do_test): Likewise.
3021         * tst-cancel10.c (do_test): Likewise.
3022         * tst-basic2.c (do_test): Likewise.
3023         * tst-barrier4.c (do_test): Likewise.
3024
3025 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
3026
3027         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
3028
3029 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
3030
3031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3032         (__pthread_cond_timedwait): Optimize wakeup test.
3033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3034         (__pthread_cond_wait): Likewise.
3035         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3036         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3037         Likewise.
3038
3039 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
3040
3041         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3042         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
3043         the atomic instruction needed.
3044         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3045         (__lll_mutex_lock_wait): Likewise.
3046
3047 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
3048
3049         * Makefile (tests): Add tst-cond14 and tst-cond15.
3050         * tst-cond14.c: New file.
3051         * tst-cond15.c: New file.
3052
3053 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
3054
3055         * sysdeps/pthread/createthread.c (create_thread): Remove use of
3056         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
3057         needs to be implemented differently to be useful.
3058
3059 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
3060
3061         * pthread_attr_setschedparam.c: Don't test priority against limits
3062         here.  Set ATTR_FLAG_SCHED_SET flag.
3063         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3064         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3065         from parent thread to child.  If attribute is used and scheduling
3066         parameters are not inherited, copy parameters from attribute or
3067         compute them.  Check priority value.
3068         * pthread_getschedparam.c: If the parameters aren't known yet get
3069         them from the kernel.
3070         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3071         ATTR_FLAG_POLICY_SET flag for thread.
3072         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3073         and ATTR_FLAG_POLICY_SET.
3074
3075         * sysdeps/pthread/createthread.c: Use tgkill if possible.
3076
3077         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3078         fail if stack address hasn't been set.  Just return 0.
3079
3080 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
3081
3082         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
3083         libpthread for the files in this list.
3084         (CFLAGS-tst-unload): Removed.
3085         * tst-unload.c (do_test): Don't use complete path for
3086         LIBPHREAD_SO.
3087
3088         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3089         tst-_res1mod2.
3090
3091 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
3092
3093         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3094         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3095         operation per round is needed.
3096         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3097         (__lll_mutex_lock_wait): Likewise.
3098
3099 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
3100
3101         * tst-cancel9.c (cleanup): Don't print to stderr.
3102
3103 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3104
3105         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3106
3107 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
3108
3109         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3110         (__syscall_error_handler2): Call CDISABLE.
3111         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3112         (__syscall_error_handler2): Call CDISABLE.
3113
3114         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3115         Release lock before the loop, don't reacquire it.
3116
3117         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3118
3119 2004-02-19  Andreas Schwab  <schwab@suse.de>
3120
3121         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3122         Fix last change.
3123
3124 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
3125
3126         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3127         (pthread_barrier_wait): After wakeup, release lock only when the
3128         last thread stopped using the barrier object.
3129         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3130         (pthread_barrier_wait): Likewise.
3131         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3132         Likewise.
3133         * Makefile (tests): Add tst-barrier4.
3134         * tst-barrier4.c: New file.
3135
3136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3137         (__pthread_cond_timedwait): Perform timeout test while holding
3138         internal lock to prevent wakeup race.
3139         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3140         * sysdeps/pthread/pthread_cond_timedwait.c
3141         (__pthread_cond_timedwait): Likewise.
3142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3143         (__pthread_cond_timedwait): Likewise.
3144
3145 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
3146
3147         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3148         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3149         * Makefile (tests): Add tst-rwlock13.
3150         * tst-rwlock13.c: New test.
3151
3152 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
3153
3154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3155         (__condvar_tw_cleanup): Little optimization.
3156         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3157
3158 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
3159
3160         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3161         libpthread as "lib" parameter to SHLIB_COMPAT.
3162         (__novmx_siglongjmp): Fix typo in function name.
3163         (__novmx_longjmp): Fix typo in function name.
3164
3165 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3166
3167         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3168         __builtin_expect.
3169
3170         * sysdeps/generic/pt-longjmp.c: Moved to...
3171         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
3172
3173 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
3174
3175         * Makefile (libpthread-routines): Add pt-cleanup.
3176         * pt-longjmp.c: Removed.
3177         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3178         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3179         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3180         Version longjmp, siglongjmp for GLIBC_2.3.4.
3181         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3182
3183 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3184
3185         * sysdeps/pthread/pthread_cond_timedwait.c
3186         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
3187         Reuse code.  Add __builtin_expects.
3188
3189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3190         (__pthread_cond_timedwait): Get internal lock in case timeout has
3191         passed before the futex syscall.
3192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3193
3194 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
3195
3196         * allocatestack.c: Pretty printing.
3197
3198         * sysdeps/pthread/createthread.c (create_thread): Don't add
3199         CLONE_DETACHED bit if it is not necessary.
3200
3201 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
3202
3203         * pthread_getattr_np.c: Include ldsodefs.h.
3204
3205 2004-01-16  Richard Henderson  <rth@redhat.com>
3206
3207         * allocatestack.c: Don't declare __libc_stack_end.
3208         * init.c (__pthread_initialize_minimal_internal): Likewise.
3209         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3210
3211 2004-01-15  Richard Henderson  <rth@redhat.com>
3212
3213         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3214         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3215         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3216         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3217         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3218         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3219         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3220         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3221
3222 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3223
3224         * init.c (pthread_functions): Make array const.
3225
3226 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3227
3228         * allocatestack.c (__make_stacks_executable): Change interface.
3229         Check parameters.  Pass parameter on to libc counterpart.
3230         * pthreadP.h: Change declaration.
3231
3232 2004-01-13  Richard Henderson  <rth@redhat.com>
3233
3234         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3235         prototype form.
3236         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3237         Likewise.
3238
3239         * sysdeps/alpha/Makefile: New file.
3240         * sysdeps/alpha/tcb-offsets.sym: New file.
3241         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3242         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3243
3244         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3245         on powerpc version.
3246
3247 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3248
3249         * Makefile (tests): Add tst-backtrace1.
3250         * tst-backtrace1.c: New test.
3251
3252 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3253
3254         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3255         register as second parameter to the REGISTER macro.
3256         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3257         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3258         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3259         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3260         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3261         of thread register as second parameter to REGISTER macro in 64 case.
3262
3263 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3264
3265         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3266         (CFLAGS-getpid.o): Defined.
3267         (CFLAGS-getpid.os): Defined.
3268
3269 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3270
3271         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3272         returned for main thread does not overlap with any other VMA.
3273         Patch by Jakub Jelinek.
3274
3275 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3276
3277         * tst-raise1.c: Include stdio.h.
3278
3279 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3280
3281         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3282         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3283         If pid is 0, set it to selftid.
3284         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3285         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3286         != 0, return self->tid without doing a syscall.
3287         * descr.h (struct pthread): Move pid field after tid.
3288
3289         * Makefile (tests): Add tst-raise1.
3290         * tst-raise1.c: New file.
3291
3292 2003-12-23  Roland McGrath  <roland@redhat.com>
3293
3294         * tst-oddstacklimit.c: New file.
3295         * Makefile (tests): Add it.
3296         (tst-oddstacklimit-ENV): New variable.
3297
3298         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3299         value up to page size for __default_stacksize.
3300
3301 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3302
3303         * Makefile (tests): Add tst-eintr5.
3304         * tst-eintr5.c: New file.
3305
3306         * eintr.c (eintr_source): Prevent sending signal to self.
3307
3308         * tst-eintr2.c (tf1): Improve error message.
3309
3310 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3311
3312         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3313         * sysdeps/unix/sysv/linux/getpid.c: New file.
3314         * pthread_cancel.c: Add comment explaining use of PID field.
3315         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3316         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3317         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3318         temporarily to signal the field must not be relied on and updated
3319         by getpid().
3320         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3321         temporarily negative.
3322         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3323
3324 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3325
3326         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3327         (eintr_source): If ARG != NULL, use pthread_kill.
3328         * tst-eintr1.c: Adjust for this change.
3329         * tst-eintr2.c: Likewise.
3330         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3331         * tst-eintr3.c: New file.
3332         * tst-eintr4.c: New file.
3333
3334 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3335
3336         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3337         if CANCELSTATE_BITMASK is set.
3338         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3339         Likewise.
3340
3341         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3342         (tests-reverse): Add tst-cancel23.
3343         * tst-cancel22.c: New test.
3344         * tst-cancel23.c: New test.
3345
3346 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3347
3348         * tst-eintr1.c: Better error messages.
3349
3350         * Makefile (tests): Add tst-eintr2.
3351         * tst-eintr2.c: New file.
3352
3353 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3354
3355         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3356         (CFLAGS-tst-cancelx21.c): Set.
3357         * tst-cancel21.c: New test.
3358         * tst-cancelx21.c: New test.
3359
3360         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3361         comparison operand.
3362         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3363         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3364         * pt-longjmp.c: Include jmpbuf-unwind.h.
3365         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3366         _JMPBUF_UNWINDS.  Adjust compared pointers.
3367         * init.c (__pthread_initialize_minimal_internal): Initialize
3368         pd->stackblock_size.
3369         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3370         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3371         * sysdeps/i386/jmpbuf-unwind.h: New file.
3372         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3373         * sysdeps/s390/jmpbuf-unwind.h: New file.
3374         * sysdeps/sh/jmpbuf-unwind.h: New file.
3375         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3376         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3377         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3378         (_JMPBUF_CFA_UNWINDS): Remove.
3379         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3380
3381 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3382
3383         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3384         (CFLAGS-tst-cancelx20.c): Set.
3385         * tst-cancel20.c: New test.
3386         * tst-cancelx20.c: New test.
3387
3388 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3389
3390         * init.c (__pthread_initialize_minimal_internal): Don't treat
3391         architectures with separate register stack special here when
3392         computing default stack size.
3393
3394 2003-12-17  Roland McGrath  <roland@redhat.com>
3395
3396         * Makefile (tst-cancelx7-ARGS): New variable.
3397         Reportd by Greg Schafer <gschafer@zip.com.au>.
3398
3399 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3400
3401         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3402         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3403         (tst-stack3-ENV): Set.
3404         ($(objpfx)tst-stack3-mem): New.
3405         * tst-stack3.c: New test.
3406
3407 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3408
3409         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3410         Add unwind directives.  Drop unused .regstk directive.
3411         (_fini_EPILOG_BEGINS): Add unwind directives.
3412
3413 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3414
3415         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3416         Assume parameter is a pointer.
3417         (lll_futex_wake): Likewise.
3418         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3419         Likewise.
3420         (lll_futex_wake): Likewise.
3421         Reported by Boris Hu.
3422         * sysdeps/unix/sysv/linux/unregister-atfork.c
3423         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3424
3425         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3426
3427 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3428
3429         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3430         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3431         __rtld_lock_initialize for ld.so lock.
3432         Patch in part by Adam Li <adam.li@intel.com>.
3433
3434 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3435
3436         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3437         in $(gnulib).  Also, remove stale comment.
3438
3439 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3440
3441         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3442         advantage of new syscall stub and optimize accordingly.
3443
3444         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3445         from SYS_futex, to match expectations of
3446         sysdep.h:DO_INLINE_SYSCALL.
3447         (lll_futex_clobbers): Remove.
3448         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3449         (lll_futex_wake): Likewise.
3450         (lll_futex_requeue): Likewise.
3451         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3452         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3453         Jelinek).
3454         (__lll_mutex_lock): Likewise.
3455         (__lll_mutex_cond_lock): Likewise.
3456         (__lll_mutex_timed_lock): Likewise.
3457         (__lll_mutex_unlock): Likewise.
3458         (__lll_mutex_unlock_force): Likewise.
3459
3460         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3461         comes before the include of <sysdep.h>.
3462         (THREAD_SELF_SYSINFO): New macro.
3463         (THREAD_SYSINFO): Likewise.
3464         (INIT_SYSINFO): New macro.
3465         (TLS_INIT_TP): Call INIT_SYSINFO.
3466
3467         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3468
3469         * sysdeps/pthread/createthread.c (create_thread): Use
3470         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3471         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3472         THREAD_SELF_SYSINFO instead of open code.
3473         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3474         (THREAD_SYSINFO): Likewise.
3475
3476         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3477
3478         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3479
3480 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3481
3482         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3483         instead of .init.  Patch by&