Updated to fedora-glibc-20070221T1011
[glibc.git] / nptl / ChangeLog
blobaadec5ad38a2e06daff8b8bda23774ab04081502
1 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4         PTHFCT_CALL definition.
6 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
8         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
9         available, don't use it.
11 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
13         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
14         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
15         call into the kernel to delay.
17 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
19         * tst-initializers1.c: We want to test the initializers as seen
20         outside of libc, so undefined _LIBC.
22         * pthread_join.c (cleanup): Avoid warning.
24 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
26         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
27         (__lll_timedwait_tid): Add unwind info.
29         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
30         function table, mangle the pointers.
31         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
32         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
33         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
34         demangle pointers before use.
35         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
36         demangle pointer.
37         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
38         * sysdeps/pthread/setxid.h: Likewise.
40 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
42         * tst-rwlock7.c: Show some more information in case of correct
43         behavior.
45 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
47         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
48         (lll_futex_timed_wait): Undo part of last change, don't negate
49         return value.
51 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
53         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
54         FUTEX_CMP_REQUEUE and lll_futex_requeue.
56 2006-12-28  David S. Miller  <davem@davemloft.net>
58         * shlib-versions: Fix sparc64 linux target specification.
60 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
62         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
63         Adjust include path for pthread_barrier_wait.c move.
65 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
67         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
68         tid isn't reread from pd->tid in between ESRCH test and the syscall.
70 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
72         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
73         6 argument cancellable syscalls.
74         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
75         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
76         6 argument cancellable syscalls.
77         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
79 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
81         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
82         (__rtld_mrlock_initialize): Add missing closing parenthesis.
84 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
86         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
87         __sync_lock_release instead of __sync_lock_release_si.
89 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
91         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
92         Define.
93         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
94         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
95         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
96         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
97         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
98         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
99         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
100         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
101         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
102         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
103         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
105 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
107         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
108         * pthread_barrier_wait.c: ...here.
109         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
110         * pthread_cond_broadcast.c: ...here.
111         * sysdeps/pthread/pthread_cond_signal.c: Move to...
112         * pthread_cond_signal.c: ...here.
113         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
114         * pthread_cond_timedwait.c: ...here.
115         * sysdeps/pthread/pthread_cond_wait.c: Move to...
116         * pthread_cond_wait.c: ...here.
117         * sysdeps/pthread/pthread_once.c: Move to...
118         * pthread_once.c: ...here.
119         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
120         * pthread_rwlock_rdlock.c: ...here.
121         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
122         * pthread_rwlock_timedrdlock.c: ...here.
123         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
124         * pthread_rwlock_timedwrlock.c: ...here.
125         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
126         * pthread_rwlock_unlock.c: ...here.
127         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
128         * pthread_rwlock_wrlock.c: ...here.
129         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
130         * pthread_spin_destroy.c: ...here.
131         * sysdeps/pthread/pthread_spin_init.c: Move to...
132         * pthread_spin_init.c: ...here.
133         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
134         * pthread_spin_unlock.c: ...here.
135         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
136         * pthread_getcpuclockid.c: ...here.
138         * init.c: USE_TLS support is now always enabled.
139         * tst-tls5.h: Likewise.
140         * sysdeps/alpha/tls.h: Likewise.
141         * sysdeps/i386/tls.h: Likewise.
142         * sysdeps/ia64/tls.h: Likewise.
143         * sysdeps/powerpc/tls.h: Likewise.
144         * sysdeps/s390/tls.h: Likewise.
145         * sysdeps/sh/tls.h: Likewise.
146         * sysdeps/sparc/tls.h: Likewise.
147         * sysdeps/x86_64/tls.h: Likewise.
149 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
151         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
152         __rtld_mrlock_change): Update oldval if atomic compare and exchange
153         failed.
155         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
156         Define to THREAD_SELF->header.multiple_threads.
157         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
158         Likewise.
159         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
160         Likewise.
161         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
162         (SINGLE_THREAD_P): Likewise.
163         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
164         (SINGLE_THREAD_P): Likewise.
165         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
166         (SINGLE_THREAD_P): Likewise.
167         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
168         (SINGLE_THREAD_P): Likewise.
169         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
170         Likewise.
171         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
172         (SINGLE_THREAD_P): Likewise.
173         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
174         (SINGLE_THREAD_P): Likewise.
175         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
176         Likewise.
178 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
180         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
181         by default rather than 2_3_3.
183 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
185         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
186         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
187         atomic_* instead of catomic_* macros.
189 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
191         [BZ #3285]
192         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
193         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
194         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
195         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
196         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
197         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
198         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
199         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
200         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
201         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
202         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
203         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
204         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
206 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
208         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
209         cancelable syscalls with six parameters.
211         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
212         operations instead of atomic_*.
214 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
216         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
218 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
220         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
221         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
222         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
223         New file.
224         * pthread_attr_setstack.c: Allow overwriting the version number of the
225         new symbol.
226         * pthread_attr_setstacksize.c: Likewise.
227         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
228         it.
229         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
230         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
232 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
234         [BZ #3251]
235         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
236         Patch by Petr Baudis.
238 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
240         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
242         * tst-cancel2.c (tf): Loop as long as something was written.
244 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
246         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
247         mutexes wake all mutexes.
248         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
249         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
250         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
252 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
254         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
255         to guarantee the thread is always canceled.
257 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
259         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
260         Include stdlib.h.
261         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
262         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
265         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
267 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
269         [BZ #3123]
270         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
271         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
274         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
275         * Makefile (tests): Add tst-cond22.
276         * tst-cond22.c: New file.
278 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
280         [BZ #3124]
281         * descr.h (struct pthread): Add parent_cancelhandling.
282         * sysdeps/pthread/createthread.c (create_thread): Pass parent
283         cancelhandling value to child.
284         * pthread_create.c (start_thread): If parent thread was canceled
285         reset the SIGCANCEL mask.
286         * Makefile (tests): Add tst-cancel25.
287         * tst-cancel25.c: New file.
289 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
290             Ulrich Drepper  <drepper@redhat.com>
292         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
293         counterp if it is already zero.
294         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
296 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
297             Roland McGrath  <roland@redhat.com>
299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
300         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
301         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
302         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
303         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
304         lll_robust_mutex_timedlock, lll_mutex_unlock,
305         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
306         Add _L_*_ symbols around the subsection.
307         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
308         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
310 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
311             Roland McGrath  <roland@redhat.com>
313         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
314         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
315         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
316         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
317         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
318         lll_robust_mutex_timedlock, lll_mutex_unlock,
319         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
320         Add _L_*_ symbols around the subsection.
321         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
322         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
324 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
326         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
327         change because it can disturb too much existing code.  If real hard
328         reader preference is needed we'll introduce another type.
329         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
330         (pthread_rwlock_timedwrlock): Likewise.
331         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
332         Likewise.
334 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
336         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
337         reader preference.
338         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
339         (pthread_rwlock_timedwrlock): Likewise.
340         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
341         Likewise.
343 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
345         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
346         Only define ifdef SHARED.
348 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
350         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
351         (free_stacks): ...here.
352         (__free_stack_cache): New function.
353         * pthreadP.h: Declare __free_stack_cache.
354         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
355         ptr_freeres.
356         * init.c (pthread_functions): Initialize ptr_freeres.
357         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
358         New freeres function.
360 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
362         [BZ #3018]
363         * Makefile (extra-objs): Add modules to extra-test-objs instead.
365 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
367         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
368         _XOPEN_REALTIME_THREADS.
370 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
372         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
373         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
374         HAVE_CLOCK_GETTIME_VSYSCALL.
375         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
377 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
379         * sysdeps/unix/sysv/linux/bits/posix_opt.h
380         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
381         * descr.h (struct priority_protection_data): New type.
382         (struct pthread): Add tpp field.
383         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
384         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
385         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
386         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
387         TPP mutexes.
388         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
389         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
390         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
391         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
392         * tpp.c: New file.
393         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
394         boosted by TPP.
395         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
396         * pthread_mutexattr_getprioceiling.c
397         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
398         in the SCHED_FIFO priority range.
399         * pthread_mutexattr_setprioceiling.c
400         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
401         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
402         if mutex is not TPP.  Ceiling is now in __data.__lock.
403         * pthread_mutex_setprioceiling.c: Include stdbool.h.
404         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
405         is now in __data.__lock.  Add locking.
406         * pthread_create.c (__free_tcb): Free pd->tpp structure.
407         * Makefile (libpthread-routines): Add tpp.
408         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
409         * tst-tpp.h: New file.
410         * tst-mutexpp1.c: New file.
411         * tst-mutexpp6.c: New file.
412         * tst-mutexpp10.c: New file.
413         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
414         * tst-mutex6.c (TEST_FUNCTION): Likewise.
416 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
418         [BZ #2843]
419         * pthread_join.c (pthread_join): Account for self being canceled
420         when checking for deadlocks.
421         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
422         (tf1): Don't print anything after pthread_join returns, this would be
423         another cancellation point.
424         (tf2): Likewise.
425         * tst-join6.c: New file.
426         * Makefile (tests): Add tst-join6.
428 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
430         [BZ #2892]
431         * pthread_setspecific.c (__pthread_setspecific): Check
432         out-of-range index before checking for unused key.
434         * sysdeps/pthread/gai_misc.h: New file.
436 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
438         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
439         file.  Don't use sysctl.
440         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
441         overwrite the file if this is likely not true.
443 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
445         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
446         * Makefile (tests): Add tst-getpid3.
447         * tst-getpid3.c: New file.
449 2006-07-30  Roland McGrath  <roland@redhat.com>
451         * Makefile (libpthread-routines): Add ptw-sigsuspend.
453         * sysdeps/unix/sysv/linux/i386/not-cancel.h
454         (pause_not_cancel): New macro.
455         (nanosleep_not_cancel): New macro.
456         (sigsuspend_not_cancel): New macro.
457         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
458         nanosleep_not_cancel macro from <not-cancel.h>.
459         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
460         macro from <not-cancel.h>.
462 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
463             Jakub Jelinek  <jakub@redhat.com>
465         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
466         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
467         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
468         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
469         * pthread_mutex_init.c: Add support for priority inheritance mutex.
470         * pthread_mutex_lock.c: Likewise.
471         * pthread_mutex_timedlock.c: Likewise.
472         * pthread_mutex_trylock.c: Likewise.
473         * pthread_mutex_unlock.c: Likewise.
474         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
475         all mutexes.
476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
477         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
478         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
479         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
480         pthread-pi-defines.sym.
481         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
482         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
483         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
484         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
485         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
486         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
487         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
488         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
489         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
490         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
491         _POSIX_THREAD_PRIO_INHERIT to 200112L.
492         * tst-mutex1.c: Adjust to allow use in PI mutex test.
493         * tst-mutex2.c: Likewise.
494         * tst-mutex3.c: Likewise.
495         * tst-mutex4.c: Likewise.
496         * tst-mutex5.c: Likewise.
497         * tst-mutex6.c: Likewise.
498         * tst-mutex7.c: Likewise.
499         * tst-mutex7a.c: Likewise.
500         * tst-mutex8.c: Likewise.
501         * tst-mutex9.c: Likewise.
502         * tst-robust1.c: Likewise.
503         * tst-robust7.c: Likewise.
504         * tst-robust8.c: Likewise.
505         * tst-mutexpi1.c: New file.
506         * tst-mutexpi2.c: New file.
507         * tst-mutexpi3.c: New file.
508         * tst-mutexpi4.c: New file.
509         * tst-mutexpi5.c: New file.
510         * tst-mutexpi6.c: New file.
511         * tst-mutexpi7.c: New file.
512         * tst-mutexpi7a.c: New file.
513         * tst-mutexpi8.c: New file.
514         * tst-mutexpi9.c: New file.
515         * tst-robust1.c: New file.
516         * tst-robust2.c: New file.
517         * tst-robust3.c: New file.
518         * tst-robust4.c: New file.
519         * tst-robust5.c: New file.
520         * tst-robust6.c: New file.
521         * tst-robust7.c: New file.
522         * tst-robust8.c: New file.
523         * Makefile (tests): Add the new tests.
525         * pthread_create.c (start_thread): Add some casts to avoid warnings.
526         * pthread_mutex_destroy.c: Remove unneeded label.
528 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
530         * pthread_mutex_init.c (__pthread_mutex_init): Move some
531         computations to compile time.
533 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
535         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
537 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
539         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
541 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
543         * pthread_key_create.c (__pthread_key_create): Do away with
544         __pthread_keys_lock.
546         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
547         (__kernel_cpumask_size): Mark as hidden.
548         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
550         * sem_open.c (__sem_mappings_lock): Mark as hidden.
551         * semaphoreP.h (__sem_mappings_lock): Likewise.
553 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
555         * pthread_atfork.c: Mark __dso_handle as hidden.
557 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
559         [BZ #2644]
560         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
561         the reload problem.  Change the one path in pthread_cancel_init
562         which causes the problem.  Force gcc to reload.  Simplify callers.
563         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
564         (_Unwind_GetBSP): Undo last patch.
566 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
568         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
569         function pointer is reloaded after pthread_cancel_init calls.
571         [BZ #2644]
572         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
573         pointers are reloaded after pthread_cancel_init calls.
575 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
577         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
578         __always_inline.
580 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
582         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
583         Allocate new object which is passed to timer_sigev_thread so that
584         the timer can be deleted before the new thread is scheduled.
586 2006-04-26  Roland McGrath  <roland@redhat.com>
588         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
590 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
592         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
593         suffix for conditional jumps.
594         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
595         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
596         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
597         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
598         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
599         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
601         * init.c (sigcancel_handler): Compare with correct PID even if the
602         thread is in the middle of a fork call.
603         (sighandler_setxid): Likewise.
604         Reported by Suzuki K P <suzuki@in.ibm.com> .
606 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
608         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
610 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
612         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
613         fails [Coverity CID 105].
615 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
617         * sysdeps/pthread/pthread.h: Add nonnull attributes.
619 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
621         [BZ #2505]
622         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
623         Define __lll_rel_instr using lwsync.
625 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
627         * allocatestack.c (allocate_stack): Always initialize robust_head.
628         * descr.h: Define struct robust_list_head.
629         (struct pthread): Use robust_list_head in robust mutex list definition.
630         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
631         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
632         (__pthread_initialize_minimal_internal): Register robust_list with
633         the kernel.
634         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
635         Declare __set_robust_list_avail.
636         * pthread_create.c (start_thread): Register robust_list of new thread.
637         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
638         waiters.
639         * pthread_mutex_destroy.c: For robust mutexes don't look at the
640         number of users, it's unreliable.
641         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
642         set_robust_list syscall is available.
643         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
644         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
645         Set robust_head.list_op_pending before trying to lock a robust mutex.
646         * pthread_mutex_timedlock.c: Likewise.
647         * pthread_mutex_trylock.c: Likewise.
648         * pthread_mutex_unlock.c: Likewise for unlocking.
649         * Makefile (tests): Add tst-robust8.
650         * tst-robust8.c: New file.
652 2006-03-08  Andreas Schwab  <schwab@suse.de>
654         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
655         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
657 2006-03-05  Roland McGrath  <roland@redhat.com>
659         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
660         and $config_os doesn't match *linux*.
662 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
664         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
665         Use __syscall_error.
666         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
667         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
668         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
669         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
670         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
671         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
673 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
675         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
677 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
679         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
680         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
681         mutex.
682         (__lll_robust_timedlock_wait): Likewise.
683         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
684         (__lll_robust_lock_wait): Likewise.
685         (__lll_robust_timedlock_wait): Likewise.
686         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
687         (__lll_robust_lock_wait): Likewise.
688         (__lll_robust_timedlock_wait): Likewise.
690 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
692         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
693         lll_robust_mutex_trylock, lll_robust_mutex_lock,
694         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
695         lll_robust_mutex_unlock): Define.
696         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
698 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
700         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
701         instead of <clone.S>.
703 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
705         * Makefile (libpthread-routines): Add
706         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
707         and pthread_mutex_[sg]etprioceiling.
708         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
709         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
710         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
711         pthread_mutex_setprioceiling.
712         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
713         PTHREAD_PRIO_PROTECT): New enum values.
714         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
715         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
716         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
717         prototypes.
718         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
719         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
720         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
721         Define.
722         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
723         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
724         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
725         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
726         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
727         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
728         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
729         protocol mutexes.
730         * pthread_mutex_getprioceiling.c: New file.
731         * pthread_mutex_setprioceiling.c: New file.
732         * pthread_mutexattr_getprioceiling.c: New file.
733         * pthread_mutexattr_setprioceiling.c: New file.
734         * pthread_mutexattr_getprotocol.c: New file.
735         * pthread_mutexattr_setprotocol.c: New file.
737 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
739         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
741 2006-02-27  Roland McGrath  <roland@redhat.com>
743         * sysdeps/pthread/Subdirs: List nptl here too.
744         * configure (libc_add_on_canonical): New variable.
746         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
748         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
749         self to get main source tree's file.
750         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
751         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
752         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
753         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
754         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
755         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
756         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
757         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
758         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
759         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
760         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
761         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
762         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
764         * Makefile: Use $(sysdirs) in vpath directive.
766         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
767         (CPPFLAGS-timer_routines.c): Likewise.
769         * Makeconfig (includes): Variable removed.
771 2006-02-26  Roland McGrath  <roland@redhat.com>
773         * sysdeps/generic/pt-raise.c: Moved to ...
774         * pt-raise.c: ... here.
775         * sysdeps/generic/lowlevellock.h: Moved to ...
776         * lowlevellock.h: ... here.
778 2006-02-23  Roland McGrath  <roland@redhat.com>
780         * descr.h (struct pthread): Add final member `end_padding'.
781         (PTHREAD_STRUCT_END_PADDING): Use it.
783 2006-02-20  Roland McGrath  <roland@redhat.com>
785         * sysdeps/mips: Directory removed, saved in ports repository.
786         * sysdeps/unix/sysv/linux/mips: Likewise.
788 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
790         * tst-robust1.c: Add second mutex to check that the mutex list is
791         handled correctly.
793 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
795         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
796         lll_robust_mutex_trylock, lll_robust_mutex_lock,
797         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
798         lll_robust_mutex_unlock): New macros.
799         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
800         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
801         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
802         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
803         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
805 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
807         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
808         definitions.
809         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
811 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
813         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
814         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
815         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
816         (lll_robust_mutex_unlock): Likewise.
818 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
820         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
821         Set robust_list.__next rather than robust_list.
822         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
823         (__pthread_list_t): New typedef.
824         (pthread_mutex_t): Replace __next and __prev fields with __list.
825         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
826         (__pthread_list_t): New typedef.
827         (pthread_mutex_t): Replace __next and __prev fields with __list.
828         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
829         (__pthread_list_t, __pthread_slist_t): New typedefs.
830         (pthread_mutex_t): Replace __next and __prev fields with __list.
831         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
832         (__pthread_list_t, __pthread_slist_t): New typedefs.
833         (pthread_mutex_t): Replace __next and __prev fields with __list.
834         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
835         (__pthread_list_t, __pthread_slist_t): New typedefs.
836         (pthread_mutex_t): Replace __next and __prev fields with __list.
837         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
838         (__pthread_slist_t): New typedef.
839         (pthread_mutex_t): Replace __next field with __list.
841 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
843         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
844         PTHREAD_MUTEX_OWNERDEAD.
845         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
846         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
847         * Makefile (libpthread-routines): Add lowlevelrobustlock.
848         * pthread_create.c (start_thread): Very much simplify robust_list loop.
849         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
850         to PTHREAD_MUTEX_INCONSISTENT.
851         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
852         * pthread_mutex_lock.c: Reimplement robust mutex handling.
853         * pthread_mutex_trylock.c: Likewise.
854         * pthread_mutex_timedlock.c: Likewise.
855         * pthread_mutex_unlock.c: Likewise.
856         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
857         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
858         lowlevelrobustlock.sym.
859         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
860         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
861         definitions.
862         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
863         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
864         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
865         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
866         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
868 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
870         * allocatestack.c (allocate_stack): Initialize robust_list.
871         * init.c (__pthread_initialize_minimal_internal): Likewise.
872         * descr.h (struct xid_command): Pretty printing.
873         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
874         robust_list.  Adjust macros.
875         * pthread_create.c (start_thread): Adjust robust_list handling.
876         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
877         but the owner for all robust mutex types.
878         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
879         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
880         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
881         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
883         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
884         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
886 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
888         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
889         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
891 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
893         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
894         Return status.
895         (lll_futex_timed_wait): Define.
897 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
899         * tst-cancel4.c: Test ppoll.
901 2006-01-18  Andreas Jaeger  <aj@suse.de>
903         [BZ #2167]
904         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
905         (pthread_mutex_t): Follow changes for other archs.  Based on patch
906         by Jim Gifford <patches@jg555.com>.
908 2006-01-13  Richard Henderson  <rth@redhat.com>
910         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
912 2006-01-10  Roland McGrath  <roland@redhat.com>
914         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
915         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
916         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
917         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
918         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
919         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
920         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
921         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
922         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
923         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
925 2006-01-09  Roland McGrath  <roland@redhat.com>
927         * tst-initializers1-c89.c: New file.
928         * tst-initializers1-c99.c: New file.
929         * tst-initializers1-gnu89.c: New file.
930         * tst-initializers1-gnu99.c: New file.
931         * Makefile (tests): Add them.
932         (CFLAGS-tst-initializers1-c89.c): New variable.
933         (CFLAGS-tst-initializers1-c99.c): New variable.
934         (CFLAGS-tst-initializers1-gnu89.c): New variable.
935         (CFLAGS-tst-initializers1-gnu99.c): New variable.
937         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
938         Use __extension__ on anonymous union definition.
939         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
940         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
941         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
942         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
943         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
945 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
947         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
948         Don't give the union a name because it changes the mangled name.
949         Instead name the struct for __data.
950         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
951         Likewise.
952         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
953         Likewise.
955 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
957         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
958         stack bias to mc_ftp field.
960 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
962         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
963         being too clever and reloading the futex value where it shouldn't.
965 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
967         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
968         correct type.
970 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
972         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
973         Add cfi directives.
975 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
977         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
978         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
979         rename in tcbhead_t.
981         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
982         Don't give the union a name because it changes the mangled name.
983         Instead name the struct for __data.
984         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
985         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
986         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
987         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
988         * pthread_create.c (start_thread): Adjust robust mutex free loop.
989         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
991 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
993         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
994         Return status.
995         (lll_futex_timed_wait): Define.
996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
997         * sysdeps/pthread/aio_misc.h: New file.
999 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
1001         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
1003 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
1005         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1006         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
1007         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1009 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
1011         * tst-cancel24.cc: Use C headers instead of C++ headers.
1013 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
1015         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
1016         sparc-linux configured glibc.
1017         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
1018         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
1019         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
1020         atomic_compare_and_exchange_val_24_acq instead of
1021         atomic_compare_and_exchange_val_acq.
1022         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
1023         instead of atomic_exchange_rel.
1024         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
1025         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
1026         file.
1027         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
1028         file.
1029         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
1030         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
1031         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
1032         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
1033         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
1034         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1035         New file.
1036         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1037         New file.
1038         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
1039         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
1040         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
1041         file.
1042         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
1043         file.
1044         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
1046 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
1048         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
1049         mutex initializers.
1051 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
1053         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
1054         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1055         THREAD_COPY_POINTER_GUARD): Define.
1056         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
1057         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
1059 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
1061         * version.c: Update copyright year.
1063 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1065         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
1066         .eh_frame section, use cfi_* directives.
1067         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
1069 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
1071         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
1072         now.
1074 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
1076         * sysdeps/pthread/sigaction.c: Removed.
1077         * sigaction.c: New file.
1078         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1080 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
1082         * Makefile (tests): Add tst-signal7.
1083         * tst-signal7.c: New file.
1085 2005-12-27  Roland McGrath  <roland@redhat.com>
1087         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1088         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1089         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1090         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1091         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1092         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1093         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1094         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1095         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1096         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1097         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1099 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
1101         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1102         and __prev field to pthread_mutex_t.
1103         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1104         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1105         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1106         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1107         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1108         to pthread_mutex_t.
1110 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
1112         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1113         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1114         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1115         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1116         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1117         and PTHREAD_MUTEXATTR_FLAG_BITS.
1118         * descr.h (struct pthread): Add robust_list field and define
1119         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1120         * pthread_mutexattr_getrobust.c: New file.
1121         * pthread_mutexattr_setrobust.c: New file.
1122         * pthread_mutex_consistent.c: New file.
1123         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1124         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1125         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1126         Adjust pthread_mutex_t initializers.
1127         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1128         field to pthread_mutex_t.
1129         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1130         and __prev field to pthread_mutex_t.
1131         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1132         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1133         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1134         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1135         * pthread_mutexattr_gettype.c: Likewise.
1136         * pthread_mutexattr_setpshared.c: Likewise.
1137         * pthread_mutexattr_settype.c: Likewise.
1138         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1139         Initialize mutex kind according to robust flag.
1140         * pthread_mutex_lock.c: Implement local robust mutex.
1141         * pthread_mutex_timedlock.c: Likewise.
1142         * pthread_mutex_trylock.c: Likewise.
1143         * pthread_mutex_unlock.c: Likewise.
1144         * pthread_create.c (start_thread): Mark robust mutexes which remained
1145         locked as dead.
1146         * tst-robust1.c: New file.
1147         * tst-robust2.c: New file.
1148         * tst-robust3.c: New file.
1149         * tst-robust4.c: New file.
1150         * tst-robust5.c: New file.
1151         * tst-robust6.c: New file.
1152         * tst-robust7.c: New file.
1153         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1154         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1155         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1156         tst-robust5, tst-robust6, and tst-robust7.
1158         * tst-typesizes.c: New file.
1159         * Makefile (tests): Add tst-typesizes.
1161         * tst-once3.c: More debug output.
1163 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
1165         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1166         missing after last change.
1168         * version.c: Update copyright year.
1170 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
1172         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1173         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1174         * pthread_mutex_trylock.c: Likewise.
1175         * pthread_mutex_timedlock.c: Likewise.
1176         * pthread_mutex_unlock.c: Likewise.
1178 2005-12-22  Roland McGrath  <roland@redhat.com>
1180         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1181         so that #include_next's search location is not reset to the -I..
1182         directory where <nptl/...> can be found.
1184 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
1186         [BZ #1913]
1187         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1188         Fix unwind info.  Remove useless branch prediction prefix.
1189         * tst-cancel24.cc: New file.
1190         * Makefile: Add rules to build and run tst-cancel24.
1192 2005-12-21  Roland McGrath  <roland@redhat.com>
1194         * libc-cancellation.c: Use <> rather than "" #includes.
1195         * pt-cleanup.c: Likewise.
1196         * pthread_create.c: Likewise.
1197         * pthread_join.c: Likewise.
1198         * pthread_timedjoin.c: Likewise.
1199         * pthread_tryjoin.c: Likewise.
1200         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1201         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1202         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1203         * unwind.c: Likewise.
1205 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1207         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1208         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1209         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1210         THREAD_COPY_POINTER_GUARD): Define.
1212 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
1214         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1215         rather than one.
1216         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1217         THREAD_COPY_POINTER_GUARD): Define.
1218         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1219         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1220         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1221         THREAD_COPY_POINTER_GUARD): Define.
1222         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1223         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1224         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1225         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1226         Use PTR_DEMANGLE for B0 if defined.
1228 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
1230         * pthread_create.c (__pthread_create_2_1): Use
1231         THREAD_COPY_POINTER_GUARD if available.
1232         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1233         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1234         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1235         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1236         * sysdeps/x86_64/tls.h: Likewise.
1238 2005-12-15  Roland McGrath  <roland@redhat.com>
1240         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1242 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1244         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1245         sysdeps/generic.
1246         * errno-loc.c: New file.
1248 2005-12-12  Roland McGrath  <roland@redhat.com>
1250         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1251         adjustments before choosing stack size.  Update minimum stack size
1252         calculation to match allocate_stack change.
1254 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1256         * allocatestack.c (allocate_stack): Don't demand that there is an
1257         additional full page available on the stack beside guard, TLS, the
1258         minimum stack.
1260 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1262         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1263         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1265         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1266         compiling 32-bit code we must define __cleanup_fct_attribute.
1268 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1270         [BZ #1920]
1271         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1272         __attribute__ instead of __attribute.
1273         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1274         (__cleanup_fct_attribute): Likewise.
1276 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1278         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1279         a write barrier before writing libgcc_s_getcfa.
1281 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1283         * sysdeps/unix/sysv/linux/configure: Removed.
1285 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1287         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1288         optional init_array/fini_array support.
1290 2005-10-24  Roland McGrath  <roland@redhat.com>
1292         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1293         versioned_symbol use.
1295 2005-10-16  Roland McGrath  <roland@redhat.com>
1297         * init.c (__pthread_initialize_minimal_internal): Even when using a
1298         compile-time default stack size, apply the minimum that allocate_stack
1299         will require, and round up to page size.
1301 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1303         * Makefile ($(test-modules)): Remove static pattern rule.
1305 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1306             Ulrich Drepper  <drepper@redhat.com>
1308         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1309         alignment in callback function.
1310         * Makefile: Add rules to build and run tst-align3.
1311         * tst-align3.c: New file.
1313 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1315         * allocatestack.c (setxid_signal_thread): Add
1316         INTERNAL_SYSCALL_DECL (err).
1318 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1320         * allocatestack.c (setxid_signal_thread): Need to use
1321         atomic_compare_and_exchange_bool_acq.
1323 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1324             Jakub Jelinek  <jakub@redhat.com>
1326         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1327         CANCEL_RESTMASK.
1328         (struct pthread): Move specific_used field to avoid padding.
1329         Add setxid_futex field.
1330         * init.c (sighandler_setxid): Reset setxid flag and release the
1331         setxid futex.
1332         * allocatestack.c (setxid_signal_thread): New function.  Broken
1333         out of the bodies of the two loops in __nptl_setxid.  For undetached
1334         threads check whether they are exiting and if yes, don't send a signal.
1335         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1336         * pthread_create.c (start_thread): For undetached threads, check
1337         whether setxid bit is set.  If yes, wait until signal has been
1338         processed.
1340         * allocatestack.c (STACK_VARIABLES): Initialize them.
1341         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1343 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1345         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1346         waiters, awake all waiters on the associated mutex.
1348 2005-09-22  Roland McGrath  <roland@redhat.com>
1350         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1351         ../sysdeps/x86_64/hp-timing.h).
1353 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1355         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1356         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1357         (lll_futex_wake_unlock): Define.
1358         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1359         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1360         (lll_futex_wake_unlock): Define.
1361         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1362         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1363         (lll_futex_wake_unlock): Define.
1364         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1365         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1366         (lll_futex_wake_unlock): Define.
1367         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1368         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1369         (lll_futex_wake_unlock): Define.
1370         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1371         lll_futex_wake_unlock.
1372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1373         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1374         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1376         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1377         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1379 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1381         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1382         Fix typo in register name.
1384 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1386         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1387         Use __sigfillset.  Document that sigfillset does the right thing wrt
1388         to SIGSETXID.
1390 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
1392         * tst-stackguard1.c (do_test): Likewise.
1394 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
1396         * tst-stackguard1.c (do_test): Don't fail if the poor man's
1397         randomization doesn't work well enough.
1399 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1401         [BZ #1102]
1402         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1403         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1404         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1405         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1406         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1407         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1408         in the structure.
1409         * Makefile (tests): Add tst-initializers1.
1410         (CFLAGS-tst-initializers1.c): Set.
1411         * tst-initializers1.c: New test.
1413 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1415         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1416         Make sure __flags are located at offset 48 from the start of the
1417         structure.
1419 2005-07-02  Roland McGrath  <roland@redhat.com>
1421         * Makeconfig: Comment fix.
1423 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1425         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1426         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1427         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1428         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1429         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1430         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1431         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1432         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1433         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1434         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1436 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1438         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1439         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1440         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1441         fields.
1442         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1443         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1444         field.  Put in sysinfo field unconditionally.
1445         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1446         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1447         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1448         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1449         fields.
1450         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1451         * pthread_create.c (__pthread_create_2_1): Use
1452         THREAD_COPY_STACK_GUARD macro.
1453         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1454         tests.
1455         * tst-stackguard1.c: New file.
1456         * tst-stackguard1-static.c: New file.
1458 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1460         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1461         Invoke CGOTSETUP and CGOTRESTORE.
1462         (CGOTSETUP, CGOTRESTORE): Define.
1464 2005-05-29  Richard Henderson  <rth@redhat.com>
1466         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1467         (tf_write, tf_writev): Use it.
1468         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1469         the system minimum.
1471 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1473         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1474         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1475         __librt_*_asynccancel@local.
1477 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1479         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1480         all occurrences of JUMPTARGET.  Instead append @local to labels.
1482 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1484         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1485         size/alignment of struct pthread rather than tcbhead_t.
1486         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1487         Likewise.
1488         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1489         Likewise.
1490         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1491         Likewise.
1493 2005-05-19  Richard Henderson  <rth@redhat.com>
1495         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1496         __sync_val_compare_and_swap, not explicit _si variant.
1497         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1499 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1501         [BZ #915]
1502         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1504 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1506         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1507         .eh_frame section, use cfi_* directives.
1509 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1511         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1512         of "" includes.
1514 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1516         [BZ #1075]
1517         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1518         aio_write blocks.
1520 2005-04-27  Roland McGrath  <roland@redhat.com>
1522         * Makefile (tests): Remove tst-clock2.
1524         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1525         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1526         translating to the kernel clockid_t for our own process/thread clock.
1528         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1530 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1532         * old_pthread_cond_init.c: Include <errno.h>.
1533         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1534         process shared or uses clock other than CLOCK_REALTIME.
1535         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1537 2005-04-13  David S. Miller  <davem@davemloft.net>
1539         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1540         * sysdeps/sparc/sparc64/clone.S: New file.
1542 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1544         [BZ #1102]
1545         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1546         __inline instead of inline.
1547         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1549 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1551         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1552         functionally equivalent, but shorter instructions.
1553         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1554         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1556         Likewise.
1557         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1559         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1560         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1561         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1562         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1563         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1564         Likewise.
1565         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1566         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1567         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1568         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1569         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1571 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1573         * sysdeps/mips/Makefile: New file.
1574         * sysdeps/mips/nptl-sysdep.S: New file.
1575         * sysdeps/mips/tcb-offsets.sym: New file.
1576         * sysdeps/mips/pthread_spin_lock.S: New file.
1577         * sysdeps/mips/pthread_spin_trylock.S: New file.
1578         * sysdeps/mips/pthreaddef.h: New file.
1579         * sysdeps/mips/tls.h: New file.
1580         * sysdeps/mips/jmpbuf-unwind.h: New file.
1581         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1582         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1583         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1584         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1585         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1586         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1587         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1588         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1589         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1590         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1592 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1594         [BZ #1112]
1595         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1596         variable to scerr.
1598 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1600         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1602 2005-02-25  Roland McGrath  <roland@redhat.com>
1604         * alloca_cutoff.c: Correct license text.
1605         * tst-unload.c: Likewise.
1606         * sysdeps/pthread/allocalim.h: Likewise.
1607         * sysdeps/pthread/pt-initfini.c: Likewise.
1608         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1609         * sysdeps/pthread/bits/sigthread.h: Likewise.
1610         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1611         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1613 2005-02-16  Roland McGrath  <roland@redhat.com>
1615         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1616         Use unsigned int * for ptr_nthreads.
1618 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1620         [BZ #721]
1621         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1622         gcc4.
1624 2005-02-07  Richard Henderson  <rth@redhat.com>
1626         [BZ #787]
1627         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1628         argument.
1630 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1632         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1633         order of arguments in invocation of atomic_add_zero.
1635 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1637         [BZ #737]
1638         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1639         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1640         at least gotntpoff relocation and addition.
1641         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1642         Likewise.
1643         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1644         Likewise.
1645         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1646         Likewise.
1648 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1650         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1651         entry for static tls deallocation fix.
1652         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1653         also contains information whether the memory pointed to is static
1654         TLS or not.
1655         * sysdeps/i386/tls.h: Likewise.
1656         * sysdeps/ia64/tls.h: Likewise.
1657         * sysdeps/powerpc/tls.h: Likewise.
1658         * sysdeps/s390/tls.h: Likewise.
1659         * sysdeps/sh/tls.h: Likewise.
1660         * sysdeps/sparc/tls.h: Likewise.
1661         * sysdeps/x86_64/tls.h: Likewise.
1663 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1665         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1667 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1669         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1670         %esp.
1671         * Makefile (tests): Add tst-align2.
1672         * tst-align2.c: New test.
1673         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1674         -mpreferred-stack-boundary=4.
1676 2004-12-18  Roland McGrath  <roland@redhat.com>
1678         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1679         New file removed withdrawn for the moment.
1681 2004-12-17  Richard Henderson  <rth@redhat.com>
1683         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1684         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1686 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1688         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1689         Increased PTHREAD_STACK_MIN.
1691         * tst-context1.c (stacks): Use bigger stack size.
1693 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1695         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1696         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1698 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1700         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1701         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1702         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1704 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1706         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1708 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1710         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1711         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1713         * tst-getpid1.c: If child crashes, report this first.  Print which
1714         signal.
1716 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1718         * init.c (__pthread_initialize_minimal_internal): Also unblock
1719         SIGSETXID.
1721 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1723         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1724         _POSIX_THREAD_CPUTIME): Define to 0.
1725         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1726         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1727         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1728         __timer_signal_thread_tclk): Remove.
1729         (init_module): Remove their initialization.
1730         (thread_cleanup): Remove their cleanup assertions.
1731         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1732         __timer_signal_thread_tclk): Remove.
1733         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1734         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1735         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1737 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1739         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1740         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1742         * Makefile (tests): Add tst-getpid2.
1743         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1744         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1745         * tst-getpid2.c: New test.
1747 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1749         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1751 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1753         * Makefile (tests): Add tst-getpid1.
1754         * tst-getpid1.c: New file.
1755         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1756         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1758 2004-12-02  Roland McGrath  <roland@redhat.com>
1760         * Makefile (libpthread-nonshared): Variable removed.
1761         ($(objpfx)libpthread_nonshared.a): Target removed.
1762         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1763         These are now handled by generic magic from
1764         libpthread-static-only-routines being set.
1766 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1768         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1769         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1770         _POSIX_THREAD_PRIO_PROTECT): Define.
1771         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1772         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1773         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1775 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1777         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1778         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1779         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1780         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1781         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1782         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1783         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1785 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1787         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1789         * Makefile (libpthread-routines): Add pthread_setschedprio.
1790         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1791         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1792         * pthread_setschedprio.c: New file.
1794 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1796         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1797         * pthread_cancel.c (pthread_create): Likewise.
1799         * Makefile (libpthread-routines): Add vars.
1800         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1801         * init.c (__default_stacksize, __is_smp): Remove.
1802         * vars.c: New file.
1803         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1804         and define a wrapper macro.
1805         (PTHREAD_STATIC_FN_REQUIRE): Define.
1806         * allocatestack.c (__find_thread_by_id): Undefine.
1807         * pthread_create (__pthread_keys): Remove.
1808         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1809         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1810         PTHREAD_STATIC_FN_REQUIRE.
1812 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1814         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1815         parameter to REGISTER macro.
1817 2004-11-17  Roland McGrath  <roland@redhat.com>
1819         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1820         Make sure SIGCANCEL is blocked as well.
1822 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1824         * sysdeps/pthread/setxid.h: New file.
1825         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1826         (struct xid_command): Add forward decl.
1827         (struct pthread_functions): Change return type of __nptl_setxid hook
1828         to int.
1829         * pthreadP.h (__nptl_setxid): Change return type to int.
1830         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1831         calling thread, return its return value and set errno on failure.
1832         * descr.h (struct xid_command): Change id type to long array.
1834         * Makefile: Add rules to build and test tst-setuid1 and
1835         tst-setuid1-static.
1836         * tst-setuid1.c: New test.
1837         * tst-setuid1-static.c: New test.
1839 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1841         * Makefile (tests): Add tst-exit3.
1842         * tst-exit3.c: New test.
1844 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1846         * Makefile (tests): Add tst-exit2.
1847         * tst-exit2.c: New file.
1849 2004-11-09  Roland McGrath  <roland@redhat.com>
1851         [BZ #530]
1852         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1853         here, before calling clone.
1854         * pthread_create.c (start_thread): Don't do it here.
1856 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1858         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1860 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1862         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1863         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1864         assembler warning.
1866 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1868         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1869         if sched_priority is not between minprio and maxprio.
1871 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1873         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1874         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1876         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1877         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1879 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1881         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1882         not-cancelable I/O functions.
1884 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1886         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1887         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1888         make sure 2 is stored in the futex and we looked at the old value.
1889         Fix a few other problems to return the correct value.
1891 2004-10-14  Richard Henderson  <rth@redhat.com>
1893         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1894         make gcc4 happy.
1896 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1898         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1899         of pthread-functions.h and pthreaddef.h.
1900         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1902         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1903         Change __data.__nwaiters from int to unsigned int.
1905         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1906         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1908         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1909         before return type.
1911         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1912         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1914 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1916         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1917         test fails, remove message queue.
1918         (tf_msgsnd): Likewise.
1920 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1922         * tst-clock1.c: Change #ifdef to #if defined.
1923         * tst-clock2.c: Likewise.
1924         * tst-cond11.c: Likewise.
1926         * sysdeps/pthread/timer_create.c (timer_create): Use
1927         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1928         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1929         THREAD_CPUTIME.
1931 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1933         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1934         _POSIX_THREAD_CPUTIME): Define to 0.
1936 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1938         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1939         and _POSIX_THREAD_CPUTIME to zero.
1940         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1941         * tst-barrier2.c: Fix testing for POSIX feature.
1942         * tst-clock1.c: Likewise.
1943         * tst-clock2.c: Likewise.
1944         * tst-cond11.c: Likewise.
1945         * tst-cond4.c: Likewise.
1946         * tst-cond6.c: Likewise.
1947         * tst-flock2.c: Likewise.
1948         * tst-mutex4.c: Likewise.
1949         * tst-mutex9.c: Likewise.
1950         * tst-rwlock12.c: Likewise.
1951         * tst-rwlock4.c: Likewise.
1952         * tst-signal1.c: Likewise.
1953         * tst-spin2.c: Likewise.
1954         * sysdeps/pthread/posix-timer.h: Likewise.
1955         * sysdeps/pthread/timer_create.c: Likewise.
1956         * sysdeps/pthread/timer_routines.c: Likewise.
1958 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1961         (__lll_mutex_timedlock_wait): Address futex correctly.
1963         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1964         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1965         make sure 2 is stored in the futex and we looked at the old value.
1966         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1967         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1968         which might very well made the code not working at all before.
1969         [BZ #417]
1971 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1973         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1974         allow SIGSETXID to be sent.
1975         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1976         for SIGSETXID to be defined.
1977         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1978         SIGSETXID cannot be blocked.
1980         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1981         Add __extension__ to long long types.
1982         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1983         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1984         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1985         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1986         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1987         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1988         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1990 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1992         * descr.h (struct pthread): Add stopped_start field.
1993         * sysdeps/pthread/createthread.c (create_thread): Set
1994         start_stopped flag in descriptor for new thread appropriately.
1995         * pthread_create.c (start_thread): Only take lock to be stopped on
1996         startup if stopped_start flag says so.
1998 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
2000         * pthread_create.c (__pthread_create_2_1): Remember whether thread
2001         is created detached and if yes, do not try to free the stack in case
2002         the thread creation failed.
2003         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
2004         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
2005         case there has been no error.  [BZ #405]
2007         * pthread_create.c (start_thread): Don't wait for scheduler data
2008         etc to be set at the beginning of the function.  The cancellation
2009         infrastructure must have been set up.  And enable async
2010         cancellation before potentially going to sleep.  [BZ #401]
2012 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
2014         * Versions: Remove exports for pthread_set*id_np functions.
2015         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
2016         for now.
2017         * Makefile: Don't build pthread_set*id code for now.
2019 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
2021         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
2022         internal use.
2023         * allocatestack.c (__nptl_setxid): New function.
2024         * descr.h (struct xid_command): Define type.
2025         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
2026         (sighandler_setxid): New function.
2027         (__pthread_initialize_minimal): Register sighandler_setxid for
2028         SIGCANCEL.
2029         * pt-allocrtsig.c: Update comment.
2030         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
2031         Declare __nptl_setxid.
2032         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
2033         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
2034         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2035         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2036         and pthread_setresuid_np.
2037         * pthread_setgid_np.c: New file.
2038         * pthread_setuid_np.c: New file.
2039         * pthread_setegid_np.c: New file.
2040         * pthread_seteuid_np.c: New file.
2041         * pthread_setregid_np.c: New file.
2042         * pthread_setreuid_np.c: New file.
2043         * pthread_setresgid_np.c: New file.
2044         * pthread_setresuid_np.c: New file.
2045         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
2046         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2047         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2048         and pthread_setresuid_np.
2049         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
2050         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
2051         pthread_setregid, and pthread_setresgid.
2053 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
2055         * allocatestack.c (allocate_stack): Return EAGAIN instead of
2056         ENOMEM when out of memory.
2058 2004-09-10  Roland McGrath  <roland@redhat.com>
2060         [BZ #379]
2061         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
2062         code, since we don't try to use the broken CLONE_STOPPED any more.
2063         * pthread_create.c (start_thread): Likewise.
2065 2004-09-15  Richard Henderson  <rth@redhat.com>
2067         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
2069 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
2071         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
2072         (__libc_unwind_longjmp): Delete macro and declare as function.
2073         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
2074         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
2075         nptl directory.
2076         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
2077         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
2078         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
2080 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
2082         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
2083         for __USE_XOPEN2K.
2084         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
2085         types also for __USE_XOPEN2K.
2086         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2087         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2088         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2089         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2090         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2091         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2092         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2093         [BZ #320]
2095 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
2097         * sysdeps/pthread/pthread.h
2098         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2099         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2100         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2101         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2102         [BZ #375]
2104 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
2106         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2107         PSEUDO to be used with . prefix.
2109         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2110         Use atomic_increment instead of atomic_exchange_and_add.
2111         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2112         Likewise.
2113         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2114         Likewise.
2115         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2116         Likewise.
2118         * allocatestack.c (allocate_stack): Use atomic_increment_val
2119         instead of atomic_exchange_and_add.
2120         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2121         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2122         Likewise.
2123         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2124         Likewise.
2126         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2127         the initialization function might throw.
2129 2005-09-05  Richard Henderson  <rth@redhat.com>
2131         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2132         Move definition inside libpthread, libc, librt check.  Provide
2133         definition for rtld.
2135 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2137         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2138         waiters, awake all waiters on the associated mutex.
2140 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
2142         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2143         * sysdeps/i386/jmpbuf-unwind.h: Likewise
2144         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2145         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2146         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2147         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2148         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2149         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2150         * unwind.c: Use it.
2152         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2153         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2154         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2155         Likewise.
2156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2157         Decrement __nwaiters.  If pthread_cond_destroy has been called and
2158         this is the last waiter, signal pthread_cond_destroy caller and
2159         avoid using the pthread_cond_t structure after unlock.
2160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2161         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2162         Read clock type from the least significant bits of __nwaiters instead
2163         of __clock.
2164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2165         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2167 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
2169         [BZ #342]
2170         * Makefile (tests): Add tst-cond20 and tst-cond21.
2171         * tst-cond20.c: New test.
2172         * tst-cond21.c: New test.
2173         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2174         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2175         it unsigned int.
2176         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2177         Likewise.
2178         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2179         (pthread_cond_t): Likewise.
2180         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2181         Likewise.
2182         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2183         Likewise.
2184         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2185         Likewise.
2186         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2187         (cond_nwaiters): New.
2188         (clock_bits): New.
2189         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2190         if there are waiters not signalled yet.
2191         Wait until all already signalled waiters wake up.
2192         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2193         __nwaiters.  If pthread_cond_destroy has been called and this is the
2194         last waiter, signal pthread_cond_destroy caller and avoid using
2195         the pthread_cond_t structure after unlock.
2196         (__pthread_cond_wait): Increment __nwaiters in the beginning,
2197         decrement it when leaving.  If pthread_cond_destroy has been called
2198         and this is the last waiter, signal pthread_cond_destroy caller.
2199         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2200         Likewise.  Read clock type from the least significant bits of
2201         __nwaiters instead of __clock.
2202         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2203         whether clock ID can be encoded in COND_CLOCK_BITS bits.
2204         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2205         clock type just from the last COND_CLOCK_BITS bits of value.
2206         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2207         instead of __clock, just from second bit of condattr's value.
2209 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
2211         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2212         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
2213         != 64.
2214         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2216 2004-08-15  Roland McGrath  <roland@frob.com>
2218         * pthread_atfork.c: Update copyright terms including special exception
2219         for these trivial files, which are statically linked into executables
2220         that use dynamic linking for the significant library code.
2222 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
2224         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2225         pthread_rwlock_rdlock.
2226         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2227         Decrease __nr_readers_queued after reacquiring lock.
2228         * sysdeps/pthread/pthread_rwlock_timedrdlock
2229         (pthread_rwlock_timedrdlock): Likewise.
2230         Reported by Bob Cook <bobcook47@hotmail.com>.
2232 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
2234         * tst-rwlock14.c (tf): Read main thread handle from *ARG
2235         before pthread_barrier_wait.
2237 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
2239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2240         Remove unnecessary exception handling data.
2242 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
2244         [BZ #284]
2245         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2246         instead of clockid_t.
2248 2004-07-21  Roland McGrath  <roland@redhat.com>
2250         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2252 2004-07-19  Roland McGrath  <roland@redhat.com>
2254         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2256 2004-07-02  Roland McGrath  <roland@redhat.com>
2258         * configure: Don't exit.
2260 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2262         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2263         (__pthread_cond_timedwait): Check for invalid nanosecond in
2264         timeout value.
2266 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2268         * Makefile: Add rules to build and run tst-fini1.
2269         * tst-fini1.c: New file.
2270         * tst-fini1mod.c: New file.
2272 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2274         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2275         if no cancellation support is needed.
2276         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2277         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2278         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2279         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2280         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2281         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2282         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2283         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2284         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2286         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2287         only if not already defined.
2289 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2291         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2292         constraint "m" instead of "0" for futex.
2294         * shlib-versions: Add powerpc64-.*-linux.*.
2296 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2299         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2300         for valid tv_nsec.
2301         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2302         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2303         bits.
2305 2004-06-29  Roland McGrath  <roland@redhat.com>
2307         * Banner: NPTL no longer has its own version number.
2308         * Makefile (nptl-version): Variable removed.
2309         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2310         using $(version), the glibc version number.
2312 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2314         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2315         Fix branch offset for a PLT entry.
2316         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2317         Likewise.
2318         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2319         Likewise.
2320         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2321         Likewise.
2322         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2323         Likewise.
2325 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2327         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2328         unconditionally.
2330 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2332         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2333         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2334         instead of tv_sec.
2335         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2336         (pthread_rwlock_timedrdlock): Likewise.
2338 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2340         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2341         Set __r7 to val, not mutex.
2343 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2345         * Makefile: Add rules to build tst-rwlock14.
2346         * tst-rwlock14.c: New file.
2348 2004-06-24  Boris Hu  <boris.hu@intel.com>
2350         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2351         check.
2352         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2354 2004-06-19  Andreas Jaeger  <aj@suse.de>
2356         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2357         assembler in last patch.
2359 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2361         * sysdeps/pthread/pthread_cond_timedwait.c
2362         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2363         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2364         (__pthread_cond_timedwait): Check for invalid nanosecond in
2365         timeout value.
2366         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2367         * tst-cond19.c: New file.
2368         * Makefile: Add rules to build and run tst-cond19.
2370 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2372         * tst-context1.c (GUARD_PATTERN): Defined.
2373         (tst_context_t): Define struct containing ucontext_t & guard words.
2374         (ctx): Declare as an array of tst_context_t.
2375         (fct): Verify uc_link & guard words are still valid.
2376         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2378 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2380         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2381         Add __data.__futex field, reshuffle __data.__clock.
2382         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2383         (__pthread_cond_signal): Increment __futex at the same time as
2384         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2385         address of low 32-bits of __wakeup_seq to futex syscall.
2386         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2387         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2388         releasing internal lock to FUTEX_WAIT.
2389         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2390         (__pthread_cond_timedwait): Likewise.
2391         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2392         (FUTEX_CMP_REQUEUE): Define.
2393         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2394         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2395         Pass __futex value from before the unlock and __futex address instead
2396         of address of low 32-bits of __wakeup_seq to futex syscall.
2397         Fallback to FUTEX_WAKE all on any errors.
2399 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2401         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2402         comment typo.
2403         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2404         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2405         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2406         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2407         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2409 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2411         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2412         Add memory clobber to inline assembly.
2413         (__lll_mutex_trylock): Likewise.
2414         (__lll_mutex_cond_trylock): Likewise.
2416 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2418         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2419         Pass val argument as 6th system call argument in %r7.
2421 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2423         * Makefile (tests): Add tst-cond16.
2424         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2425         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2426         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2427         Add __data.__futex field, reshuffle __data.__clock.
2428         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2429         (__pthread_cond_signal): Increment __futex at the same time as
2430         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2431         address of low 32-bits of __wakeup_seq to futex syscall.
2432         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2433         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2434         releasing internal lock to FUTEX_WAIT.
2435         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2436         (__pthread_cond_timedwait): Likewise.
2437         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2438         (FUTEX_CMP_REQUEUE): Define.
2439         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2440         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2441         Pass __futex value from before the unlock and __futex address instead
2442         of address of low 32-bits of __wakeup_seq to futex syscall.
2443         Fallback to FUTEX_WAKE all on any errors.
2444         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2445         Define.
2446         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2447         internally.  Return non-zero if error, zero if success.
2448         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2449         Add __data.__futex field, reshuffle __data.__clock.
2450         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2451         Define.
2452         (lll_futex_requeue): Add val argument, return 1 unconditionally
2453         for the time being.
2454         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2455         Add __data.__futex field, reshuffle __data.__clock.
2456         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2457         Define.
2458         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2459         internally.  Return non-zero if error, zero if success.
2460         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2461         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2462         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2463         Define.
2464         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2465         internally.  Return non-zero if error, zero if success.
2466         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2467         Add __data.__futex field, reshuffle __data.__clock.
2468         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2469         Define.
2470         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2471         internally.  Return non-zero if error, zero if success.
2472         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2473         Add __data.__futex field, reshuffle __data.__clock.
2474         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2475         Add __data.__futex field, reshuffle __data.__clock.
2476         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2477         Increment __futex at the same time as __wakeup_seq or __total_seq.
2478         Pass address of __futex instead of address of low 32-bits of
2479         __wakeup_seq to futex syscall.
2480         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2481         Pass __futex value from before releasing internal lock
2482         to FUTEX_WAIT.
2483         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2484         Likewise.  Avoid unnecessary shadowing of variables.
2485         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2486         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2487         unlock and __futex address instead of address of low 32-bits of
2488         __wakeup_seq to futex_requeue macro, adjust for new return value
2489         meaning.
2490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2491         (__pthread_cond_signal): Increment __futex at the same time as
2492         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2493         address of low 32-bits of __wakeup_seq to futex syscall.
2494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2495         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2496         releasing internal lock to FUTEX_WAIT.
2497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2498         (__pthread_cond_timedwait): Likewise.
2499         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2500         (FUTEX_CMP_REQUEUE): Define.
2501         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2502         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2503         Pass __futex value from before the unlock and __futex address instead
2504         of address of low 32-bits of __wakeup_seq to futex syscall.
2505         Fallback to FUTEX_WAKE all on any errors.
2507 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2509         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2510         Add nop to align the end of critical section.
2511         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2513 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2515         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2516         Add __broadcast_seq field.
2517         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2518         all waiters as woken with woken_seq and bump broadcast counter.
2519         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2520         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2521         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2522         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2524 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2526         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2527         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2528         Reported by Kaz Kojima.
2530 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2532         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2534 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2536         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2537         __broadcast_seq with bc_seq after acquiring internal lock instead of
2538         before it.
2540 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2542         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2543         compilation.
2544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2545         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2546         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2547         (pthread_cond_t): Add __data.__broadcast_seq field.
2548         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2549         (FRAME_SIZE): Define.
2550         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2551         Comment typo fixes.
2552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2553         Define.
2554         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2555         typo fixes.
2556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2557         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2558         fixes.
2560 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2562         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2563         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2564         Add __broadcast_seq field.
2565         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2566         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2567         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2568         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2569         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2571         all waiters as woken with woken_seq and bump broadcast counter.
2572         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2573         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2574         __broadcast_seq field.
2575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2576         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2577         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2578         * pthread_cond_init.c: Initialize __broadcast_seq field.
2579         * Makefile (tests): Add tst-cond17 and tst-cond18.
2580         Add .NOTPARALLEL goal.
2581         * tst-cond16.c: New file.  From Jakub.
2582         * tst-cond17.c: New file.  From Jakub.
2583         * tst-cond18.c: New file.  From Jakub.
2585 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2587         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2588         unwind info.
2590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2591         Parametrize frame size.  Correct some unwind info.
2592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2594 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2596         * tst-stack3.c: Note testing functionality beyond POSIX.
2598 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2600         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2601         Change conditional from ifdef to if.
2603 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2605         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2606         SYSDEP_CANCEL_ERROR): Define.
2607         (PSEUDO): Use it.
2609 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2611         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2613 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2615         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2617 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2619         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2620         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2621         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2622         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2624 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2626         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2627         thread has all signals blocked.
2629 2004-04-18  Andreas Jaeger  <aj@suse.de>
2631         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2632         (SEM_VALUE_MAX): Add missing brace.
2634 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2636         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2637         in rt subdir.
2638         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2639         * sysdeps/pthread/tst-mqueue8x.c: New test.
2640         * tst-cancel4.c: Update comment about message queues.
2642         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2643         return it_value { 0, 0 }.
2644         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2645         like SIGEV_SIGNAL.
2646         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2647         assertion for SIGEV_NONE.
2648         (thread_attr_compare): Compare all attributes, not just a partial
2649         subset.
2651 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2653         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2655 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2657         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2658         Just use a plain number.
2659         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2660         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2661         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2662         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2663         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2664         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2665         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2667 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2669         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2670         frame info.
2671         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2673 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2675         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2676         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2677         of calling sigwaitinfo.
2679 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2681         * allocatestack.c (allocate_stack): Set reported_guardsize
2682         unconditionally.
2683         * pthread_getattr_np.c (pthread_getattr_np): Use
2684         reported_guardsize instead of guardsize.
2685         * descr.h (struct pthread): Add reported_guardsize field.
2687 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2689         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2691 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2693         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2695 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2697         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2698         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2699         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2700         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2701         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2702         Define.
2703         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2704         (_POSIX_MESSAGE_PASSING): Define.
2705         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2706         (_POSIX_MESSAGE_PASSING): Define.
2707         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2708         (_POSIX_MESSAGE_PASSING): Define.
2710 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2712         * tst-context1.c (fct): Check whether correct stack is used.
2714 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2716         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2717         matching constraints for asm mem parameters.
2719         * tst-clock2.c (tf): Don't define unless needed.
2721 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2723         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2724         $(gnulib).
2726 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2728         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2729         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2730         * pthreadP.h: Declare __nptl_deallocate_tsd.
2731         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2732         Adjust caller.
2734         * Makefile (tests): Add tst-tsd5.
2735         * tst-tsd5.c: New file.
2737 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2739         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2740         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2741         is SHLIB_COMPAT check.
2742         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2743         (__pthread_attr_getaffinity_old): Likewise.
2744         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2745         (__pthread_getaffinity_old): Likewise.
2746         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2747         (__pthread_setaffinity_old): Likewise.
2749 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2751         * allocatestack.c (_make_stacks_executable): Call
2752         _dl_make_stack_executable first.
2754 2004-03-24  Roland McGrath  <roland@redhat.com>
2756         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2757         constraint instead of "0".
2759 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2761         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2762         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2764         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2765         code to avoid warning.
2767 2004-03-24  Andreas Jaeger  <aj@suse.de>
2769         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2770         (__pthread_attr_setaffinity_old): Remove const.
2772 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2774         * sysdeps/unix/sysv/linux/smp.h: New file.
2775         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2776         * init.c: Define __is_smp.
2777         (__pthread_initialize_minimal_internal): Call is_smp_system to
2778         initialize __is_smp.
2779         * pthreadP.h: Declare __is_smp.
2780         Define MAX_ADAPTIVE_COUNT is necessary.
2781         * pthread_mutex_init.c: Add comment regarding __spins field.
2782         * pthread_mutex_lock.c: Implement adaptive mutex type.
2783         * pthread_mutex_timedlock.c: Likewise.
2784         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2785         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2786         Add __spins field.
2787         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2788         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2789         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2790         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2791         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2792         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2793         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2794         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2795         lll_mutex_cond_trylock.
2796         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2797         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2798         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2799         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2800         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2801         Define BUSY_WAIT_NOP.
2802         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2803         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2805         * tst-mutex5.c: Add support for testing adaptive mutexes.
2806         * tst-mutex7.c: Likewise.
2807         * tst-mutex5a.c: New file.
2808         * tst-mutex7a.c: New file.
2809         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2811         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2812         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2813         vgettimeofday call might destroy the content.
2815         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2816         @pause in the loop.
2818         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2819         No need to restrict type of ret.  Make it int.  Add comment.
2821         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2822         Remove unnecessary setne instruction.
2824 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2826         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2827         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2828         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2829         If realloc fails, break out of the loop.
2831 2004-03-20  Andreas Jaeger  <aj@suse.de>
2833         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2834         (__pthread_setaffinity_old): Fix interface.
2835         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2836         (__pthread_getaffinity_old): Likewise.
2838         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2839         (__pthread_setaffinity_new): Remove duplicate declaration.
2841 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2843         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2844         the return value to a safe register.
2845         (CDISABLE): Set the function argument correctly.
2847 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2849         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2850         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2851         Rewrite so that only one locked memory operation per round is needed.
2852         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2853         (pthread_barrier_wait): After wakeup, release lock only when the
2854         last thread stopped using the barrier object.
2855         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2856         (__pthread_cond_wait): Don't store mutex address if the current
2857         value is ~0l.  Add correct cleanup support and unwind info.
2858         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2859         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2860         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2861         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2862         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2863         Add correct cleanup support and unwind info.
2864         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2865         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2866         information for syscall wrappers.
2868 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2870         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2871         cpusetsize field, remove next.
2872         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2873         parameter for size of the CPU set.
2874         (pthread_setaffinity_np): Likewise.
2875         (pthread_attr_getaffinity_np): Likewise.
2876         (pthread_attr_setaffinity_np): Likewise.
2877         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2878         interface change, keep compatibility code.
2879         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2880         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2881         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2882         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2883         __pthread_getaffinity_np.
2884         * Versions: Add version for changed interfaces.
2885         * tst-attr3.c: Adjust test for interface change.
2886         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2887         increasing buffer sizes.
2888         * pthread_attr_destroy.c: Remove unused list handling.
2889         * pthread_attr_init.c: Likewise.
2891 2004-03-17  Roland McGrath  <roland@redhat.com>
2893         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2894         first argument to clock_getres so we ever enable kernel timers.
2896 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2898         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2900 2004-03-12  Richard Henderson  <rth@redhat.com>
2902         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2903         oldvalue from CENABLE to CDISABLE.
2905 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2907         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2908         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2909         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2910         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2912 2004-03-11  Richard Henderson  <rth@redhat.com>
2914         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2915         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2916         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2918 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2920         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2921         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2922         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2924 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2926         * forward.c (__pthread_cond_broadcast_2_0,
2927         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2928         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2929         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2931 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2933         * sysdeps/sh/tcb-offsets.sym: Add PID.
2934         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2935         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2937 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2939         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2940         include <sysdep-cancel.h>, vfork is no cancellation point.
2941         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2942         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2943         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2945 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2947         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2948         libc_hidden_def.
2949         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2950         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2951         Likewise.
2952         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2953         Likewise.
2954         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2955         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2956         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2957         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2958         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2960         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2961         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2962         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2963         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2964         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2965         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2967         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2968         a local register for saving old PID.  Negate PID in parent upon exit.
2970         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2971         tcb-offsets.h.
2972         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2973         before syscall, set to the old value in the parent afterwards.
2974         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2975         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2976         tcb-offsets.h.
2977         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2978         before syscall, set to the old value in the parent afterwards.
2979         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2980         * sysdeps/s390/tcb-offsets.sym: Add PID.
2982         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2983         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2984         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2985         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2986         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2987         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2989 2004-03-10  Andreas Schwab  <schwab@suse.de>
2991         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2992         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2993         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2995 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2997         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2998         * tst-cancel21.c (do_one_test): Likewise.
2999         Reported by Gordon Jin <gordon.jin@intel.com>.
3001 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
3003         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
3004         if non-zero and set to INT_MIN if zero.
3005         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
3006         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
3007         (SAVE_PID, RESTORE_PID): Define.
3008         (__vfork): Use it.
3009         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
3010         Use relative path to avoid including NPTL i386/vfork.S.
3011         (SAVE_PID, RESTORE_PID): Define.
3012         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
3013         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
3014         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
3015         tst-vfork2x.
3016         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
3017         * tst-vfork1.c: New test.
3018         * tst-vfork2.c: New test.
3019         * tst-vfork1x.c: New test.
3020         * tst-vfork2x.c: New test.
3022 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
3024         * sysdeps/i386/tcb-offsets.sym: Add PID.
3025         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3026         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
3027         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
3029 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
3031         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
3033 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3035         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3036         _rtld_global_ro.
3038 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
3040         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3041         _rtld_global_ro.
3043         * tst-once4.c: Remove unnecessary macro definition.
3045         * tst-mutex7.c (do_test): Limit thread stack size.
3046         * tst-once2.c (do_test): Likewise.
3047         * tst-tls3.c (do_test): Likewise.
3048         * tst-tls1.c (do_test): Likewise.
3049         * tst-signal3.c (do_test): Likewise.
3050         * tst-kill6.c (do_test): Likewise.
3051         * tst-key4.c (do_test): Likewise.
3052         * tst-join4.c (do_test): Likewise.
3053         * tst-fork1.c (do_test): Likewise.
3054         * tst-context1.c (do_test): Likewise.
3055         * tst-cond2.c (do_test): Likewise.
3056         * tst-cond10.c (do_test): Likewise.
3057         * tst-clock2.c (do_test): Likewise.
3058         * tst-cancel10.c (do_test): Likewise.
3059         * tst-basic2.c (do_test): Likewise.
3060         * tst-barrier4.c (do_test): Likewise.
3062 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
3064         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
3066 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
3068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3069         (__pthread_cond_timedwait): Optimize wakeup test.
3070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3071         (__pthread_cond_wait): Likewise.
3072         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3073         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3074         Likewise.
3076 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
3078         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3079         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
3080         the atomic instruction needed.
3081         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3082         (__lll_mutex_lock_wait): Likewise.
3084 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
3086         * Makefile (tests): Add tst-cond14 and tst-cond15.
3087         * tst-cond14.c: New file.
3088         * tst-cond15.c: New file.
3090 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
3092         * sysdeps/pthread/createthread.c (create_thread): Remove use of
3093         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
3094         needs to be implemented differently to be useful.
3096 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
3098         * pthread_attr_setschedparam.c: Don't test priority against limits
3099         here.  Set ATTR_FLAG_SCHED_SET flag.
3100         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3101         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3102         from parent thread to child.  If attribute is used and scheduling
3103         parameters are not inherited, copy parameters from attribute or
3104         compute them.  Check priority value.
3105         * pthread_getschedparam.c: If the parameters aren't known yet get
3106         them from the kernel.
3107         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3108         ATTR_FLAG_POLICY_SET flag for thread.
3109         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3110         and ATTR_FLAG_POLICY_SET.
3112         * sysdeps/pthread/createthread.c: Use tgkill if possible.
3114         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3115         fail if stack address hasn't been set.  Just return 0.
3117 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
3119         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
3120         libpthread for the files in this list.
3121         (CFLAGS-tst-unload): Removed.
3122         * tst-unload.c (do_test): Don't use complete path for
3123         LIBPHREAD_SO.
3125         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3126         tst-_res1mod2.
3128 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
3130         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3131         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3132         operation per round is needed.
3133         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3134         (__lll_mutex_lock_wait): Likewise.
3136 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
3138         * tst-cancel9.c (cleanup): Don't print to stderr.
3140 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3142         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3144 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
3146         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3147         (__syscall_error_handler2): Call CDISABLE.
3148         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3149         (__syscall_error_handler2): Call CDISABLE.
3151         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3152         Release lock before the loop, don't reacquire it.
3154         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3156 2004-02-19  Andreas Schwab  <schwab@suse.de>
3158         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3159         Fix last change.
3161 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
3163         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3164         (pthread_barrier_wait): After wakeup, release lock only when the
3165         last thread stopped using the barrier object.
3166         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3167         (pthread_barrier_wait): Likewise.
3168         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3169         Likewise.
3170         * Makefile (tests): Add tst-barrier4.
3171         * tst-barrier4.c: New file.
3173         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3174         (__pthread_cond_timedwait): Perform timeout test while holding
3175         internal lock to prevent wakeup race.
3176         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3177         * sysdeps/pthread/pthread_cond_timedwait.c
3178         (__pthread_cond_timedwait): Likewise.
3179         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3180         (__pthread_cond_timedwait): Likewise.
3182 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
3184         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3185         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3186         * Makefile (tests): Add tst-rwlock13.
3187         * tst-rwlock13.c: New test.
3189 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
3191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3192         (__condvar_tw_cleanup): Little optimization.
3193         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3195 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
3197         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3198         libpthread as "lib" parameter to SHLIB_COMPAT.
3199         (__novmx_siglongjmp): Fix typo in function name.
3200         (__novmx_longjmp): Fix typo in function name.
3202 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3204         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3205         __builtin_expect.
3207         * sysdeps/generic/pt-longjmp.c: Moved to...
3208         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
3210 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
3212         * Makefile (libpthread-routines): Add pt-cleanup.
3213         * pt-longjmp.c: Removed.
3214         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3215         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3216         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3217         Version longjmp, siglongjmp for GLIBC_2.3.4.
3218         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3220 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3222         * sysdeps/pthread/pthread_cond_timedwait.c
3223         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
3224         Reuse code.  Add __builtin_expects.
3226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3227         (__pthread_cond_timedwait): Get internal lock in case timeout has
3228         passed before the futex syscall.
3229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3231 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
3233         * allocatestack.c: Pretty printing.
3235         * sysdeps/pthread/createthread.c (create_thread): Don't add
3236         CLONE_DETACHED bit if it is not necessary.
3238 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
3240         * pthread_getattr_np.c: Include ldsodefs.h.
3242 2004-01-16  Richard Henderson  <rth@redhat.com>
3244         * allocatestack.c: Don't declare __libc_stack_end.
3245         * init.c (__pthread_initialize_minimal_internal): Likewise.
3246         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3248 2004-01-15  Richard Henderson  <rth@redhat.com>
3250         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3251         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3252         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3253         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3254         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3255         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3256         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3257         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3259 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3261         * init.c (pthread_functions): Make array const.
3263 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3265         * allocatestack.c (__make_stacks_executable): Change interface.
3266         Check parameters.  Pass parameter on to libc counterpart.
3267         * pthreadP.h: Change declaration.
3269 2004-01-13  Richard Henderson  <rth@redhat.com>
3271         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3272         prototype form.
3273         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3274         Likewise.
3276         * sysdeps/alpha/Makefile: New file.
3277         * sysdeps/alpha/tcb-offsets.sym: New file.
3278         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3279         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3281         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3282         on powerpc version.
3284 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3286         * Makefile (tests): Add tst-backtrace1.
3287         * tst-backtrace1.c: New test.
3289 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3291         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3292         register as second parameter to the REGISTER macro.
3293         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3294         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3295         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3296         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3297         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3298         of thread register as second parameter to REGISTER macro in 64 case.
3300 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3302         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3303         (CFLAGS-getpid.o): Defined.
3304         (CFLAGS-getpid.os): Defined.
3306 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3308         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3309         returned for main thread does not overlap with any other VMA.
3310         Patch by Jakub Jelinek.
3312 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3314         * tst-raise1.c: Include stdio.h.
3316 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3318         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3319         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3320         If pid is 0, set it to selftid.
3321         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3322         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3323         != 0, return self->tid without doing a syscall.
3324         * descr.h (struct pthread): Move pid field after tid.
3326         * Makefile (tests): Add tst-raise1.
3327         * tst-raise1.c: New file.
3329 2003-12-23  Roland McGrath  <roland@redhat.com>
3331         * tst-oddstacklimit.c: New file.
3332         * Makefile (tests): Add it.
3333         (tst-oddstacklimit-ENV): New variable.
3335         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3336         value up to page size for __default_stacksize.
3338 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3340         * Makefile (tests): Add tst-eintr5.
3341         * tst-eintr5.c: New file.
3343         * eintr.c (eintr_source): Prevent sending signal to self.
3345         * tst-eintr2.c (tf1): Improve error message.
3347 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3349         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3350         * sysdeps/unix/sysv/linux/getpid.c: New file.
3351         * pthread_cancel.c: Add comment explaining use of PID field.
3352         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3353         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3354         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3355         temporarily to signal the field must not be relied on and updated
3356         by getpid().
3357         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3358         temporarily negative.
3359         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3361 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3363         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3364         (eintr_source): If ARG != NULL, use pthread_kill.
3365         * tst-eintr1.c: Adjust for this change.
3366         * tst-eintr2.c: Likewise.
3367         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3368         * tst-eintr3.c: New file.
3369         * tst-eintr4.c: New file.
3371 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3373         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3374         if CANCELSTATE_BITMASK is set.
3375         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3376         Likewise.
3378         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3379         (tests-reverse): Add tst-cancel23.
3380         * tst-cancel22.c: New test.
3381         * tst-cancel23.c: New test.
3383 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3385         * tst-eintr1.c: Better error messages.
3387         * Makefile (tests): Add tst-eintr2.
3388         * tst-eintr2.c: New file.
3390 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3392         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3393         (CFLAGS-tst-cancelx21.c): Set.
3394         * tst-cancel21.c: New test.
3395         * tst-cancelx21.c: New test.
3397         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3398         comparison operand.
3399         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3400         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3401         * pt-longjmp.c: Include jmpbuf-unwind.h.
3402         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3403         _JMPBUF_UNWINDS.  Adjust compared pointers.
3404         * init.c (__pthread_initialize_minimal_internal): Initialize
3405         pd->stackblock_size.
3406         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3407         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3408         * sysdeps/i386/jmpbuf-unwind.h: New file.
3409         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3410         * sysdeps/s390/jmpbuf-unwind.h: New file.
3411         * sysdeps/sh/jmpbuf-unwind.h: New file.
3412         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3413         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3414         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3415         (_JMPBUF_CFA_UNWINDS): Remove.
3416         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3418 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3420         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3421         (CFLAGS-tst-cancelx20.c): Set.
3422         * tst-cancel20.c: New test.
3423         * tst-cancelx20.c: New test.
3425 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3427         * init.c (__pthread_initialize_minimal_internal): Don't treat
3428         architectures with separate register stack special here when
3429         computing default stack size.
3431 2003-12-17  Roland McGrath  <roland@redhat.com>
3433         * Makefile (tst-cancelx7-ARGS): New variable.
3434         Reportd by Greg Schafer <gschafer@zip.com.au>.
3436 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3438         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3439         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3440         (tst-stack3-ENV): Set.
3441         ($(objpfx)tst-stack3-mem): New.
3442         * tst-stack3.c: New test.
3444 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3446         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3447         Add unwind directives.  Drop unused .regstk directive.
3448         (_fini_EPILOG_BEGINS): Add unwind directives.
3450 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3452         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3453         Assume parameter is a pointer.
3454         (lll_futex_wake): Likewise.
3455         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3456         Likewise.
3457         (lll_futex_wake): Likewise.
3458         Reported by Boris Hu.
3459         * sysdeps/unix/sysv/linux/unregister-atfork.c
3460         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3462         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3464 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3466         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3467         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3468         __rtld_lock_initialize for ld.so lock.
3469         Patch in part by Adam Li <adam.li@intel.com>.
3471 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3473         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3474         in $(gnulib).  Also, remove stale comment.
3476 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3478         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3479         advantage of new syscall stub and optimize accordingly.
3481         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3482         from SYS_futex, to match expectations of
3483         sysdep.h:DO_INLINE_SYSCALL.
3484         (lll_futex_clobbers): Remove.
3485         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3486         (lll_futex_wake): Likewise.
3487         (lll_futex_requeue): Likewise.
3488         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3489         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3490         Jelinek).
3491         (__lll_mutex_lock): Likewise.
3492         (__lll_mutex_cond_lock): Likewise.
3493         (__lll_mutex_timed_lock): Likewise.
3494         (__lll_mutex_unlock): Likewise.
3495         (__lll_mutex_unlock_force): Likewise.
3497         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3498         comes before the include of <sysdep.h>.
3499         (THREAD_SELF_SYSINFO): New macro.
3500         (THREAD_SYSINFO): Likewise.
3501         (INIT_SYSINFO): New macro.
3502         (TLS_INIT_TP): Call INIT_SYSINFO.
3504         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3506         * sysdeps/pthread/createthread.c (create_thread): Use
3507         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3508         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3509         THREAD_SELF_SYSINFO instead of open code.
3510         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3511         (THREAD_SYSINFO): Likewise.
3513         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3515         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3517 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3519         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3520         instead of .init.  Patch by David Mosberger.
3522 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3524         * sysdeps/pthread/configure.in: Remove broken declaration in C
3525         cleanup handling check.
3527 2003-11-30  Andreas Jaeger  <aj@suse.de>
3529         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3530         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3531         Likewise.
3533 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3535         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3536         * pthread_attr_destroy.c: Include shlib-compat.h.
3537         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3538         is set in iattr->flags.
3539         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3541 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3543         * Makefile (distribute): Add tst-cleanup4aux.c.
3545         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3546         include.
3548 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3550         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3551         pthread_cond_signal.
3553         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3554         store mutex address if the current value is ~0l.
3555         * sysdeps/pthread/pthread_cond_timedwait.c
3556         (__pthread_cond_timedwait): Likewise.
3557         * sysdeps/pthread/pthread_cond_broadcast.c
3558         (__pthread_cond_broadcast): Don't use requeue for pshared
3559         condvars.
3561         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3562         (__pthread_cond_wait): Don't store mutex address if the current
3563         value is ~0l.
3564         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3565         (__pthread_cond_timedwait): Likewise.
3566         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3567         (__pthread_cond_broadcast): Don't use requeue for pshared
3568         condvars.
3570         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3571         element with ~0l for pshared condvars, with NULL otherwise.
3573         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3574         (__pthread_cond_wait): Don't store mutex address if the current
3575         value is ~0l.
3576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3577         (__pthread_cond_timedwait): Likewise.
3578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3579         (__pthread_cond_broadcast): Don't use requeue for pshared
3580         condvars.
3582         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3583         * tst-cond12.c: New file.
3584         * tst-cond13.c: New file.
3586 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3588         * sysdeps/pthread/configure.in: Make missing forced unwind support
3589         fatal.
3591 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3593         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3595 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3597         * Makefile: Add magic to clean up correctly.
3599 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3601         * unwind.c (FRAME_LEFT): Define.
3602         (unwind_stop): Handle old style cleanups here.
3603         (__pthread_unwind): Handle old style cleanups only if
3604         !HAVE_FORCED_UNWIND.
3605         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3606         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3607         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3608         ($(objpfx)tst-cleanupx4): Likewise.
3609         * tst-cleanup4.c: New test.
3610         * tst-cleanup4aux.c: New.
3611         * tst-cleanupx4.c: New test.
3613 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3615         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3616         lll_mutex_*lock macros to skip atomic operations on some archs.
3618 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3620         * sysdeps/pthread/tst-timer.c (main): Initialize
3621         sigev2.sigev_value as well.
3623 2003-10-15  Roland McGrath  <roland@redhat.com>
3625         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3626         is missing.
3627         * sysdeps/pthread/configure: Regenerated.
3629 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3631         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3632         locking macros.  No distinction between normal and mutex locking
3633         anymore.
3634         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3635         Merge bits from lowlevelmutex.S we still need.
3636         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3637         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3638         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3639         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3640         new mutex implementation.
3641         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3642         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3643         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3644         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3645         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3646         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3648         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3649         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3650         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3651         symbol for entry point to avoid cancellation.
3653 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3655         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3656         changes.
3657         (SAVE_OLDTYPE_0): Fix a typo.
3659 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3661         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3662         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3664 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3666         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3667         correct offset.
3669 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3671         * Makefile (tests): Add tst-cancel19.
3672         * tst-cancel19.c: New test.
3674 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3676         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3677         restoring of the old cancellation type.
3679 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3681         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3683 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3685         * sysdeps/pthread/malloc-machine.h: New file
3687 2003-09-24  Roland McGrath  <roland@redhat.com>
3689         * allocatestack.c (__make_stacks_executable): Don't ignore return
3690         value from _dl_make_stack_executable.
3692 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3694         * allocatestack.c (__make_stacks_executable): Also change
3695         permission of the currently unused stacks.
3697         * allocatestack.c (change_stack_perm): Split out from
3698         __make_stacks_executable.
3699         (allocate_stack): If the required permission changed between the time
3700         we started preparing the stack and queueing it, change the permission.
3701         (__make_stacks_executable): Call change_stack_perm.
3703         * Makefile: Build tst-execstack-mod locally.
3704         * tst-execstack-mod.c: New file.
3706 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3708         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3710 2003-09-23  Roland McGrath  <roland@redhat.com>
3712         * tst-execstack.c: New file.
3713         * Makefile (tests): Add it.
3714         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3715         (LDFLAGS-tst-execstack): New variable.
3717         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3718         whether to use PROT_EXEC for stack mmap.
3719         (__make_stacks_executable): New function.
3720         * pthreadP.h: Declare it.
3721         * init.c (__pthread_initialize_minimal_internal): Set
3722         GL(dl_make_stack_executable_hook) to that.
3724 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3727         recommendation from AMD re avoidance of lock prefix.
3729 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3731         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3732         lll_futex_timed_wait instead of lll_futex_wait.
3733         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3734         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3735         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3736         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3737         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3738         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3739         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3740         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3741         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3742         Completely revamp the locking macros.  No distinction between
3743         normal and mutex locking anymore.
3744         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3745         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3746         __lll_lock_timedwait): Fix prototypes.
3747         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3748         __lll_lock_timedwait): Likewise.
3749         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3750         macros, add __builtin_expect.
3751         (lll_mutex_timedlock): Likewise.  Fix return value.
3752         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3753         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3754         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3755         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3756         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3757         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3758         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3759         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3761 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3763         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3764         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3765         operation if possible.
3767         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3768         like jumping over the lock prefix.
3770 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3772         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3773         locking macros.  No distinction between normal and mutex locking
3774         anymore.
3775         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3776         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3777         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3778         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3779         locking.  Merge bits from lowlevelmutex.S we still need.
3780         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3781         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3782         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3783         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3784         * Makefile (routines): Remove libc-lowlevelmutex.
3785         (libpthread-rountines): Remove lowlevelmutex.
3786         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3787         for new mutex implementation.
3788         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3789         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3792         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3793         Likewise.
3794         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3795         Likewise.
3796         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3797         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3798         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3799         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3802         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3803         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3804         Likewise.
3805         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3806         Likewise.
3807         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3810         Don't use requeue.
3811         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3812         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3814 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3816         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3817         in parameters of asm with output parameters.
3819         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3820         type of DECR parameter to int.
3821         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3823 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3825         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3826         guardsize for each thread.
3828 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3830         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3831         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3832         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3834         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3835         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3836         NULL.
3837         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3838         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3839         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3840         (pthread_getaffinity_np): Add hidden_def.
3842         * Makefile (tests): Add tst-attr3.
3843         * tst-attr3.c: New test.
3845         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3847 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3849         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3850         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3852 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3854         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3855         * tst-align.c: Include tst-stack-align.h.
3856         (tf, do_test): Use TEST_STACK_ALIGN macro.
3858 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3860         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3861         variable.
3863 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3865         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3866         stack-related values for the initial thread.
3868 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3870         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3872 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3874         * pthread_mutex_lock.c: Minor code rearrangements.
3876 2003-09-05  Roland McGrath  <roland@redhat.com>
3878         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3879         Instead, include ../nptl_db/db_info.c to do its magic.
3880         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3881         (__pthread_pthread_key_2ndlevel_size): Likewise.
3882         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3883         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3884         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3885         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3886         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3887         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3888         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3889         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3890         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3891         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3892         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3893         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3894         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3895         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3896         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3897         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3898         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3900 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3902         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3903         of pthread_t to be compatible with LT.
3904         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3905         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3906         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3907         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3908         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3909         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3910         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3912 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3914         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3916 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3918         * unwind-forcedunwind.c: Move to...
3919         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3920         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3921         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3922         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3923         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3924         * unwind.c: Include jmpbuf-unwind.h.
3925         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3927 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3929         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3930         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3931         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3932         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3933         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3934         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3935         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3936         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3937         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3938         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3939         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3940         function.
3941         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3942         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3943         * Makefile (tests): Add tst-stack2.
3944         * tst-stack2.c: New test.
3945         * tst-stack1.c: Include limits.h and sys/param.h.
3946         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3948         * pthread_condattr_setpshared.c: Include errno.h.
3949         (pthread_condattr_setpshared): Return EINVAL if pshared
3950         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3952         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3953         defined symbol for entry point to avoid cancellation.
3954         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3955         Likewise.
3956         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3957         Likewise.
3958         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3959         Likewise.
3960         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3961         Likewise.
3962         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3963         Likewise.
3964         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3965         __close_nocancel, __read_nocancel, __write_nocancel,
3966         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3967         libpthread.so or librt.so, define to corresponding function
3968         without _nocancel suffix.
3969         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3970         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3971         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3973         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3975 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3977         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3978         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3980         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3981         in subsections has a symbol associated with it.
3983         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3984         defined symbol for entry point to avoid cancellation.
3985         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3987 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3989         * Makefile (tests): Add tst-tls5.
3990         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3991         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3992         ($(objpfx)tst-tls5): New.
3993         ($(objpfx)tst-tls6.out): Likewise.
3994         (tests): Depend on $(objpfx)tst-tls6.out.
3995         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3996         (do_test): Check pthread_self () return value alignment.
3997         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3998         (tf): Check pthread_self () return value alignment.
3999         * tst-tls5.c: New test.
4000         * tst-tls5.h: New.
4001         * tst-tls5mod.c: New.
4002         * tst-tls5moda.c: New.
4003         * tst-tls5modb.c: New.
4004         * tst-tls5modc.c: New.
4005         * tst-tls5modd.c: New.
4006         * tst-tls5mode.c: New.
4007         * tst-tls5modf.c: New.
4008         * tst-tls6.sh: New test.
4010         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
4011         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
4012         * init.c (pthread_functions): Initialize them.
4013         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
4014         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
4015         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
4016         pthread_cond_timedwait@@GLIBC_2.3.2.
4018 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
4020         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
4021         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
4022         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
4023         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
4024         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
4025         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
4027         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
4029         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
4030         _POSIX_THREAD_PRIORITY_SCHEDULING.
4031         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4033 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
4035         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
4036         nested function, use static inline function from libio.h.
4037         Code by Richard Henderson.
4039         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
4040         weak.
4042 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
4044         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
4045         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
4046         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
4047         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
4048         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
4049         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
4050         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
4051         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
4052         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
4053         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
4054         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
4055         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
4056         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
4057         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
4058         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
4059         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
4060         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
4061         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
4062         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
4063         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
4064         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
4065         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
4066         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
4067         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
4068         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
4069         * sysdeps/sparc/tls.h: New file.
4070         * sysdeps/sparc/tcb-offsets.sym: New file.
4071         * sysdeps/sparc/Makefile: New file.
4072         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
4073         * init.c [__sparc__] (__NR_set_tid_address): Define.
4075 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
4077         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
4078         _IO_release_lock): Define.
4080 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
4082         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
4083         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
4085 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
4087         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
4088         (__pthread_cleanup_class): Add missing return types of member
4089         functions.
4091 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
4093         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4094         (lll_mutex_unlock_force): Add memory barrier between store and futex
4095         syscall.
4097 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
4099         * tst-cancel4.c (do_test): Also unlink tempfname and remove
4100         tempmsg in first loop.
4102 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
4104         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4105         _POSIX_THREAD_PRIORITY_SCHEDULING.
4106         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4108 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4110         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
4111         (__rtld_lock_default_lock_recursive,
4112         __rtld_lock_default_unlock_recursive): Define.
4113         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
4114         __rtld_lock_unlock_recursive): Define using
4115         GL(_dl_rtld_*lock_recursive).
4116         * init.c (__pthread_initialize_minimal_internal): Initialize
4117         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
4118         Lock GL(_dl_load_lock) the same number of times as
4119         GL(_dl_load_lock) using non-mt implementation was nested.
4121         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
4122         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
4124 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
4126         * tst-cancel17.c (do_test): Make len2 maximum of page size and
4127         PIPE_BUF.
4129 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4131         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
4133 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
4135         * sysdeps/pthread/createthread.c (do_clone): Move error handling
4136         to first syscall error check.  Move syscall error check for tkill
4137         into __ASSUME_CLONE_STOPPED #ifdef.
4139 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
4141         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
4142         is not defined, do explicit synchronization.
4143         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
4144         is not defined also unlock pd->lock for non-debugging case in case
4145         it is necessary.
4146         * pthread_create.c (start_thread): Always get and release pd->lock
4147         if __ASSUME_CLONE_STOPPED is not defined.
4148         (start_thread_debug): Removed.  Adjust users.
4149         * allocatestack.c (allocate_stack): Always initialize lock if
4150         __ASSUME_CLONE_STOPPED is not defined.
4151         * Makefile (tests): Add tst-sched1.
4152         * tst-sched1.c: New file.
4154         * sysdeps/pthread/createthread.c (do_clone): Only use
4155         sched_setschduler and pass correct parameters.
4157 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4159         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
4160         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
4161         PTHREAD_STACK_MIN in comments.
4163 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4165         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4166         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
4167         argument.
4168         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
4169         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
4170         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
4171         (__pthread_cleanup_upto): Fix prototype.
4172         (_longjmp_unwind): Adjust caller.
4173         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
4174         Change second argument to const struct pointer.
4175         * tst-sem8.c (main): Remove unused s2 and s3 variables.
4176         * tst-sem9.c (main): Likewise.
4177         * unwind.c: Include string.h for strlen prototype.
4179 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
4181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4182         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
4183         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
4184         Define HAVE_CMOV.
4185         Patch by Nicholas Miell <nmiell@attbi.com>.
4187 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
4189         * init.c (__pthread_initialize_minimal_internal): Initialize
4190         GL(dl_init_static_tls).
4191         * pthreadP.h (__pthread_init_static_tls): New prototype.
4192         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
4193         New functions.
4194         * Makefile (tests): Add tst-tls4.
4195         (modules-names): Add tst-tls4moda and tst-tls4modb.
4196         ($(objpfx)tst-tls4): Link against libdl and libpthread.
4197         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
4198         tst-tls4modb.so.
4199         * tst-tls4.c: New file.
4200         * tst-tls4moda.c: New file.
4201         * tst-tls4modb.c: New file.
4203 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
4205         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
4206         before __timer_dealloc.
4207         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
4208         Don't call list_unlink.
4210 2003-07-29  Roland McGrath  <roland@redhat.com>
4212         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
4214 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
4216         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
4217         if __need_struct_pthread_size, instead define lll_lock_t.
4219 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
4221         * tst-cancel17.c (do_test): Check if aio_cancel failed.
4222         Don't reuse struct aiocb A if it failed.
4223         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
4224         not just one byte, as that does not block.
4226 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
4228         * sysdeps/pthread/unwind-resume.c: New file.
4229         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
4230         unwind-resume in csu subdir.
4231         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
4232         exceptions.
4233         (librt-sysdep_routines, librt-shared-only-routines): Add
4234         rt-unwind-resume.
4235         * sysdeps/pthread/rt-unwind-resume.c: New file.
4236         * unwind-forcedunwind.c: New file.
4237         * Makefile (libpthread-routines): Add unwind-forcedunwind.
4238         (libpthread-shared-only-routines): Likewise.
4239         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
4240         * pthreadP.h (pthread_cancel_init): New prototype.
4241         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
4243         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
4244         attr argument const struct pthread_attr *.
4246         * res.c (__res_state): Return __resp.
4247         * descr.h: Include resolv.h.
4248         (struct pthread): Add res field.
4249         * pthread_create.c: Include resolv.h.
4250         (start_thread): Initialize __resp.
4251         * Makefile (tests): Add tst-_res1.
4252         (module-names): Add tst-_res1mod1, tst-_res1mod2.
4253         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
4254         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
4255         libpthread.
4256         * tst-_res1.c: New file.
4257         * tst-_res1mod1.c: New file.
4258         * tst-_res1mod2.c: New file.
4260 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
4262         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4264         * Makefile: Define various *-no-z-defs variables for test DSOs
4265         which has undefined symbols.
4267 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
4269         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4270         Retry if the stwcx fails to store once_control.
4272 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
4274         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4275         pthread_attr_setaffinity.
4276         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4277         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4278         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4279         * pthread_attr_destroy.c: Free cpuset element if allocated.
4280         * pthread_create.c: Pass iattr as additional parameter to
4281         create_thread.
4282         * sysdeps/pthread/createthread.c: If attribute is provided and
4283         a new thread is created with affinity set or scheduling parameters,
4284         start thread with CLONE_STOPPED.
4285         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4286         pthread_attr_setaffinity.
4287         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4288         cpuset element.
4290 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
4292         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4294 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
4296         * sysdeps/pthread/configure.in: Require CFI directives also for
4297         ppc and s390.
4299 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
4301         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4302         Add cfi directives.
4304 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4306         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4307         CLEANUP_JMP_BUF.
4308         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4309         registers as variables.  Call __pthread_mutex_unlock_usercnt.
4310         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4311         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4312         not self pointer in __writer.  Compare with TID to determine
4313         deadlocks.
4314         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4315         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4316         Likewise.
4317         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4318         Likewise.
4319         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4320         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4321         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4322         macros also when compiling librt.
4324 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
4326         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4327         -fasynchronous-unwind-tables.
4328         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4329         (PSEUDO): Add cfi directives.
4330         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4331         Likewise.
4332         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4333         Likewise.
4335 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
4337         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4338         __pthread_unregister_cancel): Add prototypes and hidden_proto.
4339         * unwind.c (__pthread_unwind_next): Add hidden_def.
4340         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4341         Likewise.
4342         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4343         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4344         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4345         Likewise.
4346         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4347         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4348         Likewise.
4349         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4350         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4351         __pthread_unregister_cancel and __pthread_unwind_next.
4353 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
4355         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4356         different symbol for the cancellation syscall wrapper and
4357         non-cancellation syscall wrapper.
4358         (PSEUDO_END): Define.
4360 2003-07-05  Richard Henderson  <rth@redhat.com>
4362         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4363         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4364         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4365         return actual return value from the syscall, not 0.
4367 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
4369         * descr.h (struct pthread): Add pid field.
4370         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4371         (__reclaim_stacks): Likewise.
4372         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4373         also check for PID of the signal source.
4374         (__pthread_initialize_minimal_internal): Also initialize pid field
4375         of initial thread's descriptor.
4376         * pthread_cancel.c: Use tgkill instead of tkill if possible.
4377         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4378         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4379         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4380         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4382 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
4384         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4385         Fix use of parameter.
4386         (__libc_cleanup_pop): Likewise.
4388 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
4390         * init.c (sigcancel_handler): Change parameters to match handler
4391         for SA_SIGACTION.  Check signal number and code to recognize
4392         invalid invocations.
4394 2003-07-03  Roland McGrath  <roland@redhat.com>
4396         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4397         Apply sizeof (struct pthread) bias to r13 value.
4399 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
4401         * sysdeps/pthread/configure.in: Require CFI directives.
4403         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4404         definition.
4405         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4406         libpthread compilation.
4407         * unwind.c (__pthread_unwind): Add hidden_def.
4408         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4410 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4412         * libc-cancellation.c (__libc_cleanup_routine): Define.
4413         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4414         (__pthread_cleanup_pop): Define.
4416 2003-07-01  Richard Henderson  <rth@redhat.com>
4418         * sysdeps/alpha/elf/pt-initfini.c: New file.
4419         * sysdeps/alpha/pthread_spin_lock.S: New file.
4420         * sysdeps/alpha/pthread_spin_trylock.S: New file.
4421         * sysdeps/alpha/pthreaddef.h: New file.
4422         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4423         * sysdeps/alpha/tls.h: New file.
4424         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4425         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4426         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4427         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4428         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4429         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4430         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4431         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4432         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4433         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4435 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4438         cleanup support and unwind info.
4440 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
4442         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4443         Use correct cleanup handler registration.  Add unwind info.
4444         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4445         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4446         * tst-once3.c: Add cleanup handler and check it is called.
4447         * tst-once4.c: Likewise.
4448         * tst-oncex3.c: New file.
4449         * tst-oncex4.c: New file.
4450         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4452 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
4454         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4456 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
4458         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4459         (tf_msgsnd): Likewise.
4461         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4462         premature returns a bit more.
4464 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
4466         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4467         definition to the front.
4469         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4470         the cleanup functions to make the names unique.  Fix dwarf opcode
4471         un unwind table.
4472         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4473         functions to make the names unique.  Fix CFA offset for two blocks.
4475 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
4477         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4478         missing closing braces.
4479         Patch by Christophe Saout <christophe@saout.de>.
4481 2003-06-24  Roland McGrath  <roland@redhat.com>
4483         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4485 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
4487         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4488         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4490         * pthreadP.h: Declare __find_thread_by_id.
4491         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4492         * pthread_clock_gettime.c: Allow using other thread's clock.
4493         * pthread_clock_settime.c: Likewise.
4494         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4495         * Makefile: Add rules to build and run tst-clock2.
4496         * tst-clock2.c: New file.
4498 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
4500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4501         to use exception-based cleanup handler.
4502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4504         * tst-cond8.c (ch): Announce that we are done.
4506         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4508         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4509         Also test aio_suspend with timeout value.
4511 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
4513         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4514         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4515         attribute_hidden.
4517         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4518         (__pthread_mutex_lock_internal): Likewise.
4519         (__pthread_mutex_unlock_internal): Likewise.
4520         (__pthread_mutex_unlock_usercnt): Declare.
4521         * pthread_mutex_destroy.c: Always fail if used in any way.
4522         * pthread_mutex_init.c: Update comment.
4523         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4524         * pthread_mutex_timedlock.c: Adjust __nusers.
4525         * pthread_mutex_trylock.c: Adjust __nusers.
4526         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4527         and public interfaces are wrapper with pass additional parameter.
4528         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4529         parameter zero.
4530         * tst-mutex8.c: New file.
4531         * Makefile (tests): Add tst-mutex8.
4532         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4533         __pthread_mutex_unlock_usercnt.
4534         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4537         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4538         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4539         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4540         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4541         Add __nusers.
4542         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4543         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4544         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4545         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4546         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4548         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4549         * pthread_mutex_timedlock.c: Likewise.
4550         * pthread_mutex_trylock.c: Adjust __nusers.
4551         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4552         * tst-mutex9.c: New file.
4553         * Makefile (tests): Add tst-mutex9.
4554         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4555         * sysdeps/ia64/tls.h: Likewise.
4556         * sysdeps/powerpc/tls.h: Likewise.
4557         * sysdeps/s390/tls.h: Likewise.
4558         * sysdeps/sh/tls.h: Likewise.
4559         * sysdeps/x86_64/tls.h: Likewise.
4560         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4561         Change type of __owner.
4562         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4563         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4564         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4565         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4566         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4568 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4570         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4571         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4573         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4574         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4575         instead of nr to lll_futex_wake.  Only set errno and return -1
4576         if err < 0.
4578         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4579         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4580         return actual return value from the syscall, not 0.
4582 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4584         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4585         find a random value.
4586         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4587         errno==EIDRM.
4589         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4590         compat_timer_settime.
4591         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4592         compat_timer_gettime.
4593         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4594         compat_timer_getoverrun.
4595         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4596         compat_timer_delete.
4598         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4599         error-checking mutex detect busy mutexes.
4601 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4604         Add ax to clobber list.
4605         (lll_mutex_cond_lock): Likewise.
4606         (lll_mutex_unlock): Likewise.
4607         (lll_lock): Likewise.
4608         (lll_unlock): Likewise.
4610         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4611         * tst-cancel18.c: New file.
4612         * tst-cancelx18.c: New file.
4614         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4615         and tcdrain.
4617         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4618         * tst-cancel17.c: New file.
4619         * tst-cancelx17.c: New file.
4621         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4622         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4623         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4625         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4627 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4629         * sysdeps/pthread/createthread.c (create_thread): Set
4630         header.multiple_threads unconditionally.
4631         * allocatestack.c (allocate_stack): Likewise.
4632         * descr.h (struct pthread): Add header.multiple_threads
4633         unconditionally.
4634         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4635         Define for librt.  #error if neither libpthread, libc nor librt.
4636         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4637         Likewise.
4638         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4639         CDISABLE): Likewise.
4640         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4641         CDISABLE): Likewise.
4642         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4643         CDISABLE): Likewise.
4644         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4645         CDISABLE): Likewise.  Access header.multiple_threads outside of
4646         libc and libpthread.
4647         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4648         Likewise.
4649         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4650         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4652 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4654         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4655         Also test early cancellation before the thread reaches the cancellation
4656         point.
4658         * Makefile: Compile forward.c with exceptions.
4660         * sysdeps/unix/sysv/linux/sleep.c: New file.
4662 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4664         * Makefile: Add CFLAGS definition to compile function wrappers
4665         duplicated from libc with exceptions.
4666         * tst-cancel4.c: Also check cancellation handlers.
4668         * Makefile: Add rules to build and run tst-cancel16 and
4669         tst-cancelx16.  Add missing CFLAGS definitions.
4670         * tst-cancel16.c: New file.
4671         * tst-cancelx16.c: New file.
4673 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4675         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4676         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4677         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4678         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4680         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4681         (LIBC_CANCEL_RESET): Likewise.
4682         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4683         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4684         librt-cancellation.
4685         (CFLAGS-libcrt-cancellation.c): Define.
4686         * sysdeps/pthread/librt-cancellation.c: New file.
4687         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4688         macros also when compiling librt.
4689         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4690         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4691         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4692         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4693         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4694         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4695         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4697         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4698         compat_timer_create.
4700 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4702         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4704         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4705         __register_atfork.
4706         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4707         Add libc_hidden_def.
4709 2003-06-13  Roland McGrath  <roland@redhat.com>
4711         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4712         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4714 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4716         * allocatestack.c (queue_stack): Always inline.
4717         * ptreadhP.h (__do_cancel): Likewise.
4719 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4721         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4722         a typo.
4724 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4727         (__pthread_cond_signal): Remove incorrect second addition for
4728         cond_lock!=0.
4730 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4733         (__pthread_cond_signal): Use correct futex pointer in
4734         __lll_mutex_lock_wait call.
4736         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4737         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4739 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4741         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4742         cancelable.
4743         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4744         Likewise.
4746         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4747         hand-written CFI generation code.  Since ENTRY/END also initiated
4748         CFI frames this caused two CFI sets to be generated.
4750 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4752         * cleanup_routine.c: New file.
4753         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4754         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4755         cleanup handling.
4756         * Makefile (libpthread-routines): Add cleanup_routine.
4757         Add more CFLAGS variables to compile with exceptions.  Add comments
4758         why which file needs unwind tables.
4759         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4760         tests.
4761         * tst-cancelx1.c: New file.
4762         * tst-cancelx2.c: New file.
4763         * tst-cancelx3.c: New file.
4764         * tst-cancelx4.c: New file.
4765         * tst-cancelx5.c: New file.
4766         * tst-cancelx6.c: New file.
4767         * tst-cancelx7.c: New file.
4768         * tst-cancelx8.c: New file.
4769         * tst-cancelx9.c: New file.
4770         * tst-cancelx10.c: New file.
4771         * tst-cancelx11.c: New file.
4772         * tst-cancelx12.c: New file.
4773         * tst-cancelx13.c: New file.
4774         * tst-cancelx14.c: New file.
4775         * tst-cancelx15.c: New file.
4776         * tst-cleanupx0.c: New file.
4777         * tst-cleanupx0.expect: New file.
4778         * tst-cleanupx1.c: New file.
4779         * tst-cleanupx2.c: New file.
4780         * tst-cleanupx3.c: New file.
4782         * tst-cleanup0.c: Make standard compliant.
4783         * tst-cleanup1.c: Likewise.
4785         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4786         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4787         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4788         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4789         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4790         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4791         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4792         CLEANUP_JMP_BUF.
4793         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4794         * tst-cancel12.c: New file.
4795         * tst-cancel13.c: New file.
4796         * tst-cancel14.c: New file.
4797         * tst-cancel15.c: New file.
4798         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4799         and tst-cancel15.
4801         * tst-cancel1.c: Add some comments.
4803         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4804         timeout correctly.
4806 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4808         * Makefile (CFLAGS-pthread_cancel.c): Define.
4810 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4812         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4813         Change type of __writer element to int.
4814         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4815         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4816         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4817         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4818         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4819         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4820         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4821         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4822         Compare with TID to determine deadlocks.
4823         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4824         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4825         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4826         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4828         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4829         Likewise.
4830         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4831         Likewise.
4832         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4833         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4834         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4835         Likewise.
4836         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4837         Likewise.
4838         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4839         * Makefile (tests): Add tst-rwlock12.
4840         * tst-rwlock12.c: New file.
4842 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4844         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4845         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4846         Remove bogus hidden_proto.
4847         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4848         Likewise.
4849         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4850         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4851         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4852         ___lll_mutex_timedlock): Likewise.
4854 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4857         (__pthread_cond_signal): Add some code to eventually handle
4858         cond_lock!=0.
4860 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4862         * Makefile (tests): Add tst-exec4.
4863         (tst-exec4-ARGS): Define.
4864         * tst-exec4.c: New file.
4866 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4868         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4869         Also fail if tv_nsec < 0.
4870         (__lll_timedwait_tid): Likewise.
4871         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4872         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4873         Likewise.
4874         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4875         Likewise.
4876         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4877         Likewise.
4878         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4879         Likewise.
4880         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4881         Likewise.
4882         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4883         Likewise.
4885         * Makefile (tests): Add tst-sem8 and tst-sem9.
4886         * tst-sem8.c: New file.
4887         * tst-sem9.c: New file.
4888         * sem_open.c: Fix creation of in_use record if the file exists but
4889         no internal record.
4891         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4892         definitions.
4894         * sysdeps/pthread/timer_create.c (timer_create): In case
4895         evp==NULL, assign timer ID to sival_ptr.
4897         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4898         struct pthread_unwind_buf *.
4899         (struct pthread): Likewise for cleanup_jmp_buf element.
4901         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4902         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4903         * unwind.c (__pthread_unwind_next): Likewise.
4905 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4907         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4908         (lll_futex_timed_wait): Use int for futex value parameter.
4909         (lll_futex_wake): Likewise.
4910         (lll_futex_requeue): Likewise.
4912         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4913         Replace one memory operation with one register operation.
4915         * tst-join4.c (do_test): Fix error message.
4917         * tst-rwlock6.c (do_test): Use correct format specifier.
4919         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4920         (__lll_mutex_lock_wait): Replace one memory operation with one
4921         register operation.
4922         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4923         (__lll_mutex_lock_wait): Likewise.
4925         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4926         (__lll_mutex_cond_lock): Add one to value parameter of
4927         __lll_lock_wait to reflect reality in the futex syscall.
4928         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4929         (lll_mutex_cond_lock): Likewise.
4931 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4933         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4934         New function.
4935         (lll_mutex_cond_lock): Define.
4937 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4939         * Makefile (tests): Add tst-signal6.
4940         * tst-signal6.c: New file.
4942         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4943         (__lll_mutex_unlock_force): New function
4944         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4946         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4947         (__lll_mutex_unlock_force): New function.
4948         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4950         * tst-rwlock7.c (do_test): Use correct format specifier.
4952         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4953         Find break parameter in correct asm argument.
4955 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4957         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4958         Remove out4.
4959         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4960         error occured.
4961         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4962         Add __mutex.
4963         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4964         lll_futex_requeue, lll_mutex_unlock_force): Define.
4966 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4968         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4969         (pthread_cond_t): Add __mutex.
4970         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4971         lll_futex_requeue, lll_mutex_unlock_force): Define.
4973 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4975         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4976         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4977         Add __mutex field.
4978         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4979         Define.
4980         (lll_futex_wait, lll_futex_wake): Define.
4981         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4982         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4983         FUTEX_REQUEUE instead of FUTEX_WAIT.
4984         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4985         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4986         mutex which was used in condvar structure.  Call
4987         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4988         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4990         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4991         include tcb-offsets.h.  Read wakeup value in locked region.
4992         Use the value of gbr register as THREAD_ID.
4993         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4994         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4995         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4997         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4998         macros.
5000 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
5002         * sysdeps/pthread/pthread_cond_broadcast.c
5003         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
5005 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
5007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
5008         typo in register name.
5009         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
5010         correctly.  Actually use requeue.  Little optimization.
5011         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
5012         mutex address early.  Handle cancellation state as 32-bit value.
5013         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5014         Remove unnecessary label.
5016 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
5018         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
5019         instead of FUTEX_WAIT.
5020         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
5021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5023         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5025         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
5026         used in condvar structure.  Call __pthread_mutex_cond_lock instead
5027         of __pthread_mutex_lock_internal.
5028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5030         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5031         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
5032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5034         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
5035         Add pthread_mutex_cond_lock.
5036         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
5037         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
5038         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
5039         lll_mutex_cond_lock.
5040         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5041         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5042         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5043         Add __mutex field.
5044         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5045         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5047         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
5048         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5050         * pthreadP.h: Declare __pthread_mutex_cond_lock.
5051         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
5052         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
5053         macro don't define aliases.
5055         * cancellation.c: Remove __pthread_enable_asynccancel_2.
5056         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
5057         * sysdeps/pthread/pthread_cond_timedwait.c: Use
5058         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
5059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5061         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5062         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5063         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5065 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
5067         * sem_open.c: Fix one endless loop.  Implement correct semantics
5068         wrt opening the same semaphore more then once.
5069         * sem_close.c: Adjust for sem_open change.
5070         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
5071         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
5072         * Makefile (tests): Add tst-sem7.
5073         * tst-sem7.c: New file.
5075 2003-05-16  Roland McGrath  <roland@redhat.com>
5077         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
5078         uninitialized variable braino.
5080 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
5082         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
5083         test for syscall availability.
5085         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
5086         __no_posix_timers to -1 if the syscalls don't exist.
5088         * pthread_join.c (pthread_join): Set tid field of the joined
5089         thread to -1.  This isn't necessary but helps to recognize some
5090         error conditions with almost no cost.
5092         * allocatestack.c (FREE_P): Also negative values indicate an
5093         unused stack.
5095         * unwind.c: Include <unistd.h>.
5097 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
5099         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
5101 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
5103         * Makefile (crti-objs, crtn-objs): New variables.
5104         (omit-deps, extra-objs): Add crtn.
5105         ($(objpfx)libpthread.so): Depend on both crti and crtn
5106         and links to them in multidir.
5107         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
5109 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
5111         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5112         (lll_mutex_unlock): Use atomic_exchange_rel.
5114 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
5116         * cond-perf.c (cons): Add missing locking around setting of alldone.
5118 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
5120         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
5121         related macros.
5122         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5124 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
5126         * tst-sem6.c: New file.
5127         * Makefile (tests): Add tst-sem6.
5129         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
5130         Use atomic_exchange_rel instead of atomic_exchange.
5131         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
5132         Likewise.
5134         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
5135         code for lll_futex_wait and lll_futex_wake in static apps.  Use
5136         vsyscall is possible.
5138         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
5139         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
5140         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
5141         pthread_setaffinity_np.
5142         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
5143         and pthread_setaffinity_np.
5144         * Makefile (libpthread-routines): Add pthread_getaffinity and
5145         pthread_setaffinity.
5147         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
5148         use it in case mmap to allocate the stack fails.
5149         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
5150         ARCH_MAP_FLAGS here.
5151         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
5152         ARCH_RETRY_MMAP.
5154 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
5156         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
5157         handler implementation.  It is now lockless in fork().
5158         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5159         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5160         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
5161         declare the __fork_*_lists.
5162         (struct fork_handler): Include pointers to all three functions.
5163         Add next, refcntr and need_signal elements.
5164         (__fork_handlers): New declaration.
5165         (__register_atfork_malloc): Remove declaration.
5166         (HAVE_register_atfork_malloc): Remove definition.
5167         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
5168         __pthread_child_handler variable.
5169         (__libc_pthread_init): Use __register_atfork instead of explicitly
5170         adding to the list.
5171         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
5172         and lll_futex_wake.
5173         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5175         * unwind.c (unwind_cleanup): Print error message and then abort.  This
5176         function must never be reached.
5178         * cond-perf.c: New file.
5180 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
5182         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
5184 2003-05-04  Roland McGrath  <roland@redhat.com>
5186         * Makefile ($(objpfx)../libc.so): New target.
5188 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
5190         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5191         (pthread_condattr_t): Size is only an int, don't use long for
5192         alignment.
5193         (pthread_mutexattr_t): Likewise.
5194         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5195         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5196         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5198 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
5200         * sysdeps/i386/tls.h: Define THREAD_ID.
5201         * sysdeps/ia64/tls.h: Likewise.
5202         * sysdeps/powerpc/tls.h: Likewise.
5203         * sysdeps/s390/tls.h: Likewise.
5204         * sysdeps/sh/tls.h: Likewise.
5205         * sysdeps/x86_64/tls.h: Likewise.
5206         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
5207         record ownership.
5208         * pthread_mutex_timedlock.c: Likewise.
5209         * pthread_mutex_trylock.c: Likewise.
5210         * pthread_mutex_unlock.c: Likewise.
5211         * pthread_rwlock_trywrlock.c: Likewise.
5212         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
5213         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5214         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5215         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5217         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
5218         flag.
5220 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
5222         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5223         (__SIZEOF_PTHREAD_COND_T): Define to 48.
5224         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
5225         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5226         Make __align long long instead of long.
5227         (pthread_rwlock_t): Formatting.
5228         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5229         (pthread_rwlock_t): Formatting.
5230         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5231         (pthread_cond_t): Make __align long long instead of long.
5232         (pthread_rwlock_t): Move __flags field to the same position as in
5233         linuxthreads.
5235 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
5237         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
5238         * tst-rwlock7.c (do_test): Likewise.
5240 2003-04-26  Roland McGrath  <roland@redhat.com>
5242         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
5244 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
5246         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
5247         sizeof (struct pthread).
5248         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
5249         1 struct pthread.
5250         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
5251         to 0.
5252         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
5253         struct pthread.
5254         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
5255         to 32-bit bytes.
5256         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
5257         tcbp.
5258         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
5259         unneccessarily.
5260         (NO_TLS_OFFSET): Define.
5261         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5262         add TLS_TCB_SIZE unnecessarily.
5264 2003-04-22  Roland McGrath  <roland@redhat.com>
5266         * Makeconfig (shared-thread-library): Reverse link order to work
5267         around linker bug.
5269 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
5271         * semaphore.h: Fix typo in comment.
5273 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
5275         * sysdeps/pthread/sigfillset.c: New file.
5277         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5278         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5279         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5280         * sysdeps/pthread/sigaction.c: Likewise.
5281         * sysdeps/pthread/sigprocmask.c: New file.
5282         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5283         __SIGRTMIN+1.
5284         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5285         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
5286         in this case.
5288 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
5290         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5291         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5293         * sysdeps/unix/sysv/linux/unregister-atfork.c
5294         (__unregister_atfork): Don't free memory not allocated dynamically.
5296         * semaphore.h: Remove __THROW marker from cancellation points.
5297         * nptl/sysdeps/pthread/pthread.h: Likewise.
5299 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
5301         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5302         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5303         __THROW.
5305 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
5307         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5309 2003-04-15  Roland McGrath  <roland@redhat.com>
5311         * forward.c (__pthread_unwind): Tweak to avoid warning.
5313 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
5315         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5317 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
5319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5320         overflow CFA advance instructions.
5321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5323 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
5325         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5326         * sysdeps/i386/pthread_spin_lock.c: Likewise.
5327         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
5328         defined.
5330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5331         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5333         DW_CFA_advance_loc for .Laddl-.Lsubl.
5335 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
5337         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5338         position-independent unwind data for static libraries.
5339         Add missing unwind info.  Add comments.
5341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5344         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5346 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
5348         * Makefile: Make sure all cancellation points are compiled with
5349         exception and asynchronous unwind tables.
5351         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5352         which mishandles loading of global object addresses in PIC.
5353         (THREAD_SETMEM_NC): Likewise.
5355 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5357         * pthread.h: Define new data structure for cleanup buffer.  Declare
5358         new cleanup handler interfaces.
5359         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
5360         (struct pthread): Add cleanup_jmp_buf pointer.  Define
5361         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5362         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
5363         it.  Declare old cleanup handler installation functions.
5364         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
5365         handling.
5366         * cleanup_defer.c: Likewise.
5367         * cleanup_compat.c: New file.  Old cleanup code.
5368         * cleanup_def_compat.c: New file.  Old cleanup code.
5369         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5370         if own thread descriptor.
5371         * unwind.c: New file.
5372         * forward.c: Add __pthread_unwind.
5373         * init.c (pthread_functions): Add __pthread_unwind.
5374         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5375         Add ptr___pthread_unwind.
5376         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5377         and unwind function.
5378         * Makefile (libpthread-routines): Add cleanup_compat,
5379         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
5380         table generation if necessary.
5381         * version.c: Record whether unwind support is compiled in.
5382         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5383         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5384         handler interfaces.
5385         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5386         complication to generate unwind information for syscall wrappers.
5387         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5388         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5389         __cleanup_fct_attribute.
5391         * Makefile: Add rules to build and run tst-cleanup0.
5392         * tst-cleanup0.c: New file.
5393         * tst-cleanup0.expect: New file.
5395         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
5396         caller.  Optimize to avoid often unecessary local variable.
5398 2003-04-11  Roland McGrath  <roland@redhat.com>
5400         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5401         sets variable `multidir'; include that.
5402         (generated): Add it.
5403         ($(objpfx)$(multidir)/crti.o): New target.
5404         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5406 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5408         * tst-attr2.c (do_test): Add cast to avoid warning.
5409         * tst-mutex4.c (do_test): Likewise.
5411 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
5413         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5414         in child.
5416 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
5418         * Makefile (tests): Add tst-detach1.
5419         * tst-detach1.c: New file.
5421 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
5423         * sysdeps/pthread/pthread.h: Remove duplicate
5424         pthread_cleanup_{push,pop} definitions.
5426         * tst-barrier2.c: Eliminate warnings.
5427         * tst-cancel4.c: Likewise.
5428         * tst-cond4.c: Likewise.
5429         * tst-cond6.c: Likewise.
5430         * tst-detach1.c: Likewise.
5431         * tst-rwlock4.c: Likewise.
5432         * tst-rwlock6.c: Likewise.
5433         * tst-rwlock7.c: Likewise.
5434         * tst-sem3.c: Likewise.
5435         * tst-spin2.c: Likewise.
5436         * tst-umask1.c: Likewise.
5438 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
5440         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5442 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
5444         * descr.h (struct pthread): Move cancelhandling member to the front.
5446 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
5448         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5449         malloc_parent, and malloc_child statically.
5450         (__register_atfork_malloc): New function.
5451         (free_mem): Don't free any of the malloc_* variables on the list.
5452         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5453         Define HAVE_register_atfork_malloc.
5455 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
5457         * sysdeps/pthread/createthread.c (create_thread): Add some more
5458         comments explaining when to set multiple_threads and when not.
5460         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5461         THREAD_ATOMIC_BIT_SET if not already defined.
5462         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5463         THREAD_ATOMIC_BIT_SET:
5464         * sysdeps/x86_64/tls.h: Likewise.
5465         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5466         THREAD_ATOMIC_CMPXCHG_VAL.
5467         (_pthread_cleanup_pop_restore): Likewise.
5468         * cancellation.c (__pthread_enable_asynccancel): Likewise.
5469         (__pthread_enable_asynccancel_2): Likewise.
5470         (__pthread_disable_asynccancel): Likewise.
5471         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5472         (__libc_disable_asynccancel): Likewise.
5473         * init.c (sigcancel_handler): Likewise.
5474         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5475         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5477 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
5479         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5480         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5481         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5482         * Makefile (tests): Add tst-cancel11.
5483         * tst-cancel11.c: New file.
5485 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
5487         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5488         round, not the first.  Use specific_used flag instead of local
5489         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
5490         (__free_tcb): Don't call deallocate_tsd here.
5491         (start_thread): Call deallocate_tsd here.
5492         * pthread_setspecific.c: Set specific_used flag really only when
5493         needed.
5494         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5495         * tst-tsd3.c: New file.
5496         * tst-tsd4.c: New file.
5498 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5500         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5501         Use atomic_exchange_and_add instead of __lll_add.
5502         (__lll_mutex_timedlock): Likewise.
5503         Patch by Ian Wienand.
5505 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
5507         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5508         (SINGLE_THREAD_P): Fix typo.
5509         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5511 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5513         * Makefile (tests): Add tst-align.
5514         * tst-align.c: New file.
5515         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5517         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5518         function correctly.
5520         * tst-tsd2.c: Add casts to avoid warnings.
5522 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
5524         * descr.h (struct pthread): Move most often used elements to the front.
5526 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
5528         * Makefile (libpthread-routines): Add pthread_atfork.
5529         (libpthread-static-only-routines): Add pthread_atfork.
5531 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5533         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5534         of TLS_DTV_AT_TP.
5535         (INSTALL_DTV): Add parens.
5536         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5537         Use passed descr instead of THREAD_SELF.
5538         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5539         (__lll_mutex_timedlock_wait): Correct expected value after
5540         spurious wakeup.
5541         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5542         Release lock before waking up the waiters.
5543         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5544         criteria.  Reorderstruct passed to cleanup handler.  Fix
5545         handling of cancellation and failung pthread_mutex_unlock call.
5546         Use __pthread_enable_asynccancel_2 instead of
5547         __pthread_enable_asynccancel.
5548         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5549         Return result of lock re-get if it fails.
5550         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5551         for __pthread_cleanup_push.
5552         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5553         completely broken rwlock implementation.
5554         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5555         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5556         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5557         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5558         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5559         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5560         versioned_symbol macro.
5561         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5562         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5564 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5566         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5567         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5568         and __helper_tid.
5569         (struct timer): Remove th and bar field.
5570         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5571         debugging code.  Create only one helper thread.
5572         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5573         helper thread.
5574         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5575         Renamed.  Define statically.  Use thread info from siginfo.
5576         (__helper_once): New variable.
5577         (__helper_tid): New variable.
5578         (__reset_helper_control): New function.
5579         (__start_helper_thread): New function.
5581         * pthread_create.c (start_thread): Don't use setjmp inside
5582         __builtin_expect to work around gcc bug.
5584         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5585         timer_delete syscall fails, but not with ENOSYS, set
5586         __no_posix_timers.
5588         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5589         (timer_settime): Fix typo.
5590         * sysdeps/unix/sysv/linux/timer_getoverr.c
5591         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5593 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5596         offset of cleanupbuf.__prev.
5598 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5600         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5601         of included file.
5603 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5605         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5606         NULL provide default definition to syscall.
5608 2003-03-25  Roland McGrath  <roland@redhat.com>
5610         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5611         (timer_id2ptr): Fix typo.
5613 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5615         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5616         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5617         * sysdeps/ia64/pthreaddef.h: Likewise.
5618         * sysdeps/powerpc/pthreaddef.h: Likewise.
5619         * sysdeps/s390/pthreaddef.h: Likewise.
5620         * sysdeps/sh/pthreaddef.h: Likewise.
5621         * sysdeps/x86_64/pthreaddef.h: Likewise.
5622         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5623         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5624         being changed.
5625         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5626         SIGTIMER is not unblocked.
5627         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5628         RT signal taken.
5629         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5630         be send.
5631         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5632         pass pointer through as ID.
5633         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5634         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5635         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5636         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5637         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5638         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5639         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5640         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5641         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5642         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5643         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5644         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5645         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5646         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5647         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5648         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5649         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5650         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5651         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5652         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5653         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5654         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5655         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5656         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5657         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5658         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5659         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5660         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5661         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5662         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5663         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5664         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5665         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5667         * pthreadP.h: Remove FRAME_LEFT definition.
5668         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5669         already left frame.  Programs which have this problem are not POSIX
5670         compliant.
5671         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5673 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5675         * sysdeps/pthread/tst-timer.c: Check return values of the
5676         functions we test.
5678 2003-03-23  Roland McGrath  <roland@redhat.com>
5680         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5681         * tst-tls3mod.c: Likewise.
5682         * tst-tls1.c: Likewise.
5683         * tst-tls2.c: Likewise.
5685         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5686         undefined behavior.
5688         * tst-join5.c (tf1, tf2): Add a cast.
5690         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5692         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5693         Don't test anything.
5694         * tst-cond4.c: Likewise.
5695         * tst-cond6.c: Likewise.
5696         * tst-flock2.c: Likewise.
5697         * tst-mutex4.c: Likewise.
5698         * tst-rwlock4.c: Likewise.
5699         * tst-signal1.c: Likewise.
5700         * tst-spin2.c: Likewise.
5701         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5703         * tst-mutex4.c: Use test-skeleton.c.
5704         * tst-spin2.c: Likewise.
5705         * tst-sysconf.c: Likewise.
5706         * tst-barrier2.c: Likewise.
5707         * tst-cond4.c: Likewise.
5708         * tst-cond6.c: Likewise.
5709         * tst-rwlock4.c: Likewise.
5710         * tst-unload.c: Likewise.
5711         * tst-flock2.c (do_test): Use return instead of exit.
5713 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5715         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5717 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5719         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5720         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5721         instead of __lll_compare_and_swap.
5722         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5723         Likewise.
5724         Removed definition if __lll_compare_and_swap.
5726         * cancellation.c: Adjust for new form of compare&exchange macros.
5727         * cleanup_defer.c: Likewise.
5728         * init.c: Likewise.
5729         * libc-cancellation.c: Likewise.
5730         * old_pthread_cond_broadcast.c: Likewise.
5731         * old_pthread_cond_signal.c: Likewise.
5732         * old_pthread_cond_timedwait.c: Likewise.
5733         * old_pthread_cond_wait.c: Likewise.
5734         * pthread_cancel.c: Likewise.
5735         * pthread_create.c: Likewise.
5736         * pthread_detach.c: Likewise.
5737         * pthread_join.c: Likewise.
5738         * pthread_key_delete.c: Likewise.
5739         * pthread_setcancelstate.c: Likewise.
5740         * pthread_setcanceltype.c: Likewise.
5741         * pthread_timedjoin.c: Likewise.
5742         * pthread_tryjoin.c: Likewise.
5743         * sysdeps/pthread/createthread.c: Likewise.
5745 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5747         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5748         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5749         definitions.  Replace uses with calls to atomic_* functions.
5750         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5751         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5752         __lll_test_and_set calls with atomic_exchange_and_add and
5753         atomic_exchange calls respectively.
5754         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5755         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5756         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5757         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5758         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5759         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5760         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5762         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5763         returns the old value.
5765 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5767         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5768         int for variable OLDVAL and correct inline assembler contraint.
5769         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5770         type int for variable OLD.
5772         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5773         only for s390-32.
5774         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5775         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5776         instead of multiple_threads field in the TCB.
5778 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5780         * sysdeps/i386/i686/bits/atomic.h: Removed.
5781         * sysdeps/i386/i586/bits/atomic.h: Removed.
5782         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5783         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5784         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5785         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5786         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5787         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5788         * atomic.h: Removed.  Moved to glibc.
5790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5791         support for clock selection.
5793         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5794         signalling waiters.
5796 2003-03-18  Roland McGrath  <roland@redhat.com>
5798         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5799         Add __lll_rel_instr first.  Add memory clobber.
5800         (lll_mutex_unlock): Use __lll_test_and_set.
5801         From Paul Mackerras <paulus@samba.org>.
5803         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5804         unconditionally.
5805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5806         (SINGLE_THREAD_P):  Add `header.' prefix.
5807         From Paul Mackerras <paulus@samba.org>.
5809         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5810         pthread_timedjoin_np to ...
5811         (libpthread: GLIBC_2.3.3): ... here.
5812         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5814         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5815         Avoid shadowing VAL variable.
5817         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5818         New macro.
5820 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5822         * Makefile (tests): Add tst-cond11.
5823         * tst-cond11.c: New file.
5825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5826         struct passed to cleanup handler to eliminate one more
5827         instruction.
5828         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5830         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5831         (pthrad_cond_t): Replace __unused field with __clock.
5833         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5834         waken all waiters in cleanup handler.
5835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5838         * pthread_condattr_getclock.c: New file.
5839         * pthread_condattr_setclock.c: New file.
5840         * sysdeps/pthread/pthread.h: Declare these new functions.
5841         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5842         * Makefile (libpthread-routines): Add the new functions.
5843         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5844         Renamed field to value.  Document use of the bits.
5845         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5846         change.
5847         * pthread_condattr_setpshared.c: Likewise.
5848         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5849         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5850         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5851         Add __clock field.
5852         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5853         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5854         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5855         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5857         Implement clock selection.
5858         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5859         * pthread-errnos.sym: Add ENOSYS.
5860         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5861         _POSIX_CLOCK_SELECTION.
5862         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5864         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5865         invalid .size directive.
5867 2003-03-17  Roland McGrath  <roland@redhat.com>
5869         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5870         Formatting tweaks.
5872 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5874         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5875         Use __lll_add instead of spelling it out.  Use protected symbol names.
5876         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5877         Use __lll_add.
5878         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5879         Renamed from lll_compare_and_swap.  Use new name where necessary.
5880         (__lll_add): Defined.
5881         (__lll_dec_if_positive): Defined.
5882         (__lll_test_and_set): Defined.
5883         * sysdeps/ia64/pthread_spin_init.c: Removed.
5884         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5885         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5886         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5887         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5888         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5889         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5890         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5891         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5892         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5893         __sync_lock_release_si.
5894         Patch by Jakub Jelinek.
5896         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5897         Fix timeout handling.
5898         (__lll_timedwait_tid): Likewise.
5899         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5900         Patch by Jakub Jelinek.
5902         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5904 2003-03-17  Roland McGrath  <roland@redhat.com>
5906         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5907         * sysdeps/pthread/pthread_spin_init.c: New file.
5908         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5909         * sysdeps/powerpc/Makefile: New file.
5910         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5911         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5912         * sysdeps/powerpc/pthreaddef.h: New file.
5913         * sysdeps/powerpc/tcb-offsets.sym: New file.
5914         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5915         * sysdeps/powerpc/tls.h: New file.
5916         * sysdeps/powerpc/bits/atomic.h: New file.
5917         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5918         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5919         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5921         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5922         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5923         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5924         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5925         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5926         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5927         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5928         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5929         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5930         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5931         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5932         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5933         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5934         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5935         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5937         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5938         not gettimeofday.
5939         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5940         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5941         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5942         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5943         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5945 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5947         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5948         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5951         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5953 2003-03-16  Roland McGrath  <roland@redhat.com>
5955         * tst-fork4.c: Include <string.h>.
5956         * tst-signal2.c: Likewise.
5957         * tst-mutex5.c (do_test): exit -> return.
5958         * tst-mutex2.c: Include <stdlib.h>.
5960 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5962         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5963         (__lll_mutex_timedlock_wait): Correct expected value after
5964         spurious wakeup.  Otherwise we would never wait again.
5966         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5967         zone versus inline asm stupidity.  Use correct instructions.
5969         * tst-rwlock6.c: Add some more status output.
5971 2003-03-15  Roland McGrath  <roland@redhat.com>
5973         * sysdeps/pthread/configure.in: New file.
5974         * sysdeps/pthread/configure: New file (generated).
5976 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5978         * allocatestack.c (allocate_stack): Store the exact stack size of
5979         user allocated stacks.
5981 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5983         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5984         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5985         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5986         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5987         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5988         Use `header.' prefix.
5989         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5991 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5993         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5994         __builtin_frame_address, use stack pointer.
5996         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5997         instead of __builtin_frame_pointer.
5999 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
6001         * tst-basic1.c (do_test): Add cast to avoid warning.
6002         * tst-basic2.c (do_test): Likewise.
6004         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
6005         amount of stack correction.
6007         * tst-fork4.c: Use test-skeleton.c.
6009 2003-03-14  Roland McGrath  <roland@redhat.com>
6011         * init.c: Fix typo "#eli" for "#else".
6013 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
6015         * allocatestack.c (__stack_user): Use hidden_data_def.
6016         * pthread_create.c (__pthread_keys): Likewise.
6018         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
6020 2003-03-14  Roland McGrath  <roland@redhat.com>
6022         * tst-fork4.c: New file.
6023         * Makefile (tests): Add it.
6025         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
6026         we always define the padding space.
6027         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
6028         stopped supporting its own extensions fully.
6029         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
6030         struct also called `header', so `header.multiple_threads' is the field
6031         name to use on all machines.
6032         * allocatestack.c (allocate_stack): Use `header.' prefix.
6033         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6034         * pthread_create.c (__pthread_create_2_1): Likewise.
6035         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
6036         (THREAD_SELF): Likewise.
6037         * sysdeps/x86_64/tls.h: Likewise.
6038         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6039         (SINGLE_THREAD_P): Likewise.
6040         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6041         (SINGLE_THREAD_P): Likewise.
6042         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
6043         (SINGLE_THREAD_P): Likewise.
6045         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
6046         value directly.
6048 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
6050         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
6051         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
6053         * pthread_create.c (start_thread): setjmp is expected to return 0.
6055         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
6056         (THREAD_GETMEM_NC): Likewise.
6058 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
6060         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
6061         and the size of the stack which must be allocated is a multiple,
6062         allocate one more page.
6063         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
6064         MULTI_PAGE_ALIASING.
6066 2003-03-13  Roland McGrath  <roland@redhat.com>
6068         * pthread_create.c (start_thread): Set EXITING_BIT after the
6069         event-reporting (and destructors), not before.
6071 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
6073         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
6074         lll_futex_wake): Declare register variables as long int instead of
6075         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
6076         Make syscall arguments clobbered by the syscall.
6077         (lll_futex_wait): Define using lll_futex_timed_wait.
6079         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
6080         to void *.
6082         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
6083         PPID if [! NDEBUG].
6085         * allocatestack.c (nptl_ncreated): Only declare if
6086         COLORING_INCREMENT != 0.
6088         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
6089         (__libc_enable_asynccancel_2): Remove prototype.
6091         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
6092         ctid to match kernel.
6094 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6096         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
6097         libc_multiple_threads.
6098         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
6099         __libc_multiple_threads to...
6100         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
6102         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
6103         versioning.
6104         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6105         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6107         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
6108         (__pthread_once_internal): Define.
6110         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
6111         macros instead of .symver directly.
6112         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6113         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6115         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
6116         * sysdeps/x86_64/tcb-offsets.sym: New file.
6117         * sysdeps/x86_64/Makefile: New file.
6119         * sysdeps/i386/tcb-offsets.sym: Add SELF.
6120         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
6121         to access own pthread_t in TCB.
6122         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6123         Likewise.
6124         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6125         Likewise.
6126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6128 2003-03-12  Roland McGrath  <roland@redhat.com>
6130         * pthread-errnos.sym: New file.
6131         * Makefile (gen-as-const-headers): New variable, list that file.
6132         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
6133         header <pthread-errnos.h> instead of defining errno values here.
6134         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6135         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6136         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6137         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6138         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6139         Likewise.
6140         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6141         Likewise.
6142         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6144         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6145         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6146         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6147         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6148         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6149         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6150         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6151         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6152         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6153         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
6154         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6155         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
6156         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6157         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6158         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6159         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6160         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6161         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6162         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6163         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6164         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
6165         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
6166         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
6167         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6168         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6170         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
6171         CLONE_CHILD_SETTID worked.
6173 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6175         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
6176         file.
6177         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
6178         file.
6180         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6181         (pthread_cond_t): Add padding.
6183         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
6184         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
6185         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
6187         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
6188         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
6189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
6190         (__pthread_rwlock_timedrdlock): Likewise.
6191         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
6192         (__pthread_rwlock_wrlock): Likewise.
6193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
6194         (__pthread_rwlock_rdlock): Likewise.
6196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
6198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
6199         result of lock re-get if it fails.
6201 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6203         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
6204         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6205         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6208         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6209         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6210         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6211         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6212         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6214         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
6215         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
6217         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
6218         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
6219         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
6220         (create_thread): Likewise.
6221         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
6222         * init.c (__pthread_initialize_minimal_internal): Initialize
6223         __libc_multiple_threads_ptr if necessary.
6224         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
6225         __pthread_multiple_threads and __libc_multiple_threads_ptr.
6226         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
6227         __libc_multiple_threads.
6228         (__libc_pthread_init): Return pointer to __libc_pthread_init if
6229         necessary.
6231         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
6232         (THREAD_SETMEM_NC): Likewise.
6234         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
6235         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
6236         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
6237         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
6239         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
6240         Eliminate one entire instruction.
6242         * cancellation.c (__pthread_enable_asynccancel_2): New function.
6243         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
6244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6245         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
6246         instead of __pthread_enable_asynccancel.
6247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6248         (__pthread_cond_wait): Likewise.
6249         * sysdeps/pthread/pthread_cond_timedwait.c
6250         (__pthread_cond_timedwait): Likewise.
6251         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6254         (__condvar_cleanup): Wake up all waiters in case we got signaled
6255         after being woken up but before disabling asynchronous
6256         cancellation.
6257         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6259         (__condvar_cleanup): Likewise.
6261         * init.c (__NR_set_tid_address): If already defined, don't redefine.
6262         Make it an error if architecture has no #if case.  Add x86-64.
6264         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6265         pt-initfini.s generation.
6267         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6268         (TLS_INIT_TP): Fix typo.
6270 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6272         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6273         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6275         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6276         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6277         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6278         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6279         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6280         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6281         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6282         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6284 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6286         * sysdeps/pthread/pthread_cond_timedwait.c
6287         (__pthread_cond_timedwait): Return the result of the final
6288         locking.  If it succeeds, the regular function return value.
6290         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6291         Return result of the final locking.
6292         * version.c (__nptl_main): Work around problems with the strange
6293         INTERNAL_SYSCALL macro on ppc32.
6294         * init.c (__pthread_initialize_minimal_internal): Unblock
6295         SIGCANCEL in case the parent blocked it.
6296         Reported by Paul Mackerras <paulus@samba.org>.
6298         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6299         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6300         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6302 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6304         * sysdeps/pthread/pthread_cond_timedwait.c
6305         (__pthread_cond_timedwait): Unlock and fail if
6306         __pthread_mutex_unlock_internal failed.
6308         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6309         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6310         Use ARCH_CLONE.
6311         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6312         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6313         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6314         ALLOCATE_STACK): New macros.
6315         (TLS_TPADJ): New macro.
6316         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6317         (allocate_stack): Handle TLS_DTV_AT_TP and
6318         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
6319         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6320         Don't set PD->self.
6321         * init.c [__ia64__] (__NR_set_tid_address): Define.
6323         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6324         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6325         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6326         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6327         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6328         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6329         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6330         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6331         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6332         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6333         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6334         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6335         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6336         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6337         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6338         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6339         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6340         * sysdeps/ia64/bits/atomic.h: New file.
6341         * sysdeps/ia64/Makefile: New file.
6342         * sysdeps/ia64/pthread_spin_init.c: New file.
6343         * sysdeps/ia64/pthread_spin_lock.c: New file.
6344         * sysdeps/ia64/pthread_spin_trylock.c: New file.
6345         * sysdeps/ia64/pthread_spin_unlock.c: New file.
6346         * sysdeps/ia64/pthreaddef.h: New file.
6347         * sysdeps/ia64/tcb-offsets.sym: New file.
6348         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6349         * sysdeps/ia64/tls.h: New file.
6351         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6352         to syscall instead of no arguments.
6354 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
6356         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6357         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6358         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6359         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6361         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6362         unused code.
6364         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6366         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6367         lowlevelbarrier.sym.
6368         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6369         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6370         Include lowlevelbarrier.h and don't define offsets locally.
6371         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6373         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6374         (__lll_mutex_lock_wait): Reverse order of first two parameters.
6375         (__lll_mutex_timedlock_wait): Likewise.
6376         (lll_mutex_lock): Adjust asm for that.
6377         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
6378         (lll_lock): Adjust asm for operand order change.
6379         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6380         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6382         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6383         Reverse order of parameters.
6384         (__lll_timedwait_tid): Remove regparms attribute.
6385         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6386         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6388         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6389         (__lll_timedwait_tid): Remove one unnecessary instruction.
6391         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6392         __lll_mutex_timedlock_wait only for NOT_IN_libc.
6393         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6394         lowlevelmutex.S.
6396         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6397         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6398         for NOT_IN_libc.
6399         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6400         lowlevellock.S.
6402         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6403         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
6404         for libc.so.
6405         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6406         define LOCK here (if UP is not defined).  The actual code is in
6407         lowlevelmutex.S.
6409         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6410         LOCK is already defined.  Don't define lll_unlock_wake_cb and
6411         __lll_timedwait_tid for libc.so.
6412         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6413         define LOCK here (if UP is not defined).  The actual code is in
6414         lowlevellock.S.
6416         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6417         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6418         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6419         instead of lowlevelsem.h.
6420         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6421         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6422         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6424         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6425         lowlevelrwlock.sym.
6426         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6427         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6428         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6430         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6431         register loading.
6432         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6433         last changed.  D'oh.
6435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6437         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6438         of __libc_locking_needed.
6439         (lll_trylock): Initialize %eax to zero.
6441         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6442         pthread_cond_t definition.
6444 2003-03-10  Roland McGrath  <roland@redhat.com>
6446         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6447         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6448         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6449         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6450         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6452         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6453         Instead of setting PD->multiple_threads, set globals
6454         __pthread_multiple_threads and __libc_multiple_threads.
6455         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6456         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6457         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6459         * descr.h (struct pthread): Conditionalize first member on
6460         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
6461         containing an anonymous tcbhead_t.  Move `list' member out.
6462         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6463         * allocatestack.c: Remove use of `header.data.' prefix.
6464         * pthread_create.c: Likewise.
6465         * init.c (__pthread_initialize_minimal_internal): Likewise.
6466         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6467         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6468         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6469         * sysdeps/x86_64/tls.h: Likewise.
6470         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6471         (SINGLE_THREAD_P): Likewise.
6472         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6473         (SINGLE_THREAD_P): Likewise.
6474         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6475         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6477 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
6479         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6481         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6482         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6484         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6485         leftovers from the ia32 code.
6487         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6488         memory load.
6489         (clear_once_control): Don't load %esi.
6491         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6492         handling.
6494         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6496         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6497         * sysdeps/unix/sysv/linux/createthread.c: ...here.
6499         * Makefile (tests): Add tst-cond10.
6500         * tst-cond10.c: New file.
6502 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
6504         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6505         * tst-signal3.c (do_test): Likewise.
6506         * tst-sem5.c (do_test): Likewise.
6507         * tst-kill6.c (do_test): Likewise.
6508         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
6510         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6511         of inc/dec.
6512         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6513         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6514         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6515         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6521         Likewise.
6522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6523         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6524         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6526         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6527         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6528         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6529         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6531         * allocatestack.c (allocate_stack): If mprotect() fails free the
6532         TLS memory.
6534 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6536         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6538         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6539         lll_wake_tid.  This was used only to work around kernel limits in
6540         the early days.
6541         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6542         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6543         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6544         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6546         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6547         (__pthread_initialize_minimal_internal): Change initialization of
6548         __static_tls_align_m1 appropriately.
6549         * pthreadP.h (__static_tls_align_m1): Renamed from
6550         __static_tls_align.
6551         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6552         instead of __static_tls_align-1.
6554 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6558         * pthread_create.c: Define __pthread_keys using nocommon
6559         attribute, not by placing it explicitly in bss.
6560         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6562         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6563         Use it in mmap call to allocate stacks.
6565         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6567         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6568         result of the thread function.
6570 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6572         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6573         version is just fine.
6575         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6576         (__pthread_child_handler): Renamed from pthread_child_handler,
6577         exported, and marked hidden.  Change all users.
6578         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6579         free __pthread_child_handler from child list.
6581 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6583         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6585         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6586         Fix handling of cancellation and failing pthread_mutex_unlock call.
6587         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6588         (__pthread_cond_wait): Likewise.
6590         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6591         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6592         lll_futex_timed_wait call.
6593         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6594         (pthread_rwlock_timedwrlock): Likewise.
6596         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6597         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6598         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6600         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6601         check of lll_futex_wake return value.
6603 2003-03-03  Roland McGrath  <roland@redhat.com>
6605         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6607         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6608         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6609         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6611 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6613         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6614         error for CPU clocks.
6616         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6617         _POSIX_MONOTONIC_CLOCK.
6618         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6620         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6621         recent kernels.
6623 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6625         * descr.h (struct pthread): Move cleanup field to the front.
6627 2003-03-01  Roland McGrath  <roland@redhat.com>
6629         * sem_open.c (sem_open): Braino fix.
6631 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6633         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6635         __pthread_cleanup_pop functionality.
6636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6638         * descr.h (struct pthread): Move tid field to the front now that
6639         it is often used.
6641         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6642         (__lll_mutex_timedlock_wait): Remove.
6643         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6644         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6645         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6646         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6647         (lll_unlock_wake_cb): Don't save and restore %esi.
6648         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6649         %esi.
6650         (__lll_timedwait_tid): Add alignment.
6651         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6652         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6653         %esi.
6654         (__lll_timedwait_tid): Removed.
6655         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6656         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6657         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6658         (pthread_barrier_wait): Don't save, load, and restore %esi for
6659         last thread.
6660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6661         (__pthread_cond_signal): Don't save, load, and restore %esi.
6662         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6663         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6664         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6665         Don't save, load, and restore %esi.
6667 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6669         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6670         Release lock before waking up the waiters.
6672         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6674         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6675         (reader_thread): Likewise.
6677         * sysdeps/pthread/pthread_rwlock_unlock.c
6678         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6679         to wake up readers if there are none.
6681         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6682         Release internal lock before wake threads.
6684 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6686         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6687         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6688         predefined.
6689         * tst-rwlock9.c: Likewise.
6690         * tst-rwlock10.c: New file.
6691         * tst-rwlock11.c: New file.
6693         * Makefile (tests): Add tst-dlsym1.
6694         * tst-dlsym1.c: New file.
6696         * init.c (__pthread_initialize_minimal_internal): Set
6697         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6698         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6700 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6702         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6704         * tst-cond2.c: Fix sychronization with child.
6706         * tst-rwlock8.c (reader_thread): Remove unused variable.
6708         * Makefile: Add rules to build and run tst-tls3.
6709         * tst-tls3.c: New file.
6710         * tst-tls3mod.c: New file.
6712         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6713         * tst-rwlock8.c: New file.
6714         * tst-rwlock9.c: New file.
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6716         complete broken rwlock implementation.
6717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6718         Likewise.
6719         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6720         Likewise.
6721         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6722         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6723         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6724         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6725         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6726         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6727         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6729 2003-02-23  Roland McGrath  <roland@redhat.com>
6731         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6733 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6735         * Makefile (tests): Add tst-context1.
6736         * tst-context1.c: New file.
6738         * Makefile (tests): Add tst-tls1 and tst-tls2.
6739         * tst-tls1.c: New file.
6740         * tst-tls2.c: New file.
6742         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6743         for failed cmpxchg.
6745         * pthread_create.c (start_thread): Set EXITING_BIT early.
6747         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6748         (THREAD_GETMEM_NC): Likewise.
6750 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6752         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6753         off 3 more bytes by using offset-less instructions when possible.
6755         * Makefile: Add dependency for $(objpfx)version.d.
6757         * eintr.c (eintr_source): Add unnecessary return but the compiler
6758         insists.
6760         * tst-kill3.c: Include <unistd.h>.
6762 2003-02-21  Roland McGrath  <roland@redhat.com>
6764         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6766 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6768         * Makefile (tests): Add tst-eintr1.
6769         (distribute): Add eintr.c.
6770         * tst-eintr1.c: New file.
6771         * eintr.c: New file.
6773         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6775         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6776         Disallow sending SIGCANCEL.
6778         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6779         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6780         * tst-kill1.c: New file.
6781         * tst-kill2.c: New file.
6782         * tst-kill3.c: New file.
6783         * tst-kill5.c: New file.
6784         * tst-kill6.c: New file.
6785         * tst-basic7.c: Renamed to...
6786         * tst-kill4.c: ...this.
6788 2003-02-21  Roland McGrath  <roland@redhat.com>
6790         * Makefile (install-lib-ldscripts): New variable.
6792 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6794         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6795         * pthread_cancel.c: Use INVALID_TD_P.
6796         * pthread_detach.c: Likewise.
6797         * pthread_getschedparam.c: Likewise.
6798         * pthread_setschedparam.c: Likewise.
6799         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6800         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6801         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6802         * pthread_timedjoin.c: Likewise.
6804         * tst-basic7.c: Include <signal.h>.
6806         * pthread_join.c (pthread_join): Limited checking for invalid
6807         descriptors.
6808         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6810 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6812         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6813         beginning of the loop.  Clear the entire first block of TSD.
6814         * Makefile (tests): Add tst-key4.
6815         * tst-key4.c: New file.
6817 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6819         * Makefile (tests): Add tst-basic7.
6820         * tst-basic7.c: New file.
6822         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6823         Add some more __builtin_expect.
6825         * pthreadP.h: Define dummy version of DEBUGGING_P.
6827 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6829         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6830         _POSIX_THREAD_PRIORITY_SCHEDULING.
6831         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6832         _XOPEN_REALTIME_THREADS.
6833         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6835         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6836         kernel returns EINVAL for PID <= 0, work around it.
6838         * Makefile (tests): Add tst-signal5.
6839         * tst-signal5.c: New file.
6841         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6842         and LOGIN_NAME_MAX.
6844         * tst-cancel1.c (tf): Block all signals.
6846         * Makefile (tests): Add tst-basic6.
6847         * tst-basic6.c: New file.
6849         * tst-basic1.c: Add test for process ID.
6851         * Makefile (tests): Add tst-cancel10.
6852         * tst-cancel10.c: New file.
6854         * Makefile (tests): Add tst-signal4.
6855         * tst-signal4.c: New file.
6857         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6858         __sigismember instead of sigismember.  Add __builtin_expect.
6860 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6862         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6863         pthread_setcancelstate, and pthread_rwlock_setpshared.
6865         * tst-cancel7.c (do_test): Make sure the pid file exists before
6866         canceling the thread.
6868         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6869         pthread_rwlock_timedrdlock tests.
6870         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6871         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6872         Check for invalid tv_nsec field.
6873         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6874         Likewise.
6876         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6877         recursive mutex of overflow.
6879         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6881         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6882         going into an endless loop.
6883         * Makefile (tests): Add tst-cancel9.
6884         * tst-cancel9.c: New file.
6886         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6888 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6890         * tst-mutex5.c (do_test): Add more timedlock tests.
6892         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6893         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6895         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6896         use INLINE_SYSCALL.  Error number is returned, not -1.
6898         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6899         and __deallocate_stack with internal_function.
6900         * pthread_create.c: Adjust definitions appropriately.
6901         * allocatestack.c: Likewise.
6903         * pthread_join.c: Add one more __builtin_expect.
6904         * pthread_timedjoin.c: Likewise.
6906         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6907         not data of sequence number does not match.
6908         Add one __builtin_expect.
6910         * Makefile (tests): Add tst-clock1.
6911         * tst-clock1.c: New file.
6913         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6914         negative arguments.
6915         * Makefile (tests): Add tst-basic5.
6916         * tst-basic5.c: New file.
6918 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6920         * Makefile (tests): Add tst-basic4.
6921         * tst-basic4.c: New file.
6923         * pthreadP.h: Add declaraction for __nptl_nthreads.
6924         * pthread_create.c: Define __nptl_nthreads
6925         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6926         after thread is done.  If then zero, call exit(0).
6927         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6928         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6929         * init.c (pthread_functions): Initialize ptr_nthreads.
6930         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6931         (__reclaim_stacks): Decrement __nptl_nthreads.
6932         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6933         Define.
6934         * Makefile (tests): Add tst-basic3.
6935         * tst-basic3.c: New file.
6937         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6938         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6939         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6940         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6941         if asynchronous canceling is enabled.
6942         * pthread_join.c (pthread_join): When recognizing circular joins,
6943         take into account the other thread might be already canceled.
6944         * Makefile (tests): Add tst-join5.
6945         * tst-join5.c: New file.
6947         * Makefile (tests): Add tst-join4.
6948         * tst-join4.c: New file.
6950 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6952         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6954 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6956         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6957         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6958         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6959         warning.
6960         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6961         to avoid warning.
6962         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6963         error if lll_futex_wake failed.
6965 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6968         handling of cancellation and failung pthread_mutex_unlock call.
6969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6970         * Makefile (tests): Add tst-cond8 and tst-cond9.
6971         * tst-cond8.c: New file.
6972         * tst-cond9.c: New file.
6974         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6976         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6977         non-standard initializers with __USE_GNU.
6979         * Makefile (tests): Add tst-cleanup3.
6980         * tst-cleanup3.c: New file.
6982 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6984         * Makefile (tests): Add tst-attr1 and tst-attr2.
6985         * tst-attr1.c: New file.
6986         * tst-attr2.c: New file.
6988         * Makefile: Add rules to build and run tst-atfork2 test.
6989         * tst-atfork2.c: New file.
6990         * tst-atfork2mod.c: New file.
6992         * sysdeps/unix/sysv/linux/unregister-atfork.c
6993         (__unregister_atfork): Free the memory allocated for the handlers
6994         after removing them from the lists.
6996         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6997         cleanup function.
6999         * tst-atfork1.c (do_test): Wait for the child we forked.
7000         Report error in child.
7002         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
7004         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
7006 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
7008         * Makefile (tests): Add tst-cancel8.
7009         * tst-cancel8.c: New file.
7011         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
7012         clearing of control variable.
7013         * Makefile (tests): Add tst-once3 and tst-once4.
7014         * tst-once3.c: New file.
7015         * tst-once4.c: New file.
7017 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
7019         * sysdeps/sh/Makefile: New file.
7020         * sysdeps/sh/bits/atomic.h: New file.
7021         * sysdeps/sh/pthread_spin_init.c: New file.
7022         * sysdeps/sh/pthread_spin_lock.c: New file.
7023         * sysdeps/sh/pthread_spin_trylock.S: New file.
7024         * sysdeps/sh/pthread_spin_unlock.S: New file.
7025         * sysdeps/sh/pthreaddef.h: New file.
7026         * sysdeps/sh/tcb-offsets.sym: New file.
7027         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
7028         * sysdeps/sh/tls.h: New file.
7029         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
7030         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
7031         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
7032         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
7033         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
7034         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
7035         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
7036         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
7037         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
7038         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
7039         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
7040         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
7041         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
7042         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
7043         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
7044         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
7045         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
7046         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
7047         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
7048         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
7049         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
7050         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
7051         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
7052         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
7053         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
7054         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
7055         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
7056         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
7057         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
7058         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
7060 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
7062         * tst-cond2.c: Rearrange code to not rely on behavior undefined
7063         according to POSIX.
7065         * tst-basic2.c (do_test): Lock mutex before creating the thread.
7067 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
7069         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
7070         (TLS_GET_FS): New #define.
7071         (TLS_SET_FS): New #define.
7072         Correct value of __NR_set_thread_area.
7074         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
7076 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
7078         * Makefile (tests): Add tst-popen1.
7079         * tst-popen1.c: New file.
7081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
7082         but inactive generalization.
7083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7085         Minor optimization, remove one instruction.
7086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7088 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7090         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
7092 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7094         * init.c (__NR_set_tid_address): Add #ifdef for s390.
7095         * sysdeps/pthread/pthread_barrier_wait.c: New file.
7096         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
7097         * sysdeps/pthread/pthread_cond_signal.c: New file.
7098         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
7099         * sysdeps/pthread/pthread_cond_wait.c: New file.
7100         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
7101         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
7102         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
7103         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
7104         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
7105         * sysdeps/s390/Makefile: New file.
7106         * sysdeps/s390/bits/atomic.h: New file.
7107         * sysdeps/s390/pthread_spin_init.c: New file.
7108         * sysdeps/s390/pthread_spin_lock.c: New file.
7109         * sysdeps/s390/pthread_spin_trylock.c: New file.
7110         * sysdeps/s390/pthread_spin_unlock.c: New file.
7111         * sysdeps/s390/pthreaddef.h: New file.
7112         * sysdeps/s390/tcb-offsets.sym: New file.
7113         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
7114         * sysdeps/s390/tls.h: New file.
7115         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
7116         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
7117         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
7118         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
7119         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
7120         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
7121         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7122         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
7123         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
7124         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
7125         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
7126         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
7127         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
7128         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
7129         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
7130         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
7131         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
7132         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
7133         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
7134         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
7135         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
7136         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7137         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
7139 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
7141         * atomic.h: Add a couple more default implementations.
7142         (atomic_compare_and_exchange_acq): Use
7143         __arch_compare_and_exchange_32_acq in return value definition.  It
7144         always exists.
7145         (atomic_bit_set): Renamed from atomic_set_bit.
7146         Add missing atomic_ prefixes.
7148         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
7149         thread library is available, use correct value to mark initialized
7150         once variable.
7152 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
7154         * allocatestack.c (allocate_stack): Use __getpagesize instead of
7155         __sysconf to determine pagesize.
7157         * pthread_create.c: Include <atomic.h>.
7158         * allocatestack.c (allocate_stack): Implement coloring of the
7159         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
7160         size minus one.  Adjust users.
7161         * sysdeps/i386/i686/Makefile: New file.
7163 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
7165         * allocatestack.c: Improve comment throughout the file.
7167         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7168         (__lll_lock_wait): Add branch prediction.
7169         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7170         (__lll_lock_wait): Likewise.
7171         (lll_unlock_wake_cb): Removed.
7173 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
7175         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
7176         _POSIX_THREAD_PRIORITY_SCHEDULING.
7178 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
7180         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7181         Fix return type of ptr___pthread_getspecific.
7183 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
7185         * Makefile (tests): Add tst-umask1.
7186         (tst-umask1-ARGS): Define.
7187         * tst-umask1.c: New file.
7189 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
7191         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
7192         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
7193         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
7194         pthread_rwlock_unlock.
7195         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
7196         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
7197         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
7199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7200         New file.
7201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
7202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7203         New file.
7204         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
7205         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
7206         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
7207         New file.
7208         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
7209         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
7210         New file.
7211         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
7212         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
7213         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
7214         New file.
7215         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
7216         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
7217         New file.
7218         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
7220         * Makefile (libpthread-routines): Remove lowlevelcond and
7221         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
7222         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
7223         and pthread_cond_broadcast.
7224         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
7225         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
7226         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
7227         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
7228         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
7229         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
7230         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
7231         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
7232         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
7233         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
7234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
7235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
7236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
7237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
7238         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
7239         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
7240         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
7241         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
7242         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
7243         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
7244         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
7245         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
7246         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
7247         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
7248         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
7249         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
7250         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
7251         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
7252         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
7253         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
7254         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
7256         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
7257         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
7258         of the code is moved to ...
7259         * sysdeps/pthread/createthread.c: ...here.  New file.
7261 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
7263         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7264         (__new_sem_post): Clear %eax before returning.
7265         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7267         * Makefile (tests): Add tst-cleanup2.
7268         * tst-cleanup2.c: New file.
7270         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7271         Interpret first parameter correctly.
7273 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
7275         * Makefile (headers): Add bits/semaphore.h.
7277 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
7279         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7280         if not SHARED.
7282 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
7284         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7285         must be used and mapping failed.
7286         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7288         * Makefile (CFLAGS-pthread_self.os): Define this, not
7289         CFLAGS-pthread_self.c.
7291 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7293         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7294         lll_unlock_wake_cb.
7296         * Makefile (libpthread-routines): Add version.  Add rules to build
7297         version.os and banner.h.
7298         * version.c: New file.
7300 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
7302         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7303         the alias unconditional.
7304         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
7306 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7308         * Makefile (CFLAGS-pthread_self.c): New definition.
7310 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7312         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7313         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7314         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7315         * init.c (__pthread_initialize_minimal_internal): Likewise.
7317 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
7319         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7321         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7322         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7323         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7324         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7325         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7326         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7328 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7330         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7331         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7332         * tst-cancel-wrappers.sh: Remove all exceptions.
7334 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
7336         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7337         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
7339         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7340         Use __libc_pthread_functions array if SHARED.
7342         * pthreadP.h: Move pthread_cond_2_0_t definition to...
7343         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7345         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7346         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7347         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7348         __libc_ptf_call instead of __libc_maybe_call.
7349         (PTF): New #define.
7350         (__libc_cleanup_region_start): Wrap function name with PTF call.
7351         (__libc_cleanup_region_end): Likewise.
7352         (__libc_cleanup_end): Likewise.
7354         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7355         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7356         * pthread_key_create.c: Add __pthread_key_create_internal alias.
7357         * pthreadP.h: Add prototypes.
7359         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7360         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7361         __pthread_rwlock_unlock aliases.
7362         * pthreadP.h: Add prototypes for new aliases.
7364         * pthreadP.h (struct pthead_functions): Moved to...
7365         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
7366         * init.c (pthread_functions): Add initializers for new elements.
7368         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7369         __pthread_cleanup_pop_restore aliases.
7370         * pthreadP.h: Add prototypes.
7372         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7373         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7374         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7375         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7376         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7377         * pthreadP.h: Adjust prototypes and callers.
7379 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
7381         * Makefile (tests): Add tst-cancel7.
7382         (tst-cancel7-ARGS): New variable.
7383         * tst-cancel7.c: New file.
7385         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7386         around gcc defficiencies.
7387         * old_pthread_cond_signal.c: Likewise.
7388         * old_pthread_cond_timedwait.c: Likewise.
7389         * old_pthread_cond_wait.c: Likewise.
7391         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7393 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7395         * Makefile (tests): Add tst-cond7.
7396         * tst-cond7.c: New file.
7398         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7399         (condvar_cleanup): Get condvar address from the right place.
7401         * atomic.h: Correct definitions of atomic_full_barrier,
7402         atomic_read_barrier, atomic_write_barrier.
7404         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7405         race-free.
7406         * old_pthread_cond_signal.c: Likewise.
7407         * old_pthread_cond_timedwait.c: Likewise.
7408         * old_pthread_cond_wait.c: Likewise.
7410 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
7412         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7414 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7416         * pthreadP.h (pthread_cond_2_0_t): New type.
7417         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7418         Use new type for the 2.0 condvar function prototypes.
7419         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7420         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7421         parameter.
7422         * old_pthread_cond_destroy.c: Likewise.
7423         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
7424         * old_pthread_cond_signal.c: Likewise.
7425         * old_pthread_cond_timedwait.c: Likewise.
7426         * old_pthread_cond_wait.c: Likewise.
7428         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7429         (__pthread_cond_wait): Don't save cancellation mode and seq value
7430         in same location.
7432         * herrno.c (__h_errno_location): Don't define as weak.
7434 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7436         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7437         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7438         and pthread_cond_wait.
7439         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7440         Renamed to...
7441         (__pthread_cond_broadcast_2_0): ... this.
7442         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7443         Renamed to...
7444         (__pthread_cond_destroy_2_0): ... this.
7445         * old_pthread_cond_init.c (__old_pthread_cond_init):
7446         Renamed to...
7447         (__pthread_cond_init_2_0): ... this.
7448         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7449         Renamed to...
7450         (__pthread_cond_signal_2_0): ... this.
7451         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7452         Renamed to...
7453         (__pthread_cond_wait_2_0): ... this.
7454         * pthread_cond_destroy.c: Include shlib-compat.h.
7455         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7456         * pthread_cond_init.c: Include shlib-compat.h.
7457         (pthread_cond_init): Change strong_alias into versioned_symbol.
7458         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7459         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7460         fields.
7461         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7462         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7463         __pthread_cond_wait_2_0): New prototypes.
7464         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7465         __old_pthread_cond_init, __old_pthread_cond_signal,
7466         __old_pthread_cond_wait): Removed.
7467         * init.c: Include shlib-compat.h.
7468         (pthread_functions): Guard ptr___pthread_attr_init_2_0
7469         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7470         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7471         ptr___pthread_cond_*_2_0 fields.
7472         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7473         pthread_cond_*@GLIBC_2.0 compatibility symbols.
7475         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7476         LIBC_SIGACTION was not yet defined.
7477         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7478         [!defined LIBC_SIGACTION] (__sigaction): New function and
7479         libc_hidden_weak.
7480         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7481         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7483 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7485         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7487 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
7489         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7490         New, larger type definition.
7491         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7492         implementation.
7493         * Versions [libpthread]: Add definitions for new pthread_cond_*
7494         interfaces for version GLIBC_2.3.2.
7495         * pthread_cond_init.c: Update initialization for new type definition.
7496         * Makefile (libpthread-routines): Remove pthread_cond_wait,
7497         pthread_cond_timedwait, pthread_cond_signal, and
7498         pthread_cond_broadcast.  Add old_pthread_cond_init,
7499         old_pthread_cond_destroy, old_pthread_cond_wait,
7500         old_pthread_cond_timedwait, old_pthread_cond_signal, and
7501         old_pthread_cond_broadcast.
7502         * old_pthread_cond_broadcast.c: New file.
7503         * old_pthread_cond_destroy.c: New file.
7504         * old_pthread_cond_init.c: New file.
7505         * old_pthread_cond_signal.c: New file.
7506         * old_pthread_cond_timedwait.c: New file.
7507         * old_pthread_cond_wait.c: New file.
7508         * pthreadP.h: Add prototypes for the compatibility interfaces.
7510         * pthread_cond_destroy.c: Don't include <errno.h>.
7512 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
7514         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7515         unnecessary zero offset when addressing MUTEX.
7517 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7519         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7520         __register_atfork.
7521         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7522         for __register_atfork.
7524 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7526         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7527         instead of ASSEMBLER test macro.
7529         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7530         __libc_current_sigrtmax): Add libc_hidden_def.
7532         * sysdeps/pthread/list.h: Remove assert.h include.
7534 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7536         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7537         __pthread_initialize_minimal_internal not
7538         __pthread_initialize_minimal.
7540 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7542         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7543         __pthread_initialize_minimal as hidden.
7545         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7546         constructor.
7548 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7550         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7551         $(common-objpfx)format.lds, include that into the output script.
7552         Fix comment.
7553         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7555 2002-12-28  Andreas Jaeger  <aj@suse.de>
7557         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7558         nsec resolution changes.
7559         (xstat64_conv): Likewise.
7560         (xstat32_conv): Likewise.
7561         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7562         struct kernel_stat.
7563         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7564         structs stat and stat64.
7565         * time/time.h (__timespec_defined): Define for __USE_MISC.
7566         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7568 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7570         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7571         argument.
7572         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7573         (pthread_exit): Use strong_alias to avoid warnings.
7574         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7575         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7576         ptr___pthread_attr_init_2_*.
7577         * init.c (pthread_functions): Adjust.
7579 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7581         * forward.c: Make all functions available by default again.  It
7582         caused too much trouble.
7584         * pt-siglongjmp.c: Removed.
7586 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7588         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7589         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7590         * sysdeps/i386/Makefile: New file.
7591         * sysdeps/i386/tcb-offsets.sym: New file.
7592         * sysdeps/pthread/tcb-offsets.h: New file.
7593         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7594         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7596         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7597         __register_atfork...
7598         (GLIBC_2.3.2): ...here.
7600 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7602         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7603         pthread_attr_setstackaddr with __attribute_deprecated__.
7605 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7607         * pt-system.c (system): Remove cancellation handling.
7608         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7609         cancellation routines.
7611 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7613         * descr.h: Include <dl-sysdep.h>.
7614         (struct pthread): Move header.data.list to the back of the struct.
7615         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7616         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7617         (SYSINFO_OFFSEET): Likewise.
7619 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7621         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7622         Define.
7623         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7624         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7625         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7626         (USE_DL_SYSINFO): Undef.
7628 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7630         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7631         $(common-objpfx)libc.so.
7632         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7633         it is bigger than pipe buffer size even on arches with bigger
7634         page size.
7635         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7637 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7639         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7640         correct errno access for case that USE___THREAD is not defined.
7642 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7644         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7645         Patch by Marijn Ros <marijn@mad.scientist.com>.
7647 2002-12-22  Roland McGrath  <roland@redhat.com>
7649         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7651 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7653         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7655 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7657         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7658         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7659         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7661         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7662         of int $0x80.
7663         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7664         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7665         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7666         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7667         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7668         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7669         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7670         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7672         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7673         sysenter.
7674         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7676         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7678         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7679         in new TCB.
7680         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7681         that sysinfo is properly initialized.
7682         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7683         to 1 only for ld.so.
7685         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7686         RTLD_CORRECT_DYNAMIC_WEAK.
7688 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7690         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7691         Use return 0 as 6th argument to FORWARD4.
7692         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7694 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7696         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7697         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7698         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7699         (INIT_SYSINFO): New #define.
7700         (TLS_TP_INIT): Use INIT_SYSINFO.
7701         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7702         At test to make sure SYSINFO_OFFSET value is correct.
7703         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7705 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7707         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7708         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7709         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7710         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7711         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7712         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7713         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7715 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7717         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7718         macro instead of using int $0x80 directly.
7720         * sysdeps/pthread/bits/stdio-lock.h: New file.
7721         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7722         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7723         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7724         * Makefile (routines): Add libc-lowlevelmutex.
7726         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7727         __i686.get_pc_thunk.dx.
7729 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7731         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7732         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7733         ($(objpfx)tst-cancel-wrappers.out): New rule.
7734         * tst-cancel-wrappers.sh: New test.
7735         * tst-locale1.c: Include signal.h.
7736         (uselocale): Test static linking of __libc_current_sigrt*.
7738 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7740         * Makefile (tests): Add tst-cancel6.
7741         * tst-cancel6.c: New file
7743 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7745         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7746         Define meaningfully for assembler as well.
7747         * pthreadP.h (struct pthread_functions): Remove
7748         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7749         and ptr_pthread_attr_init_2_1 fields.
7750         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7751         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7752         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7753         (FORWARD3): Define using FORWARD4.
7754         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7755         versions.
7756         * pt-system.c: Remove duplicate stdlib.h include.
7758 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7760         * sem_init.c: Define sem_init@GLIBC_2.0.
7761         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7762         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7764         * flockfile.c: Moved to...
7765         * sysdeps/pthread/flockfile.c: ...here.  New file.
7766         * funlockfile.c: Moved to...
7767         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7768         * ftrylockfile.c: Moved to...
7769         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7771 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7773         * libc-cancellation.c: Guard both function with
7774         #if !defined NOT_IN_libc.
7775         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7776         automatically provided pthread wrappers.
7777         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7778         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7779         nor in libpthread.
7780         * pt-open.c: Removed.
7781         * pt-fcntl.c: Removed.
7782         * pt-fsync.c: Removed.
7783         * pt-lseek.c: Removed.
7784         * pt-msgrcv.c: Removed.
7785         * pt-msgsnd.c: Removed.
7786         * pt-msync.c: Removed.
7787         * pt-nanosleep.c: Removed.
7788         * pt-open64.c: Removed.
7789         * pt-pause.c: Removed.
7790         * pt-pread.c: Removed.
7791         * pt-pread64.c: Removed.
7792         * pt-pwrite.c: Removed.
7793         * pt-pwrite64.c: Removed.
7794         * pt-read.c: Removed.
7795         * pt-recv.c: Removed.
7796         * pt-recvfrom.c: Removed.
7797         * pt-recvmsg.c: Removed.
7798         * pt-send.c: Removed.
7799         * pt-sendto.c: Removed.
7800         * pt-sigtimedwait.c: Removed.
7801         * pt-sigwait.c: Removed.
7802         * pt-wait.c: Removed.
7803         * pt-waitpid.c: Removed.
7804         * pt-write.c: Removed.
7805         * pt-accept.c: Removed.
7806         * pt-close.c: Removed.
7807         * pt-connect.c: Removed.
7808         * pt-lseek64.c: Removed.
7809         * pt-sendmsg.c: Removed.
7810         * pt-tcdrain.c: Removed.
7812 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7814         * init.c (__pthread_initialize_minimal_internal): Renamed from
7815         __pthread_initialize_minimal.  Make old name an alias.  This
7816         converts a normal relocation into a relative relocation.
7818         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7820         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7821         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7822         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7823         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7824         pt-sigwaitinfo, pt-waitid, and pt-writev.
7825         * pt-creat.c: Removed.
7826         * pt-poll.c: Removed.
7827         * pt-pselect.c: Removed.
7828         * pt-readv.c: Removed.
7829         * pt-select.c: Removed.
7830         * pt-sigpause.c: Removed.
7831         * pt-sigsuspend.c: Removed.
7832         * pt-sigwaitinfo.c: Removed.
7833         * pt-waitid.c: Removed.
7834         * pt-writev.c: Removed.
7836         * init.c (pthread_functions): New variable.
7837         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7838         (or NULL) to __libc_pthread_init.
7839         * forward.c: Rewrite to use __libc:pthread_functions array to get
7840         function addresses.
7841         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7842         prototype.
7843         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7844         Take new parameter.  Copy content of variable pointed to by it
7845         to __libc_pthread_init.
7847         * pthreadP.h (struct pthread_functions): New type.
7848         (__libc_pthread_init): Declare.
7850         * pthread_attr_destroy.c: Add namespace protected alias.
7851         * pthread_attr_getdetachstate.c: Likewise.
7852         * pthread_attr_getinheritsched.c: Likewise.
7853         * pthread_attr_getschedparam.c: Likewise.
7854         * pthread_attr_getschedpolicy.c: Likewise.
7855         * pthread_attr_getscope.c: Likewise.
7856         * pthread_attr_setdetachstate.c: Likewise.
7857         * pthread_attr_setinheritsched.c: Likewise.
7858         * pthread_attr_setschedparam.c: Likewise.
7859         * pthread_attr_setschedpolicy.c: Likewise.
7860         * pthread_attr_setscope.c: Likewise.
7861         * pthread_cond_broadcast.c: Likewise.
7862         * pthread_cond_destroy.c: Likewise.
7863         * pthread_cond_init.c: Likewise.
7864         * pthread_cond_signal.c: Likewise.
7865         * pthread_cond_wait.c: Likewise.
7866         * pthread_condattr_destroy.c: Likewise.
7867         * pthread_condattr_init.c: Likewise.
7868         * pthread_equal.c: Likewise.
7869         * pthread_exit.c: Likewise.
7870         * pthread_getschedparam.c: Likewise.
7871         * pthread_self.c: Likewise.
7872         * pthread_setcancelstate.c: Likewise.
7873         * pthread_setschedparam.c: Likewise.
7874         * pthread_mutex_destroy.c: Likewise.
7875         * pthread_mutex_init.c: Likewise.
7876         * pthreadP.h: Add prototypes for the aliases.
7878         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7879         multiple_threads member in correct TCB to 1.
7881         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7882         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7883         member of thread decriptor, otherwise return unconditionally 1.
7885 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7887         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7888         regular Linux version.  Remove file.
7889         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7890         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7891         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7892         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7893         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7894         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7895         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7896         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7897         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7898         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7899         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7900         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7901         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7902         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7903         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7904         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7905         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7906         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7907         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7908         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7909         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7910         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7911         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7912         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7913         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7914         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7915         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7916         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7917         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7918         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7920 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7922         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7923         * sysdeps/unix/sysv/linux/open.c: Removed.
7924         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7925         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7926         * sysdeps/unix/sysv/linux/msync.c: Removed.
7927         * sysdeps/unix/sysv/linux/read.c: Removed.
7928         * sysdeps/unix/sysv/linux/close.c: Removed.
7929         * sysdeps/unix/sysv/linux/creat.c: Removed.
7930         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7931         * sysdeps/unix/sysv/linux/pause.c: Removed.
7932         * sysdeps/unix/sysv/linux/select.c: Removed.
7933         * sysdeps/unix/sysv/linux/write.c: Removed.
7935 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7937         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7938         element in TCB to see whether locking is needed.
7940         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7941         MULTIPLE_THREADS_OFFSET value is correct.
7943         * sysdeps/unix/sysv/linux/close.c: New file.
7944         * sysdeps/unix/sysv/linux/connect.S: New file.
7945         * sysdeps/unix/sysv/linux/creat.c: New file.
7946         * sysdeps/unix/sysv/linux/fsync.c: New file.
7947         * sysdeps/unix/sysv/linux/llseek.c: New file.
7948         * sysdeps/unix/sysv/linux/lseek.c: New file.
7949         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7950         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7951         * sysdeps/unix/sysv/linux/msync.c: New file.
7952         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7953         * sysdeps/unix/sysv/linux/open.c: New file.
7954         * sysdeps/unix/sysv/linux/open64.c: New file.
7955         * sysdeps/unix/sysv/linux/pause.c: New file.
7956         * sysdeps/unix/sysv/linux/poll.c: New file.
7957         * sysdeps/unix/sysv/linux/pread.c: New file.
7958         * sysdeps/unix/sysv/linux/pread64.c: New file.
7959         * sysdeps/unix/sysv/linux/pselect.c: New file.
7960         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7961         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7962         * sysdeps/unix/sysv/linux/readv.c: New file.
7963         * sysdeps/unix/sysv/linux/recv.S: New file.
7964         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7965         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7966         * sysdeps/unix/sysv/linux/select.c: New file.
7967         * sysdeps/unix/sysv/linux/send.S: New file.
7968         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7969         * sysdeps/unix/sysv/linux/sendto.S: New file.
7970         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7971         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7972         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7973         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7974         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7975         * sysdeps/unix/sysv/linux/system.c: New file.
7976         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7977         * sysdeps/unix/sysv/linux/wait.c: New file.
7978         * sysdeps/unix/sysv/linux/waitid.c: New file.
7979         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7980         * sysdeps/unix/sysv/linux/writev.c: New file.
7981         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7983         * pt-readv.c: Fix comment.
7985 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7987         * tst-cleanup1.c: Include stdlib.h.
7989         * tst-cancel5.c: New test.
7990         * Makefile (tests): Add tst-cancel5.
7991         (tst-cancel5): Link against libc.so libpthread.so in that order.
7993 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7995         * forward.c (test_loaded): Prevent recursive calls.
7997         * Makefile (routines): Add libc-cancellation.
7998         * libc-cancellation.c: New file.
7999         * descr.h (struct pthread): Add multiple_threads field.
8000         * allocatestack.c (allocate_stack): Initialize multiple_header field of
8001         new thread descriptor to 1.
8002         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
8003         Initialize multiple_thread field after successful thread creation.
8004         * cancellation.c (__do_cancel): Move to pthreadP.h.
8005         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
8006         (__pthread_disable_asynccancel): Add internal_function attribute.
8007         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
8008         * pthread_setcancelstate.c: Likewise.
8009         * pthread_setcanceltype.c: Likewise.
8010         * pthread_exit.c: Likewise.
8011         * pthreadP.h (CANCELLATION_P): Likewise.
8012         (__do_cancel): Define as static inline.
8013         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
8014         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
8015         declarations.
8016         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
8017         fields.  Define MULTIPLE_THREADS_OFFSET.
8018         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
8019         declaration.
8020         * sysdeps/unix/sysv/linux/accept.S: New file.
8021         * sysdeps/unix/sysv/linux/read.c: New file.
8022         * sysdeps/unix/sysv/linux/write.c: New file.
8023         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
8024         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
8025         initialization of __libc_locking_needed.
8026         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
8027         __libc_locking_needed, use multiple_threads field in TCB.
8028         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8030 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8032         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
8033         version.
8034         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
8036         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
8037         access to __libc_locking_needed for PIC.
8039 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
8041         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
8042         declare for libc.so.
8043         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
8044         expression.
8045         (__libc_lock_lock): Put into statement expression.
8046         (__libc_lock_unlock): Remove trailing semicolon.
8047         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
8049 2002-12-12  Roland McGrath  <roland@redhat.com>
8051         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
8052         "m" constraint to refer to __libc_locking_needed.  Declare it here.
8054 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8056         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
8057         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
8058         Initialize __libc_locking_needed.
8059         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
8060         instead of __register_pthread_fork_handler.
8061         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
8062         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
8063         fork-gen with libc_pthread_init.
8064         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
8065         of __register_pthread_fork_handler.
8066         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
8067         of __register_pthread_fork_handler.
8068         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
8069         __libc_locking_needed to determine whether lock prefix can be avoided.
8070         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8072 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
8074         * Makefile (tests): Add tst-cleanup1.
8075         * tst-cleanup1.c: New file.
8076         * cancellation.c (__cleanup_thread): Removed.
8077         (__do_cancel): Remove call to __cleanup_thread.
8078         * pthreadP.h: Remove __cleanup_thread prorotype.
8080         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8081         Remember function and argument even if cancellation handler
8082         function is not available.
8083         (__libc_cleanup_region_end): Execute registered function directly if
8084         pthread functions are not available.
8085         (__libc_cleanup_end): Likewise.
8087         * init.c (__pthread_initialize_minimal): Fix initialization in
8088         static lib by preventing gcc from being too clever.
8090 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
8092         * init.c (__pthread_initialize_minimal): Remove unneccesary
8093         sigaddset call.
8095         * Makefile (tests): We can run tst-locale2 now.
8097 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
8099         * Versions: Remove duplicated sigwait entry.
8101 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
8103         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
8104         inside libpthread.
8106         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
8108         * pthreadP.h: Declare __pthread_enable_asynccancel and
8109         __pthread_disable_asynccancel.
8110         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
8111         (CANCEL_RESET): Use __pthread_disable_asynccancel.
8112         * cancellation.c (__pthread_enable_asynccancel): New function.
8113         (__pthread_disable_asynccancel): New function.
8114         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
8115         * pt-close.c: Likewise.
8116         * pt-connect.c: Likewise.
8117         * pt-creat.c: Likewise.
8118         * pt-fcntl.c: Likewise.
8119         * pt-fsync.c: Likewise.
8120         * pt-lseek.c: Likewise.
8121         * pt-lseek64.c: Likewise.
8122         * pt-msgrcv.c: Likewise.
8123         * pt-msgsnd.c: Likewise.
8124         * pt-msync.c: Likewise.
8125         * pt-nanosleep.c: Likewise.
8126         * pt-open.c: Likewise.
8127         * pt-open64.c: Likewise.
8128         * pt-pause.c: Likewise.
8129         * pt-poll.c: Likewise.
8130         * pt-pread.c: Likewise.
8131         * pt-pread64.c: Likewise.
8132         * pt-pselect.c: Likewise.
8133         * pt-pwrite.c: Likewise.
8134         * pt-pwrite64.c: Likewise.
8135         * pt-read.c: Likewise.
8136         * pt-readv.c: Likewise.
8137         * pt-recv.c: Likewise.
8138         * pt-recvfrom.c: Likewise.
8139         * pt-recvmsg.c: Likewise.
8140         * pt-select.c: Likewise.
8141         * pt-send.c: Likewise.
8142         * pt-sendmsg.c: Likewise.
8143         * pt-sendto.c: Likewise.
8144         * pt-sigpause.c: Likewise.
8145         * pt-sigsuspend.c: Likewise.
8146         * pt-sigtimedwait.c: Likewise.
8147         * pt-sigwait.c: Likewise.
8148         * pt-sigwaitinfo.c: Likewise.
8149         * pt-system.c: Likewise.
8150         * pt-tcdrain.c: Likewise.
8151         * pt-wait.c: Likewise.
8152         * pt-waitid.c: Likewise.
8153         * pt-waitpid.c: Likewise.
8154         * pt-write.c: Likewise.
8155         * pt-writev.c: Likewise.
8156         * pthread_join.c: Likewise.
8157         * pthread_timedjoin.c: Likewise.
8159         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
8160         (__xpg_sigpause): New function.
8161         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
8163 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
8165         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
8167         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
8168         _GI_pthread_cleanup_pop to pthreadP.h.
8170         * ftrylockfile.c: Use _IO_lock_trylock instead of
8171         pthread_mutex_trylock.
8173         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
8174         (CANCEL_RESET): Likewise.
8175         (__pthread_setcanceltype_): Declare.
8176         (__pthread_mutex_lock_internal): Declare.
8177         (__pthread_mutex_unlock_internal): Declare.
8178         (__pthread_once_internal): Declare.
8179         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
8180         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
8182         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
8183         and pthread_mutex_unlock.
8184         * pthread_cond_wait.c: Likewise.
8185         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
8186         * pthread_mutex_unlock.c: Likewise.
8188         * pthread_setcanceltype.c: Add additional alias
8189         __pthread_setcanceltype.
8191         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
8192         * sem_open.c (sem_open): Likewise.
8193         Use __libc_open, __libc_write, and __libc_close instead of
8194         open, write, and close respectively.
8196         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
8197         Rewrite as statement expression since it must return a value.
8199         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
8200         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
8201         __pthread_kill.
8203         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
8204         alias __pthread_once_internal.
8206         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
8208 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
8210         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
8211         * tst-stdio1.c: New file.
8212         * tst-stdio2.c: New file.
8214         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
8216         * Makefile (tests): Comment out tst-locale2 for now.
8217         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
8219         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
8220         -D_IO_MTSAFE_IO.
8221         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
8222         Use _IO_lock_init instead of explicit assignment.
8224         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
8225         Define __libc_lock_* and __libc_lock_recursive macros with
8226         lowlevellock macros, not pthread mutexes.
8228         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
8229         of pthread_mutex_lock.
8230         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
8231         instead of pthread_mutex_unlock.
8233 2002-12-06  Roland McGrath  <roland@redhat.com>
8235         * allocatestack.c (__stack_user): Use uninitialized defn.
8236         * init.c (__pthread_initialize_minimal): Initialize it here.
8238 2002-12-05  Roland McGrath  <roland@redhat.com>
8240         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
8241         string.
8242         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
8244         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
8245         missing & here too.
8247 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
8249         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8250         lowlevellock.
8251         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
8252         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
8253         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
8254         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
8255         for __libc_lock_* macros.
8256         * Makefile (routines): Add libc-lowlevellock.
8258 2002-10-09  Roland McGrath  <roland@redhat.com>
8260         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
8261         Under [__PIC__], call the function via the pointer fetched for
8262         comparison rather than a call by name that uses the PLT.
8263         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8264         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8265         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8266         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8267         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8269 2002-12-04  Roland McGrath  <roland@redhat.com>
8271         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8273         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8274         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8276         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8278 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8280         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8281         a completely opaque, non-integer type.
8282         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8284 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
8286         * sysdeps/i386/tls.h: Include stdlib.h.
8287         * sysdeps/x86_64/tls.h: Likewise.
8289 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8291         * Makefile (tests): Add tst-locale2.
8292         (tests-static): Likewise.
8293         * tst-locale2.c: New file.
8295         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8296         volatile and add memory clobbers to lock operations.
8298 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
8300         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8301         * sysdeps/i386/i486/bits/atomic.h: New file.
8302         * sysdeps/i386/i586/bits/atomic.h: New file.
8303         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8304         include i486 version.
8305         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8306         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8307         Patch by Marijn Ros <marijn@mad.scientist.com>.
8309         * allocatestack.c (get_cached_stack): Don't crash if we first
8310         found a stack with a larger size then needed.
8311         Reported by Hui Huang <hui.huang@sun.com>.
8313         * Makefile (tests): Add tst-sysconf.
8314         * tst-sysconf.c: New file.
8316         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8317         PTHREAD_THREADS_MAX.
8319 2002-12-02  Roland McGrath  <roland@redhat.com>
8321         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8322         Declare using hidden_proto instead of attribute_hidden, so there are
8323         non-.hidden static symbols for gdb to find.
8324         (__pthread_keys): Likewise.
8325         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8326         * allocatestack.c (__stack_user): Likewise.
8327         * pthread_create.c (__pthread_keys): Likewise.
8328         (__nptl_threads_events, __nptl_last_event): Make these static instead
8329         of hidden.
8330         * pthread_key_create.c (__pthread_pthread_keys_max,
8331         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8333 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
8335         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
8336         statically.
8337         * tst-locale1.c: New file.
8339         * pthread_cond_timedwait.c: Include <stdlib.h>.
8341         * Makefile (tests): Add tst-fork2 and tst-fork3.
8342         * tst-fork2.c: New file.
8343         * tst-fork3.c: New file.
8345 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
8347         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8349         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8350         require it to 200112L.
8352         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8353         instruction only if HAVE_CMOV is defined.
8354         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8356         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8358         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8360         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8362         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8364 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
8366         * sysdeps/x86_64/bits/atomic.h: New file.
8368         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8369         16-bit operations.
8371         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8372         possible since gettid cannot fail.
8374         * sysdeps/x86_64/pthreaddef.h: New file.
8376         * sysdeps/i386/pthreaddef.h (gettid): Removed.
8378         * sysdeps/x86_64/pthread_spin_init.c: New file.
8379         * sysdeps/x86_64/pthread_spin_lock.c: New file.
8380         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8381         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8383         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8384         Add missing lock prefix.  Minute optimization.
8386         * tst-spin2.c (main): Also check successful trylock call.
8388         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8389         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
8391         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8392         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
8394         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
8395         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8396         value in case of an error.  Add support for INTERNAL_SYSCALL.
8398         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8399         value in case of an error.
8401         * sysdeps/x86_64/tls.h: New file.
8403 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8405         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
8406         takes the array member name and the index as parameters.
8407         (THREAD_SETMEM_NC): Likewise.
8408         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8409         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8410         interfaces.
8412         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8413         to decide which code to use.
8414         (THREAD_SETMEM_NC): Likewise.
8416         * allocatestack.c (queue_stack): Don't remove stack from list here.
8417         Do it in the caller.  Correct condition to prematurely terminate
8418         loop to free stacks.
8419         (__deallocate_stack): Remove stack from list here.
8421 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8423         * Makefile (tests): Add tst-stack1.
8424         * tst-stack1.c: New file.
8426         * allocatestack.c (allocate_stack): Initialize the TCB on a user
8427         provided stack.
8429         * pthread_attr_getstack.c: Return bottom of the thread area.
8431 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
8433         * Makefile (libpthread-routines): Add pt-allocrtsig and
8434         pthread_kill_other_threads.
8435         * pt-allocrtsig.c: New file.
8436         * pthread_kill_other_threads.c: New file.
8437         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8438         all three functions.
8439         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8440         allocrtsig.
8441         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8442         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8443         and __libc_allocate_rtsig_private.
8444         * Versions (libpthread): Export pthread_kill_other_threads_np,
8445         __libc_current_sigrtmin, and __libc_current_sigrtmax.
8447 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
8449         * allocatestack.c (allocate_stack): stackaddr in attribute points to
8450         the end of the stack.  Adjust computations.
8451         When mprotect call fails dequeue stack and free it.
8452         * pthread_attr_setstack.c: Store top of the stack in stackaddr
8453         attribute.
8454         * pthread_getattr_np.c: Likewise.
8456         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8457         surprises.
8459 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
8461         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8462         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8464 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
8466         * pthread_getspecific.c: Optimize access to first 2nd-level array.
8467         * pthread_setspecific.c: Likewise.
8469 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
8471         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8472         definitions.  Get them from the official place.
8473         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8475         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8476         Use new CLONE_ flags in clone() calls.
8478         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8479         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8481         * Versions: Add pthread_* functions for libc.
8482         * forward.c: New file.
8484         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8485         errno-loc.
8486         * herrno.c: New file.
8487         * res.c: New file.
8489         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8490         sem_trywait, and sem_timedwait.  Add herrno and res.
8491         * sem_init.c: Don't initialize lock and waiters members.
8492         * sem_open.c: Likewise.
8493         * sem_post.c: Removed.
8494         * sem_wait.c: Removed.
8495         * sem_trywait.c: Removed.
8496         * sem_timedwait.c: Removed.
8497         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8498         Includes full implementations of sem_post, sem_wait, sem_trywait,
8499         and sem_timedwait.
8500         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8501         for new implementation.
8502         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8503         and waiters fields.
8505         * tst-sem3.c: Improve error message.
8506         * tst-signal3.c: Likewise.
8508         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8509         to tell the kernel about the termination futex and to initialize tid
8510         member.  Don't initialize main_thread.
8511         * descr.h (struct pthread): Remove main_thread member.
8512         * cancelllation.c (__do_cancel): Remove code handling main thread.
8513         The main thread is not special anymore.
8515         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
8516         size of the stacks to stack_cache_actsize.
8518         * pt-readv.c: Add missing "defined".
8519         * pt-sigwait.c: Likewise.
8520         * pt-writev.c: Likewise.
8522 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
8524         * Versions: Export __connect from libpthread.
8525         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8527         * Makefile (libpthread-routines): Add pt-raise.
8528         * sysdeps/unix/sysv/linux/raise.c: New file.
8529         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8530         * sysdeps/generic/pt-raise.c: New file.
8532         * pthread_cond_init.c: Initialize all data elements of the condvar
8533         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8535         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8536         * pthread_create.c: Likewise.
8538         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8539         * tst-key1.c: New file.
8540         * tst-key2.c: New file.
8541         * tst-key3.c: New file.
8543         * Versions: Export pthread_detach for version GLIBC_2.0.
8544         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8546 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8548         * pthread_key_create.c: Terminate search after an unused key was found.
8549         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8551         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8552         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8554 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8556         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8557         dynamic lookup for errno in PIC.
8559         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8560         release the stack lock as soon as possible.
8561         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8562         the static TLS block.
8563         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8565         * cancellation.c: Renamed from cancelation.c.
8566         * Makefile: Adjust accordingly.
8567         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8568         * cleanup_defer.c: Use CANCELLATION_P.
8569         * pthread_testcancel.c: Likewise.
8570         * descr.h: Fix spelling in comments.
8571         * init.c: Likewise.
8572         * pthread_getattr_np.c: Likewise.
8573         * pthread_getschedparam.c: Likewise.
8574         * pthread_setschedparam.c: Likewise.
8575         * Versions: Likewise.
8577         * pt-pselect.c: New file.
8578         * Makefile (libpthread-routines): Add pt-pselect.
8579         * Versions: Add pselect.
8581         * tst-cancel4.c: New file.
8582         * Makefile (tests): Add tst-cancel4.
8584 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8586         * pthread_mutex_lock.c: Always record lock ownership.
8587         * pthread_mutex_timedlock.c: Likewise.
8588         * pthread_mutex_trylock.c: Likewise.
8590         * pt-readv.c: New file.
8591         * pt-writev.c: New file.
8592         * pt-creat.c: New file.
8593         * pt-msgrcv.c: New file.
8594         * pt-msgsnd.c: New file.
8595         * pt-poll.c: New file.
8596         * pt-select.c: New file.
8597         * pt-sigpause.c: New file.
8598         * pt-sigsuspend.c: New file.
8599         * pt-sigwait.c: New file.
8600         * pt-sigwaitinfo.c: New file.
8601         * pt-waitid.c: New file.
8602         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8603         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8604         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8605         * Versions: Add all the new functions.
8607         * tst-exit1.c: New file.
8608         * Makefile (tests): Add tst-exit1.
8610         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8612 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8614         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8616         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8617         call.  pthread_join is an official cancellation point.
8618         * pthread_timedjoin.c: Likewise.
8620         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8621         and the condvar's mutex are retrieved.
8622         * pthread_cond_timedwait.c: Likewise.
8623         Reported by dice@saros.East.Sun.COM.
8625 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8627         * pthreadP.h: Cut out all type definitions and move them...
8628         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8629         * pthreadP.h: Include <internaltypes.h>.
8631         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8632         performance tweaks.
8634         * sem_trywait.c: Shuffle #includes around to get right order.
8635         * sem_timedwait.c: Likewise.
8636         * sem_post.c: Likewise.
8637         * sem_wait.c: Likewise.
8639         * nptl 0.3 released.
8641         * Makefile (tests): Add tst-signal3.
8642         * tst-signal3.c: New file.
8644 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8646         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8647         the asms modify the sem object.
8648         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8650         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8651         the actual members.
8652         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8653         * semaphoreP.h: Include pthreadP.h.
8654         * sem_getvalue.c: Adjust to sem_t change.
8655         * sem_init.c: Likewise.
8656         * sem_open.c: Likewise.
8657         * sem_post.c: Likewise.
8658         * sem_timedwait.c: Likewise.
8659         * sem_trywait.c: Likewise.
8660         * sem_wait.c: Likewise.
8662 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8664         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8665         * tst-basic2.c: New file.
8666         * tst-exec1.c: New file.
8667         * tst-exec2.c: New file.
8668         * tst-exec3.c: New file.
8670         * tst-fork1.c: Remove extra */.
8672         * nptl 0.2 released.  The API for IA-32 is complete.