Updated to fedora-glibc-20070117T0857
[glibc.git] / nptl / ChangeLog
blob425fbf4ba59df3b8cccf864f83787b7da0485e42
1 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4         function table, mangle the pointers.
5         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
6         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
7         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
8         demangle pointers before use.
9         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
10         demangle pointer.
11         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
12         * sysdeps/pthread/setxid.h: Likewise.
14 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
16         * tst-rwlock7.c: Show some more information in case of correct
17         behavior.
19 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
21         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
22         (lll_futex_timed_wait): Undo part of last change, don't negate
23         return value.
25 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
27         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
28         FUTEX_CMP_REQUEUE and lll_futex_requeue.
30 2006-12-28  David S. Miller  <davem@davemloft.net>
32         * shlib-versions: Fix sparc64 linux target specification.
34 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
36         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
37         Adjust include path for pthread_barrier_wait.c move.
39 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
41         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
42         tid isn't reread from pd->tid in between ESRCH test and the syscall.
44 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
46         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
47         6 argument cancellable syscalls.
48         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
49         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
50         6 argument cancellable syscalls.
51         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
53 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
55         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
56         (__rtld_mrlock_initialize): Add missing closing parenthesis.
58 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
60         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
61         __sync_lock_release instead of __sync_lock_release_si.
63 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
65         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
66         Define.
67         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
68         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
69         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
70         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
71         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
72         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
73         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
74         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
75         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
76         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
77         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
79 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
81         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
82         * pthread_barrier_wait.c: ...here.
83         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
84         * pthread_cond_broadcast.c: ...here.
85         * sysdeps/pthread/pthread_cond_signal.c: Move to...
86         * pthread_cond_signal.c: ...here.
87         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
88         * pthread_cond_timedwait.c: ...here.
89         * sysdeps/pthread/pthread_cond_wait.c: Move to...
90         * pthread_cond_wait.c: ...here.
91         * sysdeps/pthread/pthread_once.c: Move to...
92         * pthread_once.c: ...here.
93         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
94         * pthread_rwlock_rdlock.c: ...here.
95         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
96         * pthread_rwlock_timedrdlock.c: ...here.
97         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
98         * pthread_rwlock_timedwrlock.c: ...here.
99         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
100         * pthread_rwlock_unlock.c: ...here.
101         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
102         * pthread_rwlock_wrlock.c: ...here.
103         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
104         * pthread_spin_destroy.c: ...here.
105         * sysdeps/pthread/pthread_spin_init.c: Move to...
106         * pthread_spin_init.c: ...here.
107         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
108         * pthread_spin_unlock.c: ...here.
109         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
110         * pthread_getcpuclockid.c: ...here.
112         * init.c: USE_TLS support is now always enabled.
113         * tst-tls5.h: Likewise.
114         * sysdeps/alpha/tls.h: Likewise.
115         * sysdeps/i386/tls.h: Likewise.
116         * sysdeps/ia64/tls.h: Likewise.
117         * sysdeps/powerpc/tls.h: Likewise.
118         * sysdeps/s390/tls.h: Likewise.
119         * sysdeps/sh/tls.h: Likewise.
120         * sysdeps/sparc/tls.h: Likewise.
121         * sysdeps/x86_64/tls.h: Likewise.
123 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
125         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
126         __rtld_mrlock_change): Update oldval if atomic compare and exchange
127         failed.
129         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
130         Define to THREAD_SELF->header.multiple_threads.
131         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
132         Likewise.
133         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
134         Likewise.
135         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
136         (SINGLE_THREAD_P): Likewise.
137         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
138         (SINGLE_THREAD_P): Likewise.
139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
140         (SINGLE_THREAD_P): Likewise.
141         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
142         (SINGLE_THREAD_P): Likewise.
143         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
144         Likewise.
145         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
146         (SINGLE_THREAD_P): Likewise.
147         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
148         (SINGLE_THREAD_P): Likewise.
149         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
150         Likewise.
152 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
154         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
155         by default rather than 2_3_3.
157 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
159         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
160         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
161         atomic_* instead of catomic_* macros.
163 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
165         [BZ #3285]
166         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
167         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
168         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
169         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
170         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
171         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
172         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
173         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
174         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
175         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
176         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
177         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
178         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
180 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
182         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
183         cancelable syscalls with six parameters.
185         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
186         operations instead of atomic_*.
188 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
190         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
192 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
194         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
195         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
196         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
197         New file.
198         * pthread_attr_setstack.c: Allow overwriting the version number of the
199         new symbol.
200         * pthread_attr_setstacksize.c: Likewise.
201         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
202         it.
203         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
204         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
206 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
208         [BZ #3251]
209         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
210         Patch by Petr Baudis.
212 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
214         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
216         * tst-cancel2.c (tf): Loop as long as something was written.
218 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
220         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
221         mutexes wake all mutexes.
222         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
223         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
224         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
226 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
228         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
229         to guarantee the thread is always canceled.
231 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
233         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
234         Include stdlib.h.
235         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
236         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
241 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
243         [BZ #3123]
244         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
245         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
249         * Makefile (tests): Add tst-cond22.
250         * tst-cond22.c: New file.
252 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
254         [BZ #3124]
255         * descr.h (struct pthread): Add parent_cancelhandling.
256         * sysdeps/pthread/createthread.c (create_thread): Pass parent
257         cancelhandling value to child.
258         * pthread_create.c (start_thread): If parent thread was canceled
259         reset the SIGCANCEL mask.
260         * Makefile (tests): Add tst-cancel25.
261         * tst-cancel25.c: New file.
263 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
264             Ulrich Drepper  <drepper@redhat.com>
266         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
267         counterp if it is already zero.
268         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
270 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
271             Roland McGrath  <roland@redhat.com>
273         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
274         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
275         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
276         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
277         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
278         lll_robust_mutex_timedlock, lll_mutex_unlock,
279         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
280         Add _L_*_ symbols around the subsection.
281         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
282         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
284 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
285             Roland McGrath  <roland@redhat.com>
287         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
288         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
289         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
290         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
291         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
292         lll_robust_mutex_timedlock, lll_mutex_unlock,
293         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
294         Add _L_*_ symbols around the subsection.
295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
296         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
298 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
300         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
301         change because it can disturb too much existing code.  If real hard
302         reader preference is needed we'll introduce another type.
303         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
304         (pthread_rwlock_timedwrlock): Likewise.
305         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
306         Likewise.
308 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
310         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
311         reader preference.
312         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
313         (pthread_rwlock_timedwrlock): Likewise.
314         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
315         Likewise.
317 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
319         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
320         Only define ifdef SHARED.
322 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
324         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
325         (free_stacks): ...here.
326         (__free_stack_cache): New function.
327         * pthreadP.h: Declare __free_stack_cache.
328         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
329         ptr_freeres.
330         * init.c (pthread_functions): Initialize ptr_freeres.
331         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
332         New freeres function.
334 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
336         [BZ #3018]
337         * Makefile (extra-objs): Add modules to extra-test-objs instead.
339 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
341         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
342         _XOPEN_REALTIME_THREADS.
344 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
346         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
347         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
348         HAVE_CLOCK_GETTIME_VSYSCALL.
349         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
351 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
353         * sysdeps/unix/sysv/linux/bits/posix_opt.h
354         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
355         * descr.h (struct priority_protection_data): New type.
356         (struct pthread): Add tpp field.
357         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
358         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
359         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
360         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
361         TPP mutexes.
362         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
363         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
364         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
365         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
366         * tpp.c: New file.
367         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
368         boosted by TPP.
369         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
370         * pthread_mutexattr_getprioceiling.c
371         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
372         in the SCHED_FIFO priority range.
373         * pthread_mutexattr_setprioceiling.c
374         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
375         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
376         if mutex is not TPP.  Ceiling is now in __data.__lock.
377         * pthread_mutex_setprioceiling.c: Include stdbool.h.
378         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
379         is now in __data.__lock.  Add locking.
380         * pthread_create.c (__free_tcb): Free pd->tpp structure.
381         * Makefile (libpthread-routines): Add tpp.
382         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
383         * tst-tpp.h: New file.
384         * tst-mutexpp1.c: New file.
385         * tst-mutexpp6.c: New file.
386         * tst-mutexpp10.c: New file.
387         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
388         * tst-mutex6.c (TEST_FUNCTION): Likewise.
390 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
392         [BZ #2843]
393         * pthread_join.c (pthread_join): Account for self being canceled
394         when checking for deadlocks.
395         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
396         (tf1): Don't print anything after pthread_join returns, this would be
397         another cancellation point.
398         (tf2): Likewise.
399         * tst-join6.c: New file.
400         * Makefile (tests): Add tst-join6.
402 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
404         [BZ #2892]
405         * pthread_setspecific.c (__pthread_setspecific): Check
406         out-of-range index before checking for unused key.
408         * sysdeps/pthread/gai_misc.h: New file.
410 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
412         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
413         file.  Don't use sysctl.
414         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
415         overwrite the file if this is likely not true.
417 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
419         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
420         * Makefile (tests): Add tst-getpid3.
421         * tst-getpid3.c: New file.
423 2006-07-30  Roland McGrath  <roland@redhat.com>
425         * Makefile (libpthread-routines): Add ptw-sigsuspend.
427         * sysdeps/unix/sysv/linux/i386/not-cancel.h
428         (pause_not_cancel): New macro.
429         (nanosleep_not_cancel): New macro.
430         (sigsuspend_not_cancel): New macro.
431         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
432         nanosleep_not_cancel macro from <not-cancel.h>.
433         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
434         macro from <not-cancel.h>.
436 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
437             Jakub Jelinek  <jakub@redhat.com>
439         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
440         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
441         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
442         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
443         * pthread_mutex_init.c: Add support for priority inheritance mutex.
444         * pthread_mutex_lock.c: Likewise.
445         * pthread_mutex_timedlock.c: Likewise.
446         * pthread_mutex_trylock.c: Likewise.
447         * pthread_mutex_unlock.c: Likewise.
448         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
449         all mutexes.
450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
451         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
452         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
453         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
454         pthread-pi-defines.sym.
455         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
456         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
457         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
458         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
459         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
460         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
461         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
462         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
463         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
464         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
465         _POSIX_THREAD_PRIO_INHERIT to 200112L.
466         * tst-mutex1.c: Adjust to allow use in PI mutex test.
467         * tst-mutex2.c: Likewise.
468         * tst-mutex3.c: Likewise.
469         * tst-mutex4.c: Likewise.
470         * tst-mutex5.c: Likewise.
471         * tst-mutex6.c: Likewise.
472         * tst-mutex7.c: Likewise.
473         * tst-mutex7a.c: Likewise.
474         * tst-mutex8.c: Likewise.
475         * tst-mutex9.c: Likewise.
476         * tst-robust1.c: Likewise.
477         * tst-robust7.c: Likewise.
478         * tst-robust8.c: Likewise.
479         * tst-mutexpi1.c: New file.
480         * tst-mutexpi2.c: New file.
481         * tst-mutexpi3.c: New file.
482         * tst-mutexpi4.c: New file.
483         * tst-mutexpi5.c: New file.
484         * tst-mutexpi6.c: New file.
485         * tst-mutexpi7.c: New file.
486         * tst-mutexpi7a.c: New file.
487         * tst-mutexpi8.c: New file.
488         * tst-mutexpi9.c: New file.
489         * tst-robust1.c: New file.
490         * tst-robust2.c: New file.
491         * tst-robust3.c: New file.
492         * tst-robust4.c: New file.
493         * tst-robust5.c: New file.
494         * tst-robust6.c: New file.
495         * tst-robust7.c: New file.
496         * tst-robust8.c: New file.
497         * Makefile (tests): Add the new tests.
499         * pthread_create.c (start_thread): Add some casts to avoid warnings.
500         * pthread_mutex_destroy.c: Remove unneeded label.
502 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
504         * pthread_mutex_init.c (__pthread_mutex_init): Move some
505         computations to compile time.
507 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
509         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
511 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
513         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
515 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
517         * pthread_key_create.c (__pthread_key_create): Do away with
518         __pthread_keys_lock.
520         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
521         (__kernel_cpumask_size): Mark as hidden.
522         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
524         * sem_open.c (__sem_mappings_lock): Mark as hidden.
525         * semaphoreP.h (__sem_mappings_lock): Likewise.
527 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
529         * pthread_atfork.c: Mark __dso_handle as hidden.
531 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
533         [BZ #2644]
534         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
535         the reload problem.  Change the one path in pthread_cancel_init
536         which causes the problem.  Force gcc to reload.  Simplify callers.
537         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
538         (_Unwind_GetBSP): Undo last patch.
540 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
542         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
543         function pointer is reloaded after pthread_cancel_init calls.
545         [BZ #2644]
546         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
547         pointers are reloaded after pthread_cancel_init calls.
549 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
551         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
552         __always_inline.
554 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
556         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
557         Allocate new object which is passed to timer_sigev_thread so that
558         the timer can be deleted before the new thread is scheduled.
560 2006-04-26  Roland McGrath  <roland@redhat.com>
562         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
564 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
566         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
567         suffix for conditional jumps.
568         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
569         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
570         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
571         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
572         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
573         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
575         * init.c (sigcancel_handler): Compare with correct PID even if the
576         thread is in the middle of a fork call.
577         (sighandler_setxid): Likewise.
578         Reported by Suzuki K P <suzuki@in.ibm.com> .
580 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
582         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
584 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
586         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
587         fails [Coverity CID 105].
589 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
591         * sysdeps/pthread/pthread.h: Add nonnull attributes.
593 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
595         [BZ #2505]
596         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
597         Define __lll_rel_instr using lwsync.
599 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
601         * allocatestack.c (allocate_stack): Always initialize robust_head.
602         * descr.h: Define struct robust_list_head.
603         (struct pthread): Use robust_list_head in robust mutex list definition.
604         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
605         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
606         (__pthread_initialize_minimal_internal): Register robust_list with
607         the kernel.
608         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
609         Declare __set_robust_list_avail.
610         * pthread_create.c (start_thread): Register robust_list of new thread.
611         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
612         waiters.
613         * pthread_mutex_destroy.c: For robust mutexes don't look at the
614         number of users, it's unreliable.
615         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
616         set_robust_list syscall is available.
617         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
618         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
619         Set robust_head.list_op_pending before trying to lock a robust mutex.
620         * pthread_mutex_timedlock.c: Likewise.
621         * pthread_mutex_trylock.c: Likewise.
622         * pthread_mutex_unlock.c: Likewise for unlocking.
623         * Makefile (tests): Add tst-robust8.
624         * tst-robust8.c: New file.
626 2006-03-08  Andreas Schwab  <schwab@suse.de>
628         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
629         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
631 2006-03-05  Roland McGrath  <roland@redhat.com>
633         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
634         and $config_os doesn't match *linux*.
636 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
638         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
639         Use __syscall_error.
640         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
641         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
642         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
643         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
644         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
645         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
647 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
649         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
651 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
653         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
654         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
655         mutex.
656         (__lll_robust_timedlock_wait): Likewise.
657         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
658         (__lll_robust_lock_wait): Likewise.
659         (__lll_robust_timedlock_wait): Likewise.
660         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
661         (__lll_robust_lock_wait): Likewise.
662         (__lll_robust_timedlock_wait): Likewise.
664 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
666         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
667         lll_robust_mutex_trylock, lll_robust_mutex_lock,
668         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
669         lll_robust_mutex_unlock): Define.
670         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
672 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
674         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
675         instead of <clone.S>.
677 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
679         * Makefile (libpthread-routines): Add
680         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
681         and pthread_mutex_[sg]etprioceiling.
682         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
683         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
684         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
685         pthread_mutex_setprioceiling.
686         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
687         PTHREAD_PRIO_PROTECT): New enum values.
688         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
689         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
690         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
691         prototypes.
692         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
693         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
694         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
695         Define.
696         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
697         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
698         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
699         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
700         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
701         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
702         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
703         protocol mutexes.
704         * pthread_mutex_getprioceiling.c: New file.
705         * pthread_mutex_setprioceiling.c: New file.
706         * pthread_mutexattr_getprioceiling.c: New file.
707         * pthread_mutexattr_setprioceiling.c: New file.
708         * pthread_mutexattr_getprotocol.c: New file.
709         * pthread_mutexattr_setprotocol.c: New file.
711 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
713         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
715 2006-02-27  Roland McGrath  <roland@redhat.com>
717         * sysdeps/pthread/Subdirs: List nptl here too.
718         * configure (libc_add_on_canonical): New variable.
720         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
722         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
723         self to get main source tree's file.
724         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
725         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
726         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
727         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
728         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
729         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
730         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
731         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
732         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
733         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
734         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
735         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
736         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
738         * Makefile: Use $(sysdirs) in vpath directive.
740         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
741         (CPPFLAGS-timer_routines.c): Likewise.
743         * Makeconfig (includes): Variable removed.
745 2006-02-26  Roland McGrath  <roland@redhat.com>
747         * sysdeps/generic/pt-raise.c: Moved to ...
748         * pt-raise.c: ... here.
749         * sysdeps/generic/lowlevellock.h: Moved to ...
750         * lowlevellock.h: ... here.
752 2006-02-23  Roland McGrath  <roland@redhat.com>
754         * descr.h (struct pthread): Add final member `end_padding'.
755         (PTHREAD_STRUCT_END_PADDING): Use it.
757 2006-02-20  Roland McGrath  <roland@redhat.com>
759         * sysdeps/mips: Directory removed, saved in ports repository.
760         * sysdeps/unix/sysv/linux/mips: Likewise.
762 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
764         * tst-robust1.c: Add second mutex to check that the mutex list is
765         handled correctly.
767 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
769         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
770         lll_robust_mutex_trylock, lll_robust_mutex_lock,
771         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
772         lll_robust_mutex_unlock): New macros.
773         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
774         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
775         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
776         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
777         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
779 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
781         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
782         definitions.
783         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
785 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
787         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
788         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
789         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
790         (lll_robust_mutex_unlock): Likewise.
792 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
794         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
795         Set robust_list.__next rather than robust_list.
796         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
797         (__pthread_list_t): New typedef.
798         (pthread_mutex_t): Replace __next and __prev fields with __list.
799         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
800         (__pthread_list_t): New typedef.
801         (pthread_mutex_t): Replace __next and __prev fields with __list.
802         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
803         (__pthread_list_t, __pthread_slist_t): New typedefs.
804         (pthread_mutex_t): Replace __next and __prev fields with __list.
805         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
806         (__pthread_list_t, __pthread_slist_t): New typedefs.
807         (pthread_mutex_t): Replace __next and __prev fields with __list.
808         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
809         (__pthread_list_t, __pthread_slist_t): New typedefs.
810         (pthread_mutex_t): Replace __next and __prev fields with __list.
811         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
812         (__pthread_slist_t): New typedef.
813         (pthread_mutex_t): Replace __next field with __list.
815 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
817         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
818         PTHREAD_MUTEX_OWNERDEAD.
819         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
820         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
821         * Makefile (libpthread-routines): Add lowlevelrobustlock.
822         * pthread_create.c (start_thread): Very much simplify robust_list loop.
823         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
824         to PTHREAD_MUTEX_INCONSISTENT.
825         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
826         * pthread_mutex_lock.c: Reimplement robust mutex handling.
827         * pthread_mutex_trylock.c: Likewise.
828         * pthread_mutex_timedlock.c: Likewise.
829         * pthread_mutex_unlock.c: Likewise.
830         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
831         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
832         lowlevelrobustlock.sym.
833         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
834         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
835         definitions.
836         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
837         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
838         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
839         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
840         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
842 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
844         * allocatestack.c (allocate_stack): Initialize robust_list.
845         * init.c (__pthread_initialize_minimal_internal): Likewise.
846         * descr.h (struct xid_command): Pretty printing.
847         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
848         robust_list.  Adjust macros.
849         * pthread_create.c (start_thread): Adjust robust_list handling.
850         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
851         but the owner for all robust mutex types.
852         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
853         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
854         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
855         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
857         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
858         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
860 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
862         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
863         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
865 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
867         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
868         Return status.
869         (lll_futex_timed_wait): Define.
871 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
873         * tst-cancel4.c: Test ppoll.
875 2006-01-18  Andreas Jaeger  <aj@suse.de>
877         [BZ #2167]
878         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
879         (pthread_mutex_t): Follow changes for other archs.  Based on patch
880         by Jim Gifford <patches@jg555.com>.
882 2006-01-13  Richard Henderson  <rth@redhat.com>
884         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
886 2006-01-10  Roland McGrath  <roland@redhat.com>
888         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
889         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
890         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
891         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
892         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
893         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
894         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
895         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
896         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
897         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
899 2006-01-09  Roland McGrath  <roland@redhat.com>
901         * tst-initializers1-c89.c: New file.
902         * tst-initializers1-c99.c: New file.
903         * tst-initializers1-gnu89.c: New file.
904         * tst-initializers1-gnu99.c: New file.
905         * Makefile (tests): Add them.
906         (CFLAGS-tst-initializers1-c89.c): New variable.
907         (CFLAGS-tst-initializers1-c99.c): New variable.
908         (CFLAGS-tst-initializers1-gnu89.c): New variable.
909         (CFLAGS-tst-initializers1-gnu99.c): New variable.
911         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
912         Use __extension__ on anonymous union definition.
913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
914         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
915         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
916         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
917         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
919 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
921         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
922         Don't give the union a name because it changes the mangled name.
923         Instead name the struct for __data.
924         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
925         Likewise.
926         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
927         Likewise.
929 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
931         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
932         stack bias to mc_ftp field.
934 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
936         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
937         being too clever and reloading the futex value where it shouldn't.
939 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
941         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
942         correct type.
944 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
946         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
947         Add cfi directives.
949 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
951         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
952         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
953         rename in tcbhead_t.
955         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
956         Don't give the union a name because it changes the mangled name.
957         Instead name the struct for __data.
958         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
959         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
960         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
961         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
962         * pthread_create.c (start_thread): Adjust robust mutex free loop.
963         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
965 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
967         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
968         Return status.
969         (lll_futex_timed_wait): Define.
970         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
971         * sysdeps/pthread/aio_misc.h: New file.
973 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
975         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
977 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
979         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
980         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
981         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
983 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
985         * tst-cancel24.cc: Use C headers instead of C++ headers.
987 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
989         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
990         sparc-linux configured glibc.
991         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
992         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
993         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
994         atomic_compare_and_exchange_val_24_acq instead of
995         atomic_compare_and_exchange_val_acq.
996         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
997         instead of atomic_exchange_rel.
998         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
999         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
1000         file.
1001         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
1002         file.
1003         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
1004         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
1005         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
1006         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
1007         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
1008         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1009         New file.
1010         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1011         New file.
1012         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
1013         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
1014         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
1015         file.
1016         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
1017         file.
1018         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
1020 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
1022         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
1023         mutex initializers.
1025 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
1027         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
1028         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1029         THREAD_COPY_POINTER_GUARD): Define.
1030         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
1031         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
1033 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
1035         * version.c: Update copyright year.
1037 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1039         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
1040         .eh_frame section, use cfi_* directives.
1041         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
1043 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
1045         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
1046         now.
1048 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
1050         * sysdeps/pthread/sigaction.c: Removed.
1051         * sigaction.c: New file.
1052         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1054 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
1056         * Makefile (tests): Add tst-signal7.
1057         * tst-signal7.c: New file.
1059 2005-12-27  Roland McGrath  <roland@redhat.com>
1061         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1062         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1063         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1064         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1065         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1066         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1067         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1068         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1069         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1070         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1071         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1073 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
1075         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1076         and __prev field to pthread_mutex_t.
1077         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1078         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1079         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1080         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1081         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1082         to pthread_mutex_t.
1084 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
1086         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1087         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1088         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1089         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1090         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1091         and PTHREAD_MUTEXATTR_FLAG_BITS.
1092         * descr.h (struct pthread): Add robust_list field and define
1093         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1094         * pthread_mutexattr_getrobust.c: New file.
1095         * pthread_mutexattr_setrobust.c: New file.
1096         * pthread_mutex_consistent.c: New file.
1097         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1098         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1099         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1100         Adjust pthread_mutex_t initializers.
1101         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1102         field to pthread_mutex_t.
1103         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1104         and __prev field to pthread_mutex_t.
1105         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1106         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1107         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1108         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1109         * pthread_mutexattr_gettype.c: Likewise.
1110         * pthread_mutexattr_setpshared.c: Likewise.
1111         * pthread_mutexattr_settype.c: Likewise.
1112         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1113         Initialize mutex kind according to robust flag.
1114         * pthread_mutex_lock.c: Implement local robust mutex.
1115         * pthread_mutex_timedlock.c: Likewise.
1116         * pthread_mutex_trylock.c: Likewise.
1117         * pthread_mutex_unlock.c: Likewise.
1118         * pthread_create.c (start_thread): Mark robust mutexes which remained
1119         locked as dead.
1120         * tst-robust1.c: New file.
1121         * tst-robust2.c: New file.
1122         * tst-robust3.c: New file.
1123         * tst-robust4.c: New file.
1124         * tst-robust5.c: New file.
1125         * tst-robust6.c: New file.
1126         * tst-robust7.c: New file.
1127         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1128         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1129         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1130         tst-robust5, tst-robust6, and tst-robust7.
1132         * tst-typesizes.c: New file.
1133         * Makefile (tests): Add tst-typesizes.
1135         * tst-once3.c: More debug output.
1137 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
1139         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1140         missing after last change.
1142         * version.c: Update copyright year.
1144 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
1146         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1147         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1148         * pthread_mutex_trylock.c: Likewise.
1149         * pthread_mutex_timedlock.c: Likewise.
1150         * pthread_mutex_unlock.c: Likewise.
1152 2005-12-22  Roland McGrath  <roland@redhat.com>
1154         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1155         so that #include_next's search location is not reset to the -I..
1156         directory where <nptl/...> can be found.
1158 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
1160         [BZ #1913]
1161         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1162         Fix unwind info.  Remove useless branch prediction prefix.
1163         * tst-cancel24.cc: New file.
1164         * Makefile: Add rules to build and run tst-cancel24.
1166 2005-12-21  Roland McGrath  <roland@redhat.com>
1168         * libc-cancellation.c: Use <> rather than "" #includes.
1169         * pt-cleanup.c: Likewise.
1170         * pthread_create.c: Likewise.
1171         * pthread_join.c: Likewise.
1172         * pthread_timedjoin.c: Likewise.
1173         * pthread_tryjoin.c: Likewise.
1174         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1175         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1176         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1177         * unwind.c: Likewise.
1179 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1181         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1182         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1183         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1184         THREAD_COPY_POINTER_GUARD): Define.
1186 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
1188         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1189         rather than one.
1190         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1191         THREAD_COPY_POINTER_GUARD): Define.
1192         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1193         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1194         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1195         THREAD_COPY_POINTER_GUARD): Define.
1196         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1197         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1198         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1199         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1200         Use PTR_DEMANGLE for B0 if defined.
1202 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
1204         * pthread_create.c (__pthread_create_2_1): Use
1205         THREAD_COPY_POINTER_GUARD if available.
1206         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1207         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1208         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1209         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1210         * sysdeps/x86_64/tls.h: Likewise.
1212 2005-12-15  Roland McGrath  <roland@redhat.com>
1214         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1216 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1218         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1219         sysdeps/generic.
1220         * errno-loc.c: New file.
1222 2005-12-12  Roland McGrath  <roland@redhat.com>
1224         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1225         adjustments before choosing stack size.  Update minimum stack size
1226         calculation to match allocate_stack change.
1228 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1230         * allocatestack.c (allocate_stack): Don't demand that there is an
1231         additional full page available on the stack beside guard, TLS, the
1232         minimum stack.
1234 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1236         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1237         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1239         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1240         compiling 32-bit code we must define __cleanup_fct_attribute.
1242 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1244         [BZ #1920]
1245         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1246         __attribute__ instead of __attribute.
1247         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1248         (__cleanup_fct_attribute): Likewise.
1250 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1252         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1253         a write barrier before writing libgcc_s_getcfa.
1255 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1257         * sysdeps/unix/sysv/linux/configure: Removed.
1259 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1261         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1262         optional init_array/fini_array support.
1264 2005-10-24  Roland McGrath  <roland@redhat.com>
1266         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1267         versioned_symbol use.
1269 2005-10-16  Roland McGrath  <roland@redhat.com>
1271         * init.c (__pthread_initialize_minimal_internal): Even when using a
1272         compile-time default stack size, apply the minimum that allocate_stack
1273         will require, and round up to page size.
1275 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1277         * Makefile ($(test-modules)): Remove static pattern rule.
1279 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1280             Ulrich Drepper  <drepper@redhat.com>
1282         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1283         alignment in callback function.
1284         * Makefile: Add rules to build and run tst-align3.
1285         * tst-align3.c: New file.
1287 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1289         * allocatestack.c (setxid_signal_thread): Add
1290         INTERNAL_SYSCALL_DECL (err).
1292 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1294         * allocatestack.c (setxid_signal_thread): Need to use
1295         atomic_compare_and_exchange_bool_acq.
1297 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1298             Jakub Jelinek  <jakub@redhat.com>
1300         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1301         CANCEL_RESTMASK.
1302         (struct pthread): Move specific_used field to avoid padding.
1303         Add setxid_futex field.
1304         * init.c (sighandler_setxid): Reset setxid flag and release the
1305         setxid futex.
1306         * allocatestack.c (setxid_signal_thread): New function.  Broken
1307         out of the bodies of the two loops in __nptl_setxid.  For undetached
1308         threads check whether they are exiting and if yes, don't send a signal.
1309         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1310         * pthread_create.c (start_thread): For undetached threads, check
1311         whether setxid bit is set.  If yes, wait until signal has been
1312         processed.
1314         * allocatestack.c (STACK_VARIABLES): Initialize them.
1315         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1317 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1319         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1320         waiters, awake all waiters on the associated mutex.
1322 2005-09-22  Roland McGrath  <roland@redhat.com>
1324         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1325         ../sysdeps/x86_64/hp-timing.h).
1327 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1329         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1330         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1331         (lll_futex_wake_unlock): Define.
1332         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1333         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1334         (lll_futex_wake_unlock): Define.
1335         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1336         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1337         (lll_futex_wake_unlock): Define.
1338         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1339         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1340         (lll_futex_wake_unlock): Define.
1341         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1342         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1343         (lll_futex_wake_unlock): Define.
1344         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1345         lll_futex_wake_unlock.
1346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1347         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1348         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1349         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1350         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1351         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1353 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1355         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1356         Fix typo in register name.
1358 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1360         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1361         Use __sigfillset.  Document that sigfillset does the right thing wrt
1362         to SIGSETXID.
1364 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
1366         * tst-stackguard1.c (do_test): Likewise.
1368 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
1370         * tst-stackguard1.c (do_test): Don't fail if the poor man's
1371         randomization doesn't work well enough.
1373 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1375         [BZ #1102]
1376         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1377         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1378         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1379         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1380         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1381         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1382         in the structure.
1383         * Makefile (tests): Add tst-initializers1.
1384         (CFLAGS-tst-initializers1.c): Set.
1385         * tst-initializers1.c: New test.
1387 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1389         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1390         Make sure __flags are located at offset 48 from the start of the
1391         structure.
1393 2005-07-02  Roland McGrath  <roland@redhat.com>
1395         * Makeconfig: Comment fix.
1397 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1399         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1400         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1401         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1402         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1403         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1404         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1405         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1406         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1407         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1408         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1410 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1412         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1413         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1414         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1415         fields.
1416         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1417         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1418         field.  Put in sysinfo field unconditionally.
1419         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1420         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1421         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1422         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1423         fields.
1424         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1425         * pthread_create.c (__pthread_create_2_1): Use
1426         THREAD_COPY_STACK_GUARD macro.
1427         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1428         tests.
1429         * tst-stackguard1.c: New file.
1430         * tst-stackguard1-static.c: New file.
1432 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1434         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1435         Invoke CGOTSETUP and CGOTRESTORE.
1436         (CGOTSETUP, CGOTRESTORE): Define.
1438 2005-05-29  Richard Henderson  <rth@redhat.com>
1440         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1441         (tf_write, tf_writev): Use it.
1442         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1443         the system minimum.
1445 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1447         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1448         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1449         __librt_*_asynccancel@local.
1451 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1453         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1454         all occurrences of JUMPTARGET.  Instead append @local to labels.
1456 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1458         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1459         size/alignment of struct pthread rather than tcbhead_t.
1460         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1461         Likewise.
1462         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1463         Likewise.
1464         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1465         Likewise.
1467 2005-05-19  Richard Henderson  <rth@redhat.com>
1469         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1470         __sync_val_compare_and_swap, not explicit _si variant.
1471         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1473 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1475         [BZ #915]
1476         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1478 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1480         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1481         .eh_frame section, use cfi_* directives.
1483 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1485         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1486         of "" includes.
1488 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1490         [BZ #1075]
1491         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1492         aio_write blocks.
1494 2005-04-27  Roland McGrath  <roland@redhat.com>
1496         * Makefile (tests): Remove tst-clock2.
1498         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1499         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1500         translating to the kernel clockid_t for our own process/thread clock.
1502         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1504 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1506         * old_pthread_cond_init.c: Include <errno.h>.
1507         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1508         process shared or uses clock other than CLOCK_REALTIME.
1509         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1511 2005-04-13  David S. Miller  <davem@davemloft.net>
1513         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1514         * sysdeps/sparc/sparc64/clone.S: New file.
1516 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1518         [BZ #1102]
1519         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1520         __inline instead of inline.
1521         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1523 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1525         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1526         functionally equivalent, but shorter instructions.
1527         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1528         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1529         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1530         Likewise.
1531         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1532         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1533         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1534         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1535         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1536         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1537         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1538         Likewise.
1539         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1540         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1541         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1542         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1543         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1545 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1547         * sysdeps/mips/Makefile: New file.
1548         * sysdeps/mips/nptl-sysdep.S: New file.
1549         * sysdeps/mips/tcb-offsets.sym: New file.
1550         * sysdeps/mips/pthread_spin_lock.S: New file.
1551         * sysdeps/mips/pthread_spin_trylock.S: New file.
1552         * sysdeps/mips/pthreaddef.h: New file.
1553         * sysdeps/mips/tls.h: New file.
1554         * sysdeps/mips/jmpbuf-unwind.h: New file.
1555         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1556         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1557         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1558         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1559         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1560         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1561         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1562         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1563         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1564         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1566 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1568         [BZ #1112]
1569         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1570         variable to scerr.
1572 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1574         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1576 2005-02-25  Roland McGrath  <roland@redhat.com>
1578         * alloca_cutoff.c: Correct license text.
1579         * tst-unload.c: Likewise.
1580         * sysdeps/pthread/allocalim.h: Likewise.
1581         * sysdeps/pthread/pt-initfini.c: Likewise.
1582         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1583         * sysdeps/pthread/bits/sigthread.h: Likewise.
1584         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1585         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1587 2005-02-16  Roland McGrath  <roland@redhat.com>
1589         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1590         Use unsigned int * for ptr_nthreads.
1592 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1594         [BZ #721]
1595         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1596         gcc4.
1598 2005-02-07  Richard Henderson  <rth@redhat.com>
1600         [BZ #787]
1601         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1602         argument.
1604 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1606         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1607         order of arguments in invocation of atomic_add_zero.
1609 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1611         [BZ #737]
1612         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1613         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1614         at least gotntpoff relocation and addition.
1615         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1616         Likewise.
1617         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1618         Likewise.
1619         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1620         Likewise.
1622 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1624         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1625         entry for static tls deallocation fix.
1626         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1627         also contains information whether the memory pointed to is static
1628         TLS or not.
1629         * sysdeps/i386/tls.h: Likewise.
1630         * sysdeps/ia64/tls.h: Likewise.
1631         * sysdeps/powerpc/tls.h: Likewise.
1632         * sysdeps/s390/tls.h: Likewise.
1633         * sysdeps/sh/tls.h: Likewise.
1634         * sysdeps/sparc/tls.h: Likewise.
1635         * sysdeps/x86_64/tls.h: Likewise.
1637 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1639         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1641 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1643         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1644         %esp.
1645         * Makefile (tests): Add tst-align2.
1646         * tst-align2.c: New test.
1647         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1648         -mpreferred-stack-boundary=4.
1650 2004-12-18  Roland McGrath  <roland@redhat.com>
1652         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1653         New file removed withdrawn for the moment.
1655 2004-12-17  Richard Henderson  <rth@redhat.com>
1657         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1658         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1660 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1662         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1663         Increased PTHREAD_STACK_MIN.
1665         * tst-context1.c (stacks): Use bigger stack size.
1667 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1669         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1670         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1672 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1674         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1675         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1676         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1678 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1680         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1682 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1684         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1685         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1687         * tst-getpid1.c: If child crashes, report this first.  Print which
1688         signal.
1690 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1692         * init.c (__pthread_initialize_minimal_internal): Also unblock
1693         SIGSETXID.
1695 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1697         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1698         _POSIX_THREAD_CPUTIME): Define to 0.
1699         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1700         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1701         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1702         __timer_signal_thread_tclk): Remove.
1703         (init_module): Remove their initialization.
1704         (thread_cleanup): Remove their cleanup assertions.
1705         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1706         __timer_signal_thread_tclk): Remove.
1707         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1708         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1709         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1711 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1713         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1714         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1716         * Makefile (tests): Add tst-getpid2.
1717         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1718         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1719         * tst-getpid2.c: New test.
1721 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1723         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1725 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1727         * Makefile (tests): Add tst-getpid1.
1728         * tst-getpid1.c: New file.
1729         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1730         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1732 2004-12-02  Roland McGrath  <roland@redhat.com>
1734         * Makefile (libpthread-nonshared): Variable removed.
1735         ($(objpfx)libpthread_nonshared.a): Target removed.
1736         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1737         These are now handled by generic magic from
1738         libpthread-static-only-routines being set.
1740 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1742         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1743         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1744         _POSIX_THREAD_PRIO_PROTECT): Define.
1745         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1746         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1747         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1749 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1751         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1752         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1753         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1754         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1755         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1756         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1757         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1759 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1761         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1763         * Makefile (libpthread-routines): Add pthread_setschedprio.
1764         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1765         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1766         * pthread_setschedprio.c: New file.
1768 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1770         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1771         * pthread_cancel.c (pthread_create): Likewise.
1773         * Makefile (libpthread-routines): Add vars.
1774         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1775         * init.c (__default_stacksize, __is_smp): Remove.
1776         * vars.c: New file.
1777         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1778         and define a wrapper macro.
1779         (PTHREAD_STATIC_FN_REQUIRE): Define.
1780         * allocatestack.c (__find_thread_by_id): Undefine.
1781         * pthread_create (__pthread_keys): Remove.
1782         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1783         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1784         PTHREAD_STATIC_FN_REQUIRE.
1786 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1788         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1789         parameter to REGISTER macro.
1791 2004-11-17  Roland McGrath  <roland@redhat.com>
1793         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1794         Make sure SIGCANCEL is blocked as well.
1796 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1798         * sysdeps/pthread/setxid.h: New file.
1799         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1800         (struct xid_command): Add forward decl.
1801         (struct pthread_functions): Change return type of __nptl_setxid hook
1802         to int.
1803         * pthreadP.h (__nptl_setxid): Change return type to int.
1804         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1805         calling thread, return its return value and set errno on failure.
1806         * descr.h (struct xid_command): Change id type to long array.
1808         * Makefile: Add rules to build and test tst-setuid1 and
1809         tst-setuid1-static.
1810         * tst-setuid1.c: New test.
1811         * tst-setuid1-static.c: New test.
1813 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1815         * Makefile (tests): Add tst-exit3.
1816         * tst-exit3.c: New test.
1818 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1820         * Makefile (tests): Add tst-exit2.
1821         * tst-exit2.c: New file.
1823 2004-11-09  Roland McGrath  <roland@redhat.com>
1825         [BZ #530]
1826         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1827         here, before calling clone.
1828         * pthread_create.c (start_thread): Don't do it here.
1830 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1832         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1834 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1836         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1837         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1838         assembler warning.
1840 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1842         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1843         if sched_priority is not between minprio and maxprio.
1845 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1847         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1848         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1850         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1851         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1853 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1855         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1856         not-cancelable I/O functions.
1858 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1860         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1861         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1862         make sure 2 is stored in the futex and we looked at the old value.
1863         Fix a few other problems to return the correct value.
1865 2004-10-14  Richard Henderson  <rth@redhat.com>
1867         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1868         make gcc4 happy.
1870 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1872         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1873         of pthread-functions.h and pthreaddef.h.
1874         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1876         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1877         Change __data.__nwaiters from int to unsigned int.
1879         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1880         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1882         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1883         before return type.
1885         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1886         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1888 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1890         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1891         test fails, remove message queue.
1892         (tf_msgsnd): Likewise.
1894 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1896         * tst-clock1.c: Change #ifdef to #if defined.
1897         * tst-clock2.c: Likewise.
1898         * tst-cond11.c: Likewise.
1900         * sysdeps/pthread/timer_create.c (timer_create): Use
1901         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1902         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1903         THREAD_CPUTIME.
1905 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1907         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1908         _POSIX_THREAD_CPUTIME): Define to 0.
1910 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1912         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1913         and _POSIX_THREAD_CPUTIME to zero.
1914         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1915         * tst-barrier2.c: Fix testing for POSIX feature.
1916         * tst-clock1.c: Likewise.
1917         * tst-clock2.c: Likewise.
1918         * tst-cond11.c: Likewise.
1919         * tst-cond4.c: Likewise.
1920         * tst-cond6.c: Likewise.
1921         * tst-flock2.c: Likewise.
1922         * tst-mutex4.c: Likewise.
1923         * tst-mutex9.c: Likewise.
1924         * tst-rwlock12.c: Likewise.
1925         * tst-rwlock4.c: Likewise.
1926         * tst-signal1.c: Likewise.
1927         * tst-spin2.c: Likewise.
1928         * sysdeps/pthread/posix-timer.h: Likewise.
1929         * sysdeps/pthread/timer_create.c: Likewise.
1930         * sysdeps/pthread/timer_routines.c: Likewise.
1932 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1934         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1935         (__lll_mutex_timedlock_wait): Address futex correctly.
1937         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1938         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1939         make sure 2 is stored in the futex and we looked at the old value.
1940         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1941         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1942         which might very well made the code not working at all before.
1943         [BZ #417]
1945 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1947         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1948         allow SIGSETXID to be sent.
1949         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1950         for SIGSETXID to be defined.
1951         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1952         SIGSETXID cannot be blocked.
1954         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1955         Add __extension__ to long long types.
1956         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1957         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1958         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1959         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1960         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1961         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1962         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1964 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1966         * descr.h (struct pthread): Add stopped_start field.
1967         * sysdeps/pthread/createthread.c (create_thread): Set
1968         start_stopped flag in descriptor for new thread appropriately.
1969         * pthread_create.c (start_thread): Only take lock to be stopped on
1970         startup if stopped_start flag says so.
1972 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1974         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1975         is created detached and if yes, do not try to free the stack in case
1976         the thread creation failed.
1977         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1978         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1979         case there has been no error.  [BZ #405]
1981         * pthread_create.c (start_thread): Don't wait for scheduler data
1982         etc to be set at the beginning of the function.  The cancellation
1983         infrastructure must have been set up.  And enable async
1984         cancellation before potentially going to sleep.  [BZ #401]
1986 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1988         * Versions: Remove exports for pthread_set*id_np functions.
1989         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1990         for now.
1991         * Makefile: Don't build pthread_set*id code for now.
1993 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1995         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1996         internal use.
1997         * allocatestack.c (__nptl_setxid): New function.
1998         * descr.h (struct xid_command): Define type.
1999         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
2000         (sighandler_setxid): New function.
2001         (__pthread_initialize_minimal): Register sighandler_setxid for
2002         SIGCANCEL.
2003         * pt-allocrtsig.c: Update comment.
2004         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
2005         Declare __nptl_setxid.
2006         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
2007         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
2008         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2009         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2010         and pthread_setresuid_np.
2011         * pthread_setgid_np.c: New file.
2012         * pthread_setuid_np.c: New file.
2013         * pthread_setegid_np.c: New file.
2014         * pthread_seteuid_np.c: New file.
2015         * pthread_setregid_np.c: New file.
2016         * pthread_setreuid_np.c: New file.
2017         * pthread_setresgid_np.c: New file.
2018         * pthread_setresuid_np.c: New file.
2019         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
2020         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2021         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2022         and pthread_setresuid_np.
2023         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
2024         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
2025         pthread_setregid, and pthread_setresgid.
2027 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
2029         * allocatestack.c (allocate_stack): Return EAGAIN instead of
2030         ENOMEM when out of memory.
2032 2004-09-10  Roland McGrath  <roland@redhat.com>
2034         [BZ #379]
2035         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
2036         code, since we don't try to use the broken CLONE_STOPPED any more.
2037         * pthread_create.c (start_thread): Likewise.
2039 2004-09-15  Richard Henderson  <rth@redhat.com>
2041         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
2043 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
2045         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
2046         (__libc_unwind_longjmp): Delete macro and declare as function.
2047         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
2048         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
2049         nptl directory.
2050         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
2051         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
2052         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
2054 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
2056         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
2057         for __USE_XOPEN2K.
2058         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
2059         types also for __USE_XOPEN2K.
2060         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2061         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2062         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2063         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2064         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2065         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2066         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2067         [BZ #320]
2069 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
2071         * sysdeps/pthread/pthread.h
2072         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2073         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2074         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2075         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2076         [BZ #375]
2078 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
2080         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2081         PSEUDO to be used with . prefix.
2083         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2084         Use atomic_increment instead of atomic_exchange_and_add.
2085         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2086         Likewise.
2087         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2088         Likewise.
2089         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2090         Likewise.
2092         * allocatestack.c (allocate_stack): Use atomic_increment_val
2093         instead of atomic_exchange_and_add.
2094         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2095         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2096         Likewise.
2097         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2098         Likewise.
2100         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2101         the initialization function might throw.
2103 2005-09-05  Richard Henderson  <rth@redhat.com>
2105         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2106         Move definition inside libpthread, libc, librt check.  Provide
2107         definition for rtld.
2109 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2111         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2112         waiters, awake all waiters on the associated mutex.
2114 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
2116         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2117         * sysdeps/i386/jmpbuf-unwind.h: Likewise
2118         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2119         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2120         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2121         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2122         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2123         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2124         * unwind.c: Use it.
2126         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2127         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2128         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2129         Likewise.
2130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2131         Decrement __nwaiters.  If pthread_cond_destroy has been called and
2132         this is the last waiter, signal pthread_cond_destroy caller and
2133         avoid using the pthread_cond_t structure after unlock.
2134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2135         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2136         Read clock type from the least significant bits of __nwaiters instead
2137         of __clock.
2138         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2139         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2141 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
2143         [BZ #342]
2144         * Makefile (tests): Add tst-cond20 and tst-cond21.
2145         * tst-cond20.c: New test.
2146         * tst-cond21.c: New test.
2147         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2148         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2149         it unsigned int.
2150         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2151         Likewise.
2152         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2153         (pthread_cond_t): Likewise.
2154         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2155         Likewise.
2156         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2157         Likewise.
2158         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2159         Likewise.
2160         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2161         (cond_nwaiters): New.
2162         (clock_bits): New.
2163         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2164         if there are waiters not signalled yet.
2165         Wait until all already signalled waiters wake up.
2166         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2167         __nwaiters.  If pthread_cond_destroy has been called and this is the
2168         last waiter, signal pthread_cond_destroy caller and avoid using
2169         the pthread_cond_t structure after unlock.
2170         (__pthread_cond_wait): Increment __nwaiters in the beginning,
2171         decrement it when leaving.  If pthread_cond_destroy has been called
2172         and this is the last waiter, signal pthread_cond_destroy caller.
2173         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2174         Likewise.  Read clock type from the least significant bits of
2175         __nwaiters instead of __clock.
2176         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2177         whether clock ID can be encoded in COND_CLOCK_BITS bits.
2178         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2179         clock type just from the last COND_CLOCK_BITS bits of value.
2180         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2181         instead of __clock, just from second bit of condattr's value.
2183 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
2185         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2186         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
2187         != 64.
2188         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2190 2004-08-15  Roland McGrath  <roland@frob.com>
2192         * pthread_atfork.c: Update copyright terms including special exception
2193         for these trivial files, which are statically linked into executables
2194         that use dynamic linking for the significant library code.
2196 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
2198         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2199         pthread_rwlock_rdlock.
2200         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2201         Decrease __nr_readers_queued after reacquiring lock.
2202         * sysdeps/pthread/pthread_rwlock_timedrdlock
2203         (pthread_rwlock_timedrdlock): Likewise.
2204         Reported by Bob Cook <bobcook47@hotmail.com>.
2206 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
2208         * tst-rwlock14.c (tf): Read main thread handle from *ARG
2209         before pthread_barrier_wait.
2211 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
2213         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2214         Remove unnecessary exception handling data.
2216 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
2218         [BZ #284]
2219         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2220         instead of clockid_t.
2222 2004-07-21  Roland McGrath  <roland@redhat.com>
2224         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2226 2004-07-19  Roland McGrath  <roland@redhat.com>
2228         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2230 2004-07-02  Roland McGrath  <roland@redhat.com>
2232         * configure: Don't exit.
2234 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2236         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2237         (__pthread_cond_timedwait): Check for invalid nanosecond in
2238         timeout value.
2240 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2242         * Makefile: Add rules to build and run tst-fini1.
2243         * tst-fini1.c: New file.
2244         * tst-fini1mod.c: New file.
2246 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2248         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2249         if no cancellation support is needed.
2250         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2251         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2252         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2253         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2254         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2255         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2256         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2257         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2258         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2260         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2261         only if not already defined.
2263 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2265         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2266         constraint "m" instead of "0" for futex.
2268         * shlib-versions: Add powerpc64-.*-linux.*.
2270 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2272         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2273         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2274         for valid tv_nsec.
2275         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2276         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2277         bits.
2279 2004-06-29  Roland McGrath  <roland@redhat.com>
2281         * Banner: NPTL no longer has its own version number.
2282         * Makefile (nptl-version): Variable removed.
2283         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2284         using $(version), the glibc version number.
2286 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2288         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2289         Fix branch offset for a PLT entry.
2290         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2291         Likewise.
2292         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2293         Likewise.
2294         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2295         Likewise.
2296         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2297         Likewise.
2299 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2301         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2302         unconditionally.
2304 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2306         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2307         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2308         instead of tv_sec.
2309         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2310         (pthread_rwlock_timedrdlock): Likewise.
2312 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2314         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2315         Set __r7 to val, not mutex.
2317 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2319         * Makefile: Add rules to build tst-rwlock14.
2320         * tst-rwlock14.c: New file.
2322 2004-06-24  Boris Hu  <boris.hu@intel.com>
2324         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2325         check.
2326         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2328 2004-06-19  Andreas Jaeger  <aj@suse.de>
2330         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2331         assembler in last patch.
2333 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2335         * sysdeps/pthread/pthread_cond_timedwait.c
2336         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2338         (__pthread_cond_timedwait): Check for invalid nanosecond in
2339         timeout value.
2340         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2341         * tst-cond19.c: New file.
2342         * Makefile: Add rules to build and run tst-cond19.
2344 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2346         * tst-context1.c (GUARD_PATTERN): Defined.
2347         (tst_context_t): Define struct containing ucontext_t & guard words.
2348         (ctx): Declare as an array of tst_context_t.
2349         (fct): Verify uc_link & guard words are still valid.
2350         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2352 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2354         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2355         Add __data.__futex field, reshuffle __data.__clock.
2356         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2357         (__pthread_cond_signal): Increment __futex at the same time as
2358         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2359         address of low 32-bits of __wakeup_seq to futex syscall.
2360         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2361         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2362         releasing internal lock to FUTEX_WAIT.
2363         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2364         (__pthread_cond_timedwait): Likewise.
2365         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2366         (FUTEX_CMP_REQUEUE): Define.
2367         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2368         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2369         Pass __futex value from before the unlock and __futex address instead
2370         of address of low 32-bits of __wakeup_seq to futex syscall.
2371         Fallback to FUTEX_WAKE all on any errors.
2373 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2375         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2376         comment typo.
2377         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2378         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2379         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2380         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2381         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2383 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2385         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2386         Add memory clobber to inline assembly.
2387         (__lll_mutex_trylock): Likewise.
2388         (__lll_mutex_cond_trylock): Likewise.
2390 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2392         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2393         Pass val argument as 6th system call argument in %r7.
2395 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2397         * Makefile (tests): Add tst-cond16.
2398         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2399         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2400         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2401         Add __data.__futex field, reshuffle __data.__clock.
2402         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2403         (__pthread_cond_signal): Increment __futex at the same time as
2404         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2405         address of low 32-bits of __wakeup_seq to futex syscall.
2406         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2407         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2408         releasing internal lock to FUTEX_WAIT.
2409         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2410         (__pthread_cond_timedwait): Likewise.
2411         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2412         (FUTEX_CMP_REQUEUE): Define.
2413         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2414         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2415         Pass __futex value from before the unlock and __futex address instead
2416         of address of low 32-bits of __wakeup_seq to futex syscall.
2417         Fallback to FUTEX_WAKE all on any errors.
2418         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2419         Define.
2420         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2421         internally.  Return non-zero if error, zero if success.
2422         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2423         Add __data.__futex field, reshuffle __data.__clock.
2424         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2425         Define.
2426         (lll_futex_requeue): Add val argument, return 1 unconditionally
2427         for the time being.
2428         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2429         Add __data.__futex field, reshuffle __data.__clock.
2430         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2431         Define.
2432         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2433         internally.  Return non-zero if error, zero if success.
2434         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2435         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2436         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2437         Define.
2438         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2439         internally.  Return non-zero if error, zero if success.
2440         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2441         Add __data.__futex field, reshuffle __data.__clock.
2442         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2443         Define.
2444         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2445         internally.  Return non-zero if error, zero if success.
2446         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2447         Add __data.__futex field, reshuffle __data.__clock.
2448         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2449         Add __data.__futex field, reshuffle __data.__clock.
2450         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2451         Increment __futex at the same time as __wakeup_seq or __total_seq.
2452         Pass address of __futex instead of address of low 32-bits of
2453         __wakeup_seq to futex syscall.
2454         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2455         Pass __futex value from before releasing internal lock
2456         to FUTEX_WAIT.
2457         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2458         Likewise.  Avoid unnecessary shadowing of variables.
2459         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2460         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2461         unlock and __futex address instead of address of low 32-bits of
2462         __wakeup_seq to futex_requeue macro, adjust for new return value
2463         meaning.
2464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2465         (__pthread_cond_signal): Increment __futex at the same time as
2466         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2467         address of low 32-bits of __wakeup_seq to futex syscall.
2468         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2469         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2470         releasing internal lock to FUTEX_WAIT.
2471         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2472         (__pthread_cond_timedwait): Likewise.
2473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2474         (FUTEX_CMP_REQUEUE): Define.
2475         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2476         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2477         Pass __futex value from before the unlock and __futex address instead
2478         of address of low 32-bits of __wakeup_seq to futex syscall.
2479         Fallback to FUTEX_WAKE all on any errors.
2481 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2483         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2484         Add nop to align the end of critical section.
2485         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2487 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2489         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2490         Add __broadcast_seq field.
2491         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2492         all waiters as woken with woken_seq and bump broadcast counter.
2493         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2494         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2495         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2496         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2498 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2501         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2502         Reported by Kaz Kojima.
2504 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2506         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2508 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2510         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2511         __broadcast_seq with bc_seq after acquiring internal lock instead of
2512         before it.
2514 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2516         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2517         compilation.
2518         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2519         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2520         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2521         (pthread_cond_t): Add __data.__broadcast_seq field.
2522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2523         (FRAME_SIZE): Define.
2524         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2525         Comment typo fixes.
2526         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2527         Define.
2528         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2529         typo fixes.
2530         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2531         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2532         fixes.
2534 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2536         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2537         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2538         Add __broadcast_seq field.
2539         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2540         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2541         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2542         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2543         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2545         all waiters as woken with woken_seq and bump broadcast counter.
2546         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2547         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2548         __broadcast_seq field.
2549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2550         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2551         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2552         * pthread_cond_init.c: Initialize __broadcast_seq field.
2553         * Makefile (tests): Add tst-cond17 and tst-cond18.
2554         Add .NOTPARALLEL goal.
2555         * tst-cond16.c: New file.  From Jakub.
2556         * tst-cond17.c: New file.  From Jakub.
2557         * tst-cond18.c: New file.  From Jakub.
2559 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2561         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2562         unwind info.
2564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2565         Parametrize frame size.  Correct some unwind info.
2566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2568 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2570         * tst-stack3.c: Note testing functionality beyond POSIX.
2572 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2574         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2575         Change conditional from ifdef to if.
2577 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2579         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2580         SYSDEP_CANCEL_ERROR): Define.
2581         (PSEUDO): Use it.
2583 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2585         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2587 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2589         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2591 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2593         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2594         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2595         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2596         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2598 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2600         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2601         thread has all signals blocked.
2603 2004-04-18  Andreas Jaeger  <aj@suse.de>
2605         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2606         (SEM_VALUE_MAX): Add missing brace.
2608 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2610         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2611         in rt subdir.
2612         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2613         * sysdeps/pthread/tst-mqueue8x.c: New test.
2614         * tst-cancel4.c: Update comment about message queues.
2616         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2617         return it_value { 0, 0 }.
2618         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2619         like SIGEV_SIGNAL.
2620         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2621         assertion for SIGEV_NONE.
2622         (thread_attr_compare): Compare all attributes, not just a partial
2623         subset.
2625 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2627         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2629 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2631         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2632         Just use a plain number.
2633         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2634         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2635         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2636         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2637         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2638         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2639         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2641 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2643         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2644         frame info.
2645         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2647 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2649         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2650         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2651         of calling sigwaitinfo.
2653 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2655         * allocatestack.c (allocate_stack): Set reported_guardsize
2656         unconditionally.
2657         * pthread_getattr_np.c (pthread_getattr_np): Use
2658         reported_guardsize instead of guardsize.
2659         * descr.h (struct pthread): Add reported_guardsize field.
2661 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2663         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2665 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2667         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2669 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2671         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2672         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2673         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2674         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2675         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2676         Define.
2677         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2678         (_POSIX_MESSAGE_PASSING): Define.
2679         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2680         (_POSIX_MESSAGE_PASSING): Define.
2681         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2682         (_POSIX_MESSAGE_PASSING): Define.
2684 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2686         * tst-context1.c (fct): Check whether correct stack is used.
2688 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2690         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2691         matching constraints for asm mem parameters.
2693         * tst-clock2.c (tf): Don't define unless needed.
2695 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2697         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2698         $(gnulib).
2700 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2702         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2703         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2704         * pthreadP.h: Declare __nptl_deallocate_tsd.
2705         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2706         Adjust caller.
2708         * Makefile (tests): Add tst-tsd5.
2709         * tst-tsd5.c: New file.
2711 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2713         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2714         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2715         is SHLIB_COMPAT check.
2716         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2717         (__pthread_attr_getaffinity_old): Likewise.
2718         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2719         (__pthread_getaffinity_old): Likewise.
2720         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2721         (__pthread_setaffinity_old): Likewise.
2723 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2725         * allocatestack.c (_make_stacks_executable): Call
2726         _dl_make_stack_executable first.
2728 2004-03-24  Roland McGrath  <roland@redhat.com>
2730         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2731         constraint instead of "0".
2733 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2735         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2736         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2738         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2739         code to avoid warning.
2741 2004-03-24  Andreas Jaeger  <aj@suse.de>
2743         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2744         (__pthread_attr_setaffinity_old): Remove const.
2746 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2748         * sysdeps/unix/sysv/linux/smp.h: New file.
2749         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2750         * init.c: Define __is_smp.
2751         (__pthread_initialize_minimal_internal): Call is_smp_system to
2752         initialize __is_smp.
2753         * pthreadP.h: Declare __is_smp.
2754         Define MAX_ADAPTIVE_COUNT is necessary.
2755         * pthread_mutex_init.c: Add comment regarding __spins field.
2756         * pthread_mutex_lock.c: Implement adaptive mutex type.
2757         * pthread_mutex_timedlock.c: Likewise.
2758         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2759         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2760         Add __spins field.
2761         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2762         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2763         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2764         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2765         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2766         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2767         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2768         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2769         lll_mutex_cond_trylock.
2770         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2771         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2772         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2773         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2774         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2775         Define BUSY_WAIT_NOP.
2776         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2777         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2779         * tst-mutex5.c: Add support for testing adaptive mutexes.
2780         * tst-mutex7.c: Likewise.
2781         * tst-mutex5a.c: New file.
2782         * tst-mutex7a.c: New file.
2783         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2785         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2786         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2787         vgettimeofday call might destroy the content.
2789         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2790         @pause in the loop.
2792         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2793         No need to restrict type of ret.  Make it int.  Add comment.
2795         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2796         Remove unnecessary setne instruction.
2798 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2800         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2801         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2802         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2803         If realloc fails, break out of the loop.
2805 2004-03-20  Andreas Jaeger  <aj@suse.de>
2807         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2808         (__pthread_setaffinity_old): Fix interface.
2809         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2810         (__pthread_getaffinity_old): Likewise.
2812         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2813         (__pthread_setaffinity_new): Remove duplicate declaration.
2815 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2817         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2818         the return value to a safe register.
2819         (CDISABLE): Set the function argument correctly.
2821 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2823         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2824         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2825         Rewrite so that only one locked memory operation per round is needed.
2826         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2827         (pthread_barrier_wait): After wakeup, release lock only when the
2828         last thread stopped using the barrier object.
2829         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2830         (__pthread_cond_wait): Don't store mutex address if the current
2831         value is ~0l.  Add correct cleanup support and unwind info.
2832         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2833         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2834         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2835         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2836         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2837         Add correct cleanup support and unwind info.
2838         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2839         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2840         information for syscall wrappers.
2842 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2844         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2845         cpusetsize field, remove next.
2846         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2847         parameter for size of the CPU set.
2848         (pthread_setaffinity_np): Likewise.
2849         (pthread_attr_getaffinity_np): Likewise.
2850         (pthread_attr_setaffinity_np): Likewise.
2851         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2852         interface change, keep compatibility code.
2853         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2854         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2855         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2856         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2857         __pthread_getaffinity_np.
2858         * Versions: Add version for changed interfaces.
2859         * tst-attr3.c: Adjust test for interface change.
2860         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2861         increasing buffer sizes.
2862         * pthread_attr_destroy.c: Remove unused list handling.
2863         * pthread_attr_init.c: Likewise.
2865 2004-03-17  Roland McGrath  <roland@redhat.com>
2867         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2868         first argument to clock_getres so we ever enable kernel timers.
2870 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2872         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2874 2004-03-12  Richard Henderson  <rth@redhat.com>
2876         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2877         oldvalue from CENABLE to CDISABLE.
2879 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2881         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2882         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2883         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2884         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2886 2004-03-11  Richard Henderson  <rth@redhat.com>
2888         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2889         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2890         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2892 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2894         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2895         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2896         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2898 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2900         * forward.c (__pthread_cond_broadcast_2_0,
2901         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2902         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2903         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2905 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2907         * sysdeps/sh/tcb-offsets.sym: Add PID.
2908         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2909         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2911 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2913         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2914         include <sysdep-cancel.h>, vfork is no cancellation point.
2915         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2916         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2917         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2919 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2921         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2922         libc_hidden_def.
2923         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2924         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2925         Likewise.
2926         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2927         Likewise.
2928         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2929         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2930         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2931         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2932         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2934         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2935         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2936         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2937         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2938         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2939         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2941         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2942         a local register for saving old PID.  Negate PID in parent upon exit.
2944         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2945         tcb-offsets.h.
2946         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2947         before syscall, set to the old value in the parent afterwards.
2948         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2949         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2950         tcb-offsets.h.
2951         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2952         before syscall, set to the old value in the parent afterwards.
2953         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2954         * sysdeps/s390/tcb-offsets.sym: Add PID.
2956         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2957         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2958         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2959         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2960         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2961         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2963 2004-03-10  Andreas Schwab  <schwab@suse.de>
2965         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2966         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2967         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2969 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2971         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2972         * tst-cancel21.c (do_one_test): Likewise.
2973         Reported by Gordon Jin <gordon.jin@intel.com>.
2975 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2977         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2978         if non-zero and set to INT_MIN if zero.
2979         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2980         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2981         (SAVE_PID, RESTORE_PID): Define.
2982         (__vfork): Use it.
2983         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2984         Use relative path to avoid including NPTL i386/vfork.S.
2985         (SAVE_PID, RESTORE_PID): Define.
2986         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2987         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2988         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2989         tst-vfork2x.
2990         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2991         * tst-vfork1.c: New test.
2992         * tst-vfork2.c: New test.
2993         * tst-vfork1x.c: New test.
2994         * tst-vfork2x.c: New test.
2996 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2998         * sysdeps/i386/tcb-offsets.sym: Add PID.
2999         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3000         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
3001         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
3003 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
3005         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
3007 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3009         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3010         _rtld_global_ro.
3012 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
3014         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3015         _rtld_global_ro.
3017         * tst-once4.c: Remove unnecessary macro definition.
3019         * tst-mutex7.c (do_test): Limit thread stack size.
3020         * tst-once2.c (do_test): Likewise.
3021         * tst-tls3.c (do_test): Likewise.
3022         * tst-tls1.c (do_test): Likewise.
3023         * tst-signal3.c (do_test): Likewise.
3024         * tst-kill6.c (do_test): Likewise.
3025         * tst-key4.c (do_test): Likewise.
3026         * tst-join4.c (do_test): Likewise.
3027         * tst-fork1.c (do_test): Likewise.
3028         * tst-context1.c (do_test): Likewise.
3029         * tst-cond2.c (do_test): Likewise.
3030         * tst-cond10.c (do_test): Likewise.
3031         * tst-clock2.c (do_test): Likewise.
3032         * tst-cancel10.c (do_test): Likewise.
3033         * tst-basic2.c (do_test): Likewise.
3034         * tst-barrier4.c (do_test): Likewise.
3036 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
3038         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
3040 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
3042         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3043         (__pthread_cond_timedwait): Optimize wakeup test.
3044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3045         (__pthread_cond_wait): Likewise.
3046         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3047         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3048         Likewise.
3050 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
3052         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3053         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
3054         the atomic instruction needed.
3055         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3056         (__lll_mutex_lock_wait): Likewise.
3058 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
3060         * Makefile (tests): Add tst-cond14 and tst-cond15.
3061         * tst-cond14.c: New file.
3062         * tst-cond15.c: New file.
3064 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
3066         * sysdeps/pthread/createthread.c (create_thread): Remove use of
3067         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
3068         needs to be implemented differently to be useful.
3070 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
3072         * pthread_attr_setschedparam.c: Don't test priority against limits
3073         here.  Set ATTR_FLAG_SCHED_SET flag.
3074         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3075         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3076         from parent thread to child.  If attribute is used and scheduling
3077         parameters are not inherited, copy parameters from attribute or
3078         compute them.  Check priority value.
3079         * pthread_getschedparam.c: If the parameters aren't known yet get
3080         them from the kernel.
3081         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3082         ATTR_FLAG_POLICY_SET flag for thread.
3083         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3084         and ATTR_FLAG_POLICY_SET.
3086         * sysdeps/pthread/createthread.c: Use tgkill if possible.
3088         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3089         fail if stack address hasn't been set.  Just return 0.
3091 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
3093         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
3094         libpthread for the files in this list.
3095         (CFLAGS-tst-unload): Removed.
3096         * tst-unload.c (do_test): Don't use complete path for
3097         LIBPHREAD_SO.
3099         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3100         tst-_res1mod2.
3102 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
3104         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3105         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3106         operation per round is needed.
3107         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3108         (__lll_mutex_lock_wait): Likewise.
3110 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
3112         * tst-cancel9.c (cleanup): Don't print to stderr.
3114 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3116         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3118 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
3120         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3121         (__syscall_error_handler2): Call CDISABLE.
3122         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3123         (__syscall_error_handler2): Call CDISABLE.
3125         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3126         Release lock before the loop, don't reacquire it.
3128         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3130 2004-02-19  Andreas Schwab  <schwab@suse.de>
3132         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3133         Fix last change.
3135 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
3137         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3138         (pthread_barrier_wait): After wakeup, release lock only when the
3139         last thread stopped using the barrier object.
3140         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3141         (pthread_barrier_wait): Likewise.
3142         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3143         Likewise.
3144         * Makefile (tests): Add tst-barrier4.
3145         * tst-barrier4.c: New file.
3147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3148         (__pthread_cond_timedwait): Perform timeout test while holding
3149         internal lock to prevent wakeup race.
3150         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3151         * sysdeps/pthread/pthread_cond_timedwait.c
3152         (__pthread_cond_timedwait): Likewise.
3153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3154         (__pthread_cond_timedwait): Likewise.
3156 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
3158         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3159         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3160         * Makefile (tests): Add tst-rwlock13.
3161         * tst-rwlock13.c: New test.
3163 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
3165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3166         (__condvar_tw_cleanup): Little optimization.
3167         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3169 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
3171         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3172         libpthread as "lib" parameter to SHLIB_COMPAT.
3173         (__novmx_siglongjmp): Fix typo in function name.
3174         (__novmx_longjmp): Fix typo in function name.
3176 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3178         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3179         __builtin_expect.
3181         * sysdeps/generic/pt-longjmp.c: Moved to...
3182         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
3184 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
3186         * Makefile (libpthread-routines): Add pt-cleanup.
3187         * pt-longjmp.c: Removed.
3188         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3189         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3190         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3191         Version longjmp, siglongjmp for GLIBC_2.3.4.
3192         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3194 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3196         * sysdeps/pthread/pthread_cond_timedwait.c
3197         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
3198         Reuse code.  Add __builtin_expects.
3200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3201         (__pthread_cond_timedwait): Get internal lock in case timeout has
3202         passed before the futex syscall.
3203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3205 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
3207         * allocatestack.c: Pretty printing.
3209         * sysdeps/pthread/createthread.c (create_thread): Don't add
3210         CLONE_DETACHED bit if it is not necessary.
3212 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
3214         * pthread_getattr_np.c: Include ldsodefs.h.
3216 2004-01-16  Richard Henderson  <rth@redhat.com>
3218         * allocatestack.c: Don't declare __libc_stack_end.
3219         * init.c (__pthread_initialize_minimal_internal): Likewise.
3220         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3222 2004-01-15  Richard Henderson  <rth@redhat.com>
3224         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3225         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3226         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3227         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3228         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3229         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3230         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3231         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3233 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3235         * init.c (pthread_functions): Make array const.
3237 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3239         * allocatestack.c (__make_stacks_executable): Change interface.
3240         Check parameters.  Pass parameter on to libc counterpart.
3241         * pthreadP.h: Change declaration.
3243 2004-01-13  Richard Henderson  <rth@redhat.com>
3245         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3246         prototype form.
3247         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3248         Likewise.
3250         * sysdeps/alpha/Makefile: New file.
3251         * sysdeps/alpha/tcb-offsets.sym: New file.
3252         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3253         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3255         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3256         on powerpc version.
3258 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3260         * Makefile (tests): Add tst-backtrace1.
3261         * tst-backtrace1.c: New test.
3263 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3265         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3266         register as second parameter to the REGISTER macro.
3267         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3268         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3269         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3270         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3271         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3272         of thread register as second parameter to REGISTER macro in 64 case.
3274 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3276         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3277         (CFLAGS-getpid.o): Defined.
3278         (CFLAGS-getpid.os): Defined.
3280 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3282         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3283         returned for main thread does not overlap with any other VMA.
3284         Patch by Jakub Jelinek.
3286 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3288         * tst-raise1.c: Include stdio.h.
3290 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3292         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3293         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3294         If pid is 0, set it to selftid.
3295         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3296         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3297         != 0, return self->tid without doing a syscall.
3298         * descr.h (struct pthread): Move pid field after tid.
3300         * Makefile (tests): Add tst-raise1.
3301         * tst-raise1.c: New file.
3303 2003-12-23  Roland McGrath  <roland@redhat.com>
3305         * tst-oddstacklimit.c: New file.
3306         * Makefile (tests): Add it.
3307         (tst-oddstacklimit-ENV): New variable.
3309         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3310         value up to page size for __default_stacksize.
3312 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3314         * Makefile (tests): Add tst-eintr5.
3315         * tst-eintr5.c: New file.
3317         * eintr.c (eintr_source): Prevent sending signal to self.
3319         * tst-eintr2.c (tf1): Improve error message.
3321 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3323         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3324         * sysdeps/unix/sysv/linux/getpid.c: New file.
3325         * pthread_cancel.c: Add comment explaining use of PID field.
3326         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3327         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3328         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3329         temporarily to signal the field must not be relied on and updated
3330         by getpid().
3331         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3332         temporarily negative.
3333         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3335 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3337         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3338         (eintr_source): If ARG != NULL, use pthread_kill.
3339         * tst-eintr1.c: Adjust for this change.
3340         * tst-eintr2.c: Likewise.
3341         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3342         * tst-eintr3.c: New file.
3343         * tst-eintr4.c: New file.
3345 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3347         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3348         if CANCELSTATE_BITMASK is set.
3349         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3350         Likewise.
3352         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3353         (tests-reverse): Add tst-cancel23.
3354         * tst-cancel22.c: New test.
3355         * tst-cancel23.c: New test.
3357 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3359         * tst-eintr1.c: Better error messages.
3361         * Makefile (tests): Add tst-eintr2.
3362         * tst-eintr2.c: New file.
3364 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3366         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3367         (CFLAGS-tst-cancelx21.c): Set.
3368         * tst-cancel21.c: New test.
3369         * tst-cancelx21.c: New test.
3371         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3372         comparison operand.
3373         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3374         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3375         * pt-longjmp.c: Include jmpbuf-unwind.h.
3376         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3377         _JMPBUF_UNWINDS.  Adjust compared pointers.
3378         * init.c (__pthread_initialize_minimal_internal): Initialize
3379         pd->stackblock_size.
3380         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3381         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3382         * sysdeps/i386/jmpbuf-unwind.h: New file.
3383         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3384         * sysdeps/s390/jmpbuf-unwind.h: New file.
3385         * sysdeps/sh/jmpbuf-unwind.h: New file.
3386         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3387         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3388         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3389         (_JMPBUF_CFA_UNWINDS): Remove.
3390         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3392 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3394         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3395         (CFLAGS-tst-cancelx20.c): Set.
3396         * tst-cancel20.c: New test.
3397         * tst-cancelx20.c: New test.
3399 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3401         * init.c (__pthread_initialize_minimal_internal): Don't treat
3402         architectures with separate register stack special here when
3403         computing default stack size.
3405 2003-12-17  Roland McGrath  <roland@redhat.com>
3407         * Makefile (tst-cancelx7-ARGS): New variable.
3408         Reportd by Greg Schafer <gschafer@zip.com.au>.
3410 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3412         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3413         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3414         (tst-stack3-ENV): Set.
3415         ($(objpfx)tst-stack3-mem): New.
3416         * tst-stack3.c: New test.
3418 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3420         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3421         Add unwind directives.  Drop unused .regstk directive.
3422         (_fini_EPILOG_BEGINS): Add unwind directives.
3424 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3426         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3427         Assume parameter is a pointer.
3428         (lll_futex_wake): Likewise.
3429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3430         Likewise.
3431         (lll_futex_wake): Likewise.
3432         Reported by Boris Hu.
3433         * sysdeps/unix/sysv/linux/unregister-atfork.c
3434         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3436         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3438 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3440         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3441         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3442         __rtld_lock_initialize for ld.so lock.
3443         Patch in part by Adam Li <adam.li@intel.com>.
3445 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3447         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3448         in $(gnulib).  Also, remove stale comment.
3450 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3452         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3453         advantage of new syscall stub and optimize accordingly.
3455         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3456         from SYS_futex, to match expectations of
3457         sysdep.h:DO_INLINE_SYSCALL.
3458         (lll_futex_clobbers): Remove.
3459         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3460         (lll_futex_wake): Likewise.
3461         (lll_futex_requeue): Likewise.
3462         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3463         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3464         Jelinek).
3465         (__lll_mutex_lock): Likewise.
3466         (__lll_mutex_cond_lock): Likewise.
3467         (__lll_mutex_timed_lock): Likewise.
3468         (__lll_mutex_unlock): Likewise.
3469         (__lll_mutex_unlock_force): Likewise.
3471         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3472         comes before the include of <sysdep.h>.
3473         (THREAD_SELF_SYSINFO): New macro.
3474         (THREAD_SYSINFO): Likewise.
3475         (INIT_SYSINFO): New macro.
3476         (TLS_INIT_TP): Call INIT_SYSINFO.
3478         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3480         * sysdeps/pthread/createthread.c (create_thread): Use
3481         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3482         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3483         THREAD_SELF_SYSINFO instead of open code.
3484         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3485         (THREAD_SYSINFO): Likewise.
3487         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3489         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3491 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3493         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3494         instead of .init.  Patch by David Mosberger.
3496 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3498         * sysdeps/pthread/configure.in: Remove broken declaration in C
3499         cleanup handling check.
3501 2003-11-30  Andreas Jaeger  <aj@suse.de>
3503         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3504         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3505         Likewise.
3507 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3509         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3510         * pthread_attr_destroy.c: Include shlib-compat.h.
3511         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3512         is set in iattr->flags.
3513         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3515 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3517         * Makefile (distribute): Add tst-cleanup4aux.c.
3519         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3520         include.
3522 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3524         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3525         pthread_cond_signal.
3527         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3528         store mutex address if the current value is ~0l.
3529         * sysdeps/pthread/pthread_cond_timedwait.c
3530         (__pthread_cond_timedwait): Likewise.
3531         * sysdeps/pthread/pthread_cond_broadcast.c
3532         (__pthread_cond_broadcast): Don't use requeue for pshared
3533         condvars.
3535         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3536         (__pthread_cond_wait): Don't store mutex address if the current
3537         value is ~0l.
3538         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3539         (__pthread_cond_timedwait): Likewise.
3540         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3541         (__pthread_cond_broadcast): Don't use requeue for pshared
3542         condvars.
3544         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3545         element with ~0l for pshared condvars, with NULL otherwise.
3547         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3548         (__pthread_cond_wait): Don't store mutex address if the current
3549         value is ~0l.
3550         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3551         (__pthread_cond_timedwait): Likewise.
3552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3553         (__pthread_cond_broadcast): Don't use requeue for pshared
3554         condvars.
3556         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3557         * tst-cond12.c: New file.
3558         * tst-cond13.c: New file.
3560 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3562         * sysdeps/pthread/configure.in: Make missing forced unwind support
3563         fatal.
3565 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3567         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3569 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3571         * Makefile: Add magic to clean up correctly.
3573 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3575         * unwind.c (FRAME_LEFT): Define.
3576         (unwind_stop): Handle old style cleanups here.
3577         (__pthread_unwind): Handle old style cleanups only if
3578         !HAVE_FORCED_UNWIND.
3579         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3580         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3581         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3582         ($(objpfx)tst-cleanupx4): Likewise.
3583         * tst-cleanup4.c: New test.
3584         * tst-cleanup4aux.c: New.
3585         * tst-cleanupx4.c: New test.
3587 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3589         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3590         lll_mutex_*lock macros to skip atomic operations on some archs.
3592 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3594         * sysdeps/pthread/tst-timer.c (main): Initialize
3595         sigev2.sigev_value as well.
3597 2003-10-15  Roland McGrath  <roland@redhat.com>
3599         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3600         is missing.
3601         * sysdeps/pthread/configure: Regenerated.
3603 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3605         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3606         locking macros.  No distinction between normal and mutex locking
3607         anymore.
3608         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3609         Merge bits from lowlevelmutex.S we still need.
3610         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3611         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3612         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3613         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3614         new mutex implementation.
3615         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3616         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3617         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3618         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3619         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3620         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3621         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3622         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3623         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3624         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3625         symbol for entry point to avoid cancellation.
3627 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3629         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3630         changes.
3631         (SAVE_OLDTYPE_0): Fix a typo.
3633 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3635         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3636         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3638 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3640         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3641         correct offset.
3643 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3645         * Makefile (tests): Add tst-cancel19.
3646         * tst-cancel19.c: New test.
3648 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3650         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3651         restoring of the old cancellation type.
3653 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3655         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3657 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3659         * sysdeps/pthread/malloc-machine.h: New file
3661 2003-09-24  Roland McGrath  <roland@redhat.com>
3663         * allocatestack.c (__make_stacks_executable): Don't ignore return
3664         value from _dl_make_stack_executable.
3666 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3668         * allocatestack.c (__make_stacks_executable): Also change
3669         permission of the currently unused stacks.
3671         * allocatestack.c (change_stack_perm): Split out from
3672         __make_stacks_executable.
3673         (allocate_stack): If the required permission changed between the time
3674         we started preparing the stack and queueing it, change the permission.
3675         (__make_stacks_executable): Call change_stack_perm.
3677         * Makefile: Build tst-execstack-mod locally.
3678         * tst-execstack-mod.c: New file.
3680 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3682         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3684 2003-09-23  Roland McGrath  <roland@redhat.com>
3686         * tst-execstack.c: New file.
3687         * Makefile (tests): Add it.
3688         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3689         (LDFLAGS-tst-execstack): New variable.
3691         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3692         whether to use PROT_EXEC for stack mmap.
3693         (__make_stacks_executable): New function.
3694         * pthreadP.h: Declare it.
3695         * init.c (__pthread_initialize_minimal_internal): Set
3696         GL(dl_make_stack_executable_hook) to that.
3698 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3701         recommendation from AMD re avoidance of lock prefix.
3703 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3705         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3706         lll_futex_timed_wait instead of lll_futex_wait.
3707         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3708         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3709         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3710         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3711         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3712         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3713         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3714         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3715         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3716         Completely revamp the locking macros.  No distinction between
3717         normal and mutex locking anymore.
3718         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3719         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3720         __lll_lock_timedwait): Fix prototypes.
3721         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3722         __lll_lock_timedwait): Likewise.
3723         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3724         macros, add __builtin_expect.
3725         (lll_mutex_timedlock): Likewise.  Fix return value.
3726         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3727         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3728         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3729         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3730         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3731         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3732         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3733         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3735 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3737         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3738         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3739         operation if possible.
3741         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3742         like jumping over the lock prefix.
3744 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3746         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3747         locking macros.  No distinction between normal and mutex locking
3748         anymore.
3749         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3750         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3751         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3752         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3753         locking.  Merge bits from lowlevelmutex.S we still need.
3754         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3755         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3756         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3757         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3758         * Makefile (routines): Remove libc-lowlevelmutex.
3759         (libpthread-rountines): Remove lowlevelmutex.
3760         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3761         for new mutex implementation.
3762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3767         Likewise.
3768         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3769         Likewise.
3770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3771         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3772         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3773         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3774         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3775         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3776         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3777         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3778         Likewise.
3779         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3780         Likewise.
3781         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3782         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3784         Don't use requeue.
3785         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3786         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3788 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3790         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3791         in parameters of asm with output parameters.
3793         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3794         type of DECR parameter to int.
3795         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3797 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3799         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3800         guardsize for each thread.
3802 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3804         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3805         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3806         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3808         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3809         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3810         NULL.
3811         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3812         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3813         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3814         (pthread_getaffinity_np): Add hidden_def.
3816         * Makefile (tests): Add tst-attr3.
3817         * tst-attr3.c: New test.
3819         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3821 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3823         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3824         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3826 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3828         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3829         * tst-align.c: Include tst-stack-align.h.
3830         (tf, do_test): Use TEST_STACK_ALIGN macro.
3832 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3834         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3835         variable.
3837 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3839         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3840         stack-related values for the initial thread.
3842 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3844         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3846 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3848         * pthread_mutex_lock.c: Minor code rearrangements.
3850 2003-09-05  Roland McGrath  <roland@redhat.com>
3852         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3853         Instead, include ../nptl_db/db_info.c to do its magic.
3854         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3855         (__pthread_pthread_key_2ndlevel_size): Likewise.
3856         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3857         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3858         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3859         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3860         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3861         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3862         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3863         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3864         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3865         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3866         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3867         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3868         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3869         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3870         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3871         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3872         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3874 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3876         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3877         of pthread_t to be compatible with LT.
3878         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3879         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3880         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3881         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3882         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3883         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3884         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3886 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3888         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3890 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3892         * unwind-forcedunwind.c: Move to...
3893         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3894         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3895         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3896         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3897         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3898         * unwind.c: Include jmpbuf-unwind.h.
3899         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3901 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3903         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3904         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3905         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3906         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3907         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3908         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3909         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3910         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3911         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3912         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3913         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3914         function.
3915         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3916         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3917         * Makefile (tests): Add tst-stack2.
3918         * tst-stack2.c: New test.
3919         * tst-stack1.c: Include limits.h and sys/param.h.
3920         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3922         * pthread_condattr_setpshared.c: Include errno.h.
3923         (pthread_condattr_setpshared): Return EINVAL if pshared
3924         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3926         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3927         defined symbol for entry point to avoid cancellation.
3928         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3929         Likewise.
3930         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3931         Likewise.
3932         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3933         Likewise.
3934         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3935         Likewise.
3936         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3937         Likewise.
3938         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3939         __close_nocancel, __read_nocancel, __write_nocancel,
3940         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3941         libpthread.so or librt.so, define to corresponding function
3942         without _nocancel suffix.
3943         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3944         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3945         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3947         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3949 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3951         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3952         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3954         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3955         in subsections has a symbol associated with it.
3957         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3958         defined symbol for entry point to avoid cancellation.
3959         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3961 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3963         * Makefile (tests): Add tst-tls5.
3964         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3965         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3966         ($(objpfx)tst-tls5): New.
3967         ($(objpfx)tst-tls6.out): Likewise.
3968         (tests): Depend on $(objpfx)tst-tls6.out.
3969         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3970         (do_test): Check pthread_self () return value alignment.
3971         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3972         (tf): Check pthread_self () return value alignment.
3973         * tst-tls5.c: New test.
3974         * tst-tls5.h: New.
3975         * tst-tls5mod.c: New.
3976         * tst-tls5moda.c: New.
3977         * tst-tls5modb.c: New.
3978         * tst-tls5modc.c: New.
3979         * tst-tls5modd.c: New.
3980         * tst-tls5mode.c: New.
3981         * tst-tls5modf.c: New.
3982         * tst-tls6.sh: New test.
3984         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3985         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3986         * init.c (pthread_functions): Initialize them.
3987         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3988         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3989         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3990         pthread_cond_timedwait@@GLIBC_2.3.2.
3992 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3994         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3995         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3996         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3997         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3998         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3999         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
4001         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
4003         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
4004         _POSIX_THREAD_PRIORITY_SCHEDULING.
4005         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4007 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
4009         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
4010         nested function, use static inline function from libio.h.
4011         Code by Richard Henderson.
4013         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
4014         weak.
4016 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
4018         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
4019         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
4020         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
4021         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
4022         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
4023         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
4024         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
4025         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
4026         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
4027         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
4028         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
4029         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
4030         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
4031         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
4032         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
4033         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
4034         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
4035         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
4036         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
4037         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
4038         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
4039         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
4040         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
4041         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
4042         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
4043         * sysdeps/sparc/tls.h: New file.
4044         * sysdeps/sparc/tcb-offsets.sym: New file.
4045         * sysdeps/sparc/Makefile: New file.
4046         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
4047         * init.c [__sparc__] (__NR_set_tid_address): Define.
4049 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
4051         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
4052         _IO_release_lock): Define.
4054 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
4056         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
4057         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
4059 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
4061         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
4062         (__pthread_cleanup_class): Add missing return types of member
4063         functions.
4065 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
4067         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4068         (lll_mutex_unlock_force): Add memory barrier between store and futex
4069         syscall.
4071 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
4073         * tst-cancel4.c (do_test): Also unlink tempfname and remove
4074         tempmsg in first loop.
4076 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
4078         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4079         _POSIX_THREAD_PRIORITY_SCHEDULING.
4080         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4082 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4084         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
4085         (__rtld_lock_default_lock_recursive,
4086         __rtld_lock_default_unlock_recursive): Define.
4087         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
4088         __rtld_lock_unlock_recursive): Define using
4089         GL(_dl_rtld_*lock_recursive).
4090         * init.c (__pthread_initialize_minimal_internal): Initialize
4091         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
4092         Lock GL(_dl_load_lock) the same number of times as
4093         GL(_dl_load_lock) using non-mt implementation was nested.
4095         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
4096         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
4098 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
4100         * tst-cancel17.c (do_test): Make len2 maximum of page size and
4101         PIPE_BUF.
4103 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4105         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
4107 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
4109         * sysdeps/pthread/createthread.c (do_clone): Move error handling
4110         to first syscall error check.  Move syscall error check for tkill
4111         into __ASSUME_CLONE_STOPPED #ifdef.
4113 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
4115         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
4116         is not defined, do explicit synchronization.
4117         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
4118         is not defined also unlock pd->lock for non-debugging case in case
4119         it is necessary.
4120         * pthread_create.c (start_thread): Always get and release pd->lock
4121         if __ASSUME_CLONE_STOPPED is not defined.
4122         (start_thread_debug): Removed.  Adjust users.
4123         * allocatestack.c (allocate_stack): Always initialize lock if
4124         __ASSUME_CLONE_STOPPED is not defined.
4125         * Makefile (tests): Add tst-sched1.
4126         * tst-sched1.c: New file.
4128         * sysdeps/pthread/createthread.c (do_clone): Only use
4129         sched_setschduler and pass correct parameters.
4131 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4133         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
4134         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
4135         PTHREAD_STACK_MIN in comments.
4137 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4139         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4140         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
4141         argument.
4142         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
4143         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
4144         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
4145         (__pthread_cleanup_upto): Fix prototype.
4146         (_longjmp_unwind): Adjust caller.
4147         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
4148         Change second argument to const struct pointer.
4149         * tst-sem8.c (main): Remove unused s2 and s3 variables.
4150         * tst-sem9.c (main): Likewise.
4151         * unwind.c: Include string.h for strlen prototype.
4153 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
4155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4156         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
4157         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
4158         Define HAVE_CMOV.
4159         Patch by Nicholas Miell <nmiell@attbi.com>.
4161 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
4163         * init.c (__pthread_initialize_minimal_internal): Initialize
4164         GL(dl_init_static_tls).
4165         * pthreadP.h (__pthread_init_static_tls): New prototype.
4166         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
4167         New functions.
4168         * Makefile (tests): Add tst-tls4.
4169         (modules-names): Add tst-tls4moda and tst-tls4modb.
4170         ($(objpfx)tst-tls4): Link against libdl and libpthread.
4171         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
4172         tst-tls4modb.so.
4173         * tst-tls4.c: New file.
4174         * tst-tls4moda.c: New file.
4175         * tst-tls4modb.c: New file.
4177 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
4179         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
4180         before __timer_dealloc.
4181         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
4182         Don't call list_unlink.
4184 2003-07-29  Roland McGrath  <roland@redhat.com>
4186         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
4188 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
4190         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
4191         if __need_struct_pthread_size, instead define lll_lock_t.
4193 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
4195         * tst-cancel17.c (do_test): Check if aio_cancel failed.
4196         Don't reuse struct aiocb A if it failed.
4197         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
4198         not just one byte, as that does not block.
4200 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
4202         * sysdeps/pthread/unwind-resume.c: New file.
4203         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
4204         unwind-resume in csu subdir.
4205         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
4206         exceptions.
4207         (librt-sysdep_routines, librt-shared-only-routines): Add
4208         rt-unwind-resume.
4209         * sysdeps/pthread/rt-unwind-resume.c: New file.
4210         * unwind-forcedunwind.c: New file.
4211         * Makefile (libpthread-routines): Add unwind-forcedunwind.
4212         (libpthread-shared-only-routines): Likewise.
4213         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
4214         * pthreadP.h (pthread_cancel_init): New prototype.
4215         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
4217         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
4218         attr argument const struct pthread_attr *.
4220         * res.c (__res_state): Return __resp.
4221         * descr.h: Include resolv.h.
4222         (struct pthread): Add res field.
4223         * pthread_create.c: Include resolv.h.
4224         (start_thread): Initialize __resp.
4225         * Makefile (tests): Add tst-_res1.
4226         (module-names): Add tst-_res1mod1, tst-_res1mod2.
4227         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
4228         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
4229         libpthread.
4230         * tst-_res1.c: New file.
4231         * tst-_res1mod1.c: New file.
4232         * tst-_res1mod2.c: New file.
4234 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
4236         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4238         * Makefile: Define various *-no-z-defs variables for test DSOs
4239         which has undefined symbols.
4241 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
4243         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4244         Retry if the stwcx fails to store once_control.
4246 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
4248         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4249         pthread_attr_setaffinity.
4250         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4251         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4252         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4253         * pthread_attr_destroy.c: Free cpuset element if allocated.
4254         * pthread_create.c: Pass iattr as additional parameter to
4255         create_thread.
4256         * sysdeps/pthread/createthread.c: If attribute is provided and
4257         a new thread is created with affinity set or scheduling parameters,
4258         start thread with CLONE_STOPPED.
4259         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4260         pthread_attr_setaffinity.
4261         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4262         cpuset element.
4264 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
4266         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4268 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
4270         * sysdeps/pthread/configure.in: Require CFI directives also for
4271         ppc and s390.
4273 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
4275         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4276         Add cfi directives.
4278 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4280         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4281         CLEANUP_JMP_BUF.
4282         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4283         registers as variables.  Call __pthread_mutex_unlock_usercnt.
4284         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4285         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4286         not self pointer in __writer.  Compare with TID to determine
4287         deadlocks.
4288         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4289         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4290         Likewise.
4291         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4292         Likewise.
4293         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4294         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4295         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4296         macros also when compiling librt.
4298 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
4300         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4301         -fasynchronous-unwind-tables.
4302         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4303         (PSEUDO): Add cfi directives.
4304         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4305         Likewise.
4306         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4307         Likewise.
4309 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
4311         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4312         __pthread_unregister_cancel): Add prototypes and hidden_proto.
4313         * unwind.c (__pthread_unwind_next): Add hidden_def.
4314         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4315         Likewise.
4316         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4317         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4318         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4319         Likewise.
4320         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4321         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4322         Likewise.
4323         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4324         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4325         __pthread_unregister_cancel and __pthread_unwind_next.
4327 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
4329         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4330         different symbol for the cancellation syscall wrapper and
4331         non-cancellation syscall wrapper.
4332         (PSEUDO_END): Define.
4334 2003-07-05  Richard Henderson  <rth@redhat.com>
4336         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4337         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4338         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4339         return actual return value from the syscall, not 0.
4341 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
4343         * descr.h (struct pthread): Add pid field.
4344         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4345         (__reclaim_stacks): Likewise.
4346         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4347         also check for PID of the signal source.
4348         (__pthread_initialize_minimal_internal): Also initialize pid field
4349         of initial thread's descriptor.
4350         * pthread_cancel.c: Use tgkill instead of tkill if possible.
4351         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4352         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4353         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4354         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4356 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
4358         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4359         Fix use of parameter.
4360         (__libc_cleanup_pop): Likewise.
4362 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
4364         * init.c (sigcancel_handler): Change parameters to match handler
4365         for SA_SIGACTION.  Check signal number and code to recognize
4366         invalid invocations.
4368 2003-07-03  Roland McGrath  <roland@redhat.com>
4370         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4371         Apply sizeof (struct pthread) bias to r13 value.
4373 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
4375         * sysdeps/pthread/configure.in: Require CFI directives.
4377         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4378         definition.
4379         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4380         libpthread compilation.
4381         * unwind.c (__pthread_unwind): Add hidden_def.
4382         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4384 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4386         * libc-cancellation.c (__libc_cleanup_routine): Define.
4387         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4388         (__pthread_cleanup_pop): Define.
4390 2003-07-01  Richard Henderson  <rth@redhat.com>
4392         * sysdeps/alpha/elf/pt-initfini.c: New file.
4393         * sysdeps/alpha/pthread_spin_lock.S: New file.
4394         * sysdeps/alpha/pthread_spin_trylock.S: New file.
4395         * sysdeps/alpha/pthreaddef.h: New file.
4396         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4397         * sysdeps/alpha/tls.h: New file.
4398         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4399         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4400         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4401         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4402         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4403         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4404         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4405         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4406         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4407         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4409 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4411         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4412         cleanup support and unwind info.
4414 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
4416         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4417         Use correct cleanup handler registration.  Add unwind info.
4418         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4419         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4420         * tst-once3.c: Add cleanup handler and check it is called.
4421         * tst-once4.c: Likewise.
4422         * tst-oncex3.c: New file.
4423         * tst-oncex4.c: New file.
4424         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4426 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
4428         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4430 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
4432         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4433         (tf_msgsnd): Likewise.
4435         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4436         premature returns a bit more.
4438 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
4440         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4441         definition to the front.
4443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4444         the cleanup functions to make the names unique.  Fix dwarf opcode
4445         un unwind table.
4446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4447         functions to make the names unique.  Fix CFA offset for two blocks.
4449 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
4451         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4452         missing closing braces.
4453         Patch by Christophe Saout <christophe@saout.de>.
4455 2003-06-24  Roland McGrath  <roland@redhat.com>
4457         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4459 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
4461         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4462         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4464         * pthreadP.h: Declare __find_thread_by_id.
4465         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4466         * pthread_clock_gettime.c: Allow using other thread's clock.
4467         * pthread_clock_settime.c: Likewise.
4468         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4469         * Makefile: Add rules to build and run tst-clock2.
4470         * tst-clock2.c: New file.
4472 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
4474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4475         to use exception-based cleanup handler.
4476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4478         * tst-cond8.c (ch): Announce that we are done.
4480         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4482         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4483         Also test aio_suspend with timeout value.
4485 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
4487         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4488         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4489         attribute_hidden.
4491         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4492         (__pthread_mutex_lock_internal): Likewise.
4493         (__pthread_mutex_unlock_internal): Likewise.
4494         (__pthread_mutex_unlock_usercnt): Declare.
4495         * pthread_mutex_destroy.c: Always fail if used in any way.
4496         * pthread_mutex_init.c: Update comment.
4497         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4498         * pthread_mutex_timedlock.c: Adjust __nusers.
4499         * pthread_mutex_trylock.c: Adjust __nusers.
4500         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4501         and public interfaces are wrapper with pass additional parameter.
4502         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4503         parameter zero.
4504         * tst-mutex8.c: New file.
4505         * Makefile (tests): Add tst-mutex8.
4506         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4507         __pthread_mutex_unlock_usercnt.
4508         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4511         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4512         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4513         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4514         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4515         Add __nusers.
4516         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4517         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4518         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4519         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4520         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4522         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4523         * pthread_mutex_timedlock.c: Likewise.
4524         * pthread_mutex_trylock.c: Adjust __nusers.
4525         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4526         * tst-mutex9.c: New file.
4527         * Makefile (tests): Add tst-mutex9.
4528         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4529         * sysdeps/ia64/tls.h: Likewise.
4530         * sysdeps/powerpc/tls.h: Likewise.
4531         * sysdeps/s390/tls.h: Likewise.
4532         * sysdeps/sh/tls.h: Likewise.
4533         * sysdeps/x86_64/tls.h: Likewise.
4534         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4535         Change type of __owner.
4536         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4537         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4538         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4539         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4540         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4542 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4544         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4545         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4547         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4548         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4549         instead of nr to lll_futex_wake.  Only set errno and return -1
4550         if err < 0.
4552         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4553         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4554         return actual return value from the syscall, not 0.
4556 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4558         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4559         find a random value.
4560         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4561         errno==EIDRM.
4563         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4564         compat_timer_settime.
4565         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4566         compat_timer_gettime.
4567         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4568         compat_timer_getoverrun.
4569         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4570         compat_timer_delete.
4572         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4573         error-checking mutex detect busy mutexes.
4575 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4578         Add ax to clobber list.
4579         (lll_mutex_cond_lock): Likewise.
4580         (lll_mutex_unlock): Likewise.
4581         (lll_lock): Likewise.
4582         (lll_unlock): Likewise.
4584         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4585         * tst-cancel18.c: New file.
4586         * tst-cancelx18.c: New file.
4588         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4589         and tcdrain.
4591         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4592         * tst-cancel17.c: New file.
4593         * tst-cancelx17.c: New file.
4595         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4596         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4597         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4599         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4601 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4603         * sysdeps/pthread/createthread.c (create_thread): Set
4604         header.multiple_threads unconditionally.
4605         * allocatestack.c (allocate_stack): Likewise.
4606         * descr.h (struct pthread): Add header.multiple_threads
4607         unconditionally.
4608         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4609         Define for librt.  #error if neither libpthread, libc nor librt.
4610         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4611         Likewise.
4612         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4613         CDISABLE): Likewise.
4614         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4615         CDISABLE): Likewise.
4616         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4617         CDISABLE): Likewise.
4618         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4619         CDISABLE): Likewise.  Access header.multiple_threads outside of
4620         libc and libpthread.
4621         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4622         Likewise.
4623         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4624         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4626 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4628         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4629         Also test early cancellation before the thread reaches the cancellation
4630         point.
4632         * Makefile: Compile forward.c with exceptions.
4634         * sysdeps/unix/sysv/linux/sleep.c: New file.
4636 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4638         * Makefile: Add CFLAGS definition to compile function wrappers
4639         duplicated from libc with exceptions.
4640         * tst-cancel4.c: Also check cancellation handlers.
4642         * Makefile: Add rules to build and run tst-cancel16 and
4643         tst-cancelx16.  Add missing CFLAGS definitions.
4644         * tst-cancel16.c: New file.
4645         * tst-cancelx16.c: New file.
4647 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4649         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4650         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4651         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4652         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4654         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4655         (LIBC_CANCEL_RESET): Likewise.
4656         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4657         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4658         librt-cancellation.
4659         (CFLAGS-libcrt-cancellation.c): Define.
4660         * sysdeps/pthread/librt-cancellation.c: New file.
4661         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4662         macros also when compiling librt.
4663         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4664         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4665         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4666         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4667         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4668         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4669         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4671         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4672         compat_timer_create.
4674 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4676         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4678         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4679         __register_atfork.
4680         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4681         Add libc_hidden_def.
4683 2003-06-13  Roland McGrath  <roland@redhat.com>
4685         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4686         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4688 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4690         * allocatestack.c (queue_stack): Always inline.
4691         * ptreadhP.h (__do_cancel): Likewise.
4693 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4695         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4696         a typo.
4698 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4701         (__pthread_cond_signal): Remove incorrect second addition for
4702         cond_lock!=0.
4704 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4706         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4707         (__pthread_cond_signal): Use correct futex pointer in
4708         __lll_mutex_lock_wait call.
4710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4711         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4713 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4715         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4716         cancelable.
4717         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4718         Likewise.
4720         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4721         hand-written CFI generation code.  Since ENTRY/END also initiated
4722         CFI frames this caused two CFI sets to be generated.
4724 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4726         * cleanup_routine.c: New file.
4727         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4728         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4729         cleanup handling.
4730         * Makefile (libpthread-routines): Add cleanup_routine.
4731         Add more CFLAGS variables to compile with exceptions.  Add comments
4732         why which file needs unwind tables.
4733         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4734         tests.
4735         * tst-cancelx1.c: New file.
4736         * tst-cancelx2.c: New file.
4737         * tst-cancelx3.c: New file.
4738         * tst-cancelx4.c: New file.
4739         * tst-cancelx5.c: New file.
4740         * tst-cancelx6.c: New file.
4741         * tst-cancelx7.c: New file.
4742         * tst-cancelx8.c: New file.
4743         * tst-cancelx9.c: New file.
4744         * tst-cancelx10.c: New file.
4745         * tst-cancelx11.c: New file.
4746         * tst-cancelx12.c: New file.
4747         * tst-cancelx13.c: New file.
4748         * tst-cancelx14.c: New file.
4749         * tst-cancelx15.c: New file.
4750         * tst-cleanupx0.c: New file.
4751         * tst-cleanupx0.expect: New file.
4752         * tst-cleanupx1.c: New file.
4753         * tst-cleanupx2.c: New file.
4754         * tst-cleanupx3.c: New file.
4756         * tst-cleanup0.c: Make standard compliant.
4757         * tst-cleanup1.c: Likewise.
4759         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4760         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4761         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4762         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4763         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4764         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4765         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4766         CLEANUP_JMP_BUF.
4767         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4768         * tst-cancel12.c: New file.
4769         * tst-cancel13.c: New file.
4770         * tst-cancel14.c: New file.
4771         * tst-cancel15.c: New file.
4772         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4773         and tst-cancel15.
4775         * tst-cancel1.c: Add some comments.
4777         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4778         timeout correctly.
4780 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4782         * Makefile (CFLAGS-pthread_cancel.c): Define.
4784 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4786         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4787         Change type of __writer element to int.
4788         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4789         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4790         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4791         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4792         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4793         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4794         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4795         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4796         Compare with TID to determine deadlocks.
4797         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4798         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4799         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4800         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4801         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4802         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4803         Likewise.
4804         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4805         Likewise.
4806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4807         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4809         Likewise.
4810         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4811         Likewise.
4812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4813         * Makefile (tests): Add tst-rwlock12.
4814         * tst-rwlock12.c: New file.
4816 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4818         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4819         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4820         Remove bogus hidden_proto.
4821         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4822         Likewise.
4823         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4824         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4825         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4826         ___lll_mutex_timedlock): Likewise.
4828 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4831         (__pthread_cond_signal): Add some code to eventually handle
4832         cond_lock!=0.
4834 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4836         * Makefile (tests): Add tst-exec4.
4837         (tst-exec4-ARGS): Define.
4838         * tst-exec4.c: New file.
4840 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4842         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4843         Also fail if tv_nsec < 0.
4844         (__lll_timedwait_tid): Likewise.
4845         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4846         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4847         Likewise.
4848         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4849         Likewise.
4850         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4851         Likewise.
4852         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4853         Likewise.
4854         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4855         Likewise.
4856         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4857         Likewise.
4859         * Makefile (tests): Add tst-sem8 and tst-sem9.
4860         * tst-sem8.c: New file.
4861         * tst-sem9.c: New file.
4862         * sem_open.c: Fix creation of in_use record if the file exists but
4863         no internal record.
4865         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4866         definitions.
4868         * sysdeps/pthread/timer_create.c (timer_create): In case
4869         evp==NULL, assign timer ID to sival_ptr.
4871         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4872         struct pthread_unwind_buf *.
4873         (struct pthread): Likewise for cleanup_jmp_buf element.
4875         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4876         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4877         * unwind.c (__pthread_unwind_next): Likewise.
4879 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4881         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4882         (lll_futex_timed_wait): Use int for futex value parameter.
4883         (lll_futex_wake): Likewise.
4884         (lll_futex_requeue): Likewise.
4886         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4887         Replace one memory operation with one register operation.
4889         * tst-join4.c (do_test): Fix error message.
4891         * tst-rwlock6.c (do_test): Use correct format specifier.
4893         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4894         (__lll_mutex_lock_wait): Replace one memory operation with one
4895         register operation.
4896         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4897         (__lll_mutex_lock_wait): Likewise.
4899         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4900         (__lll_mutex_cond_lock): Add one to value parameter of
4901         __lll_lock_wait to reflect reality in the futex syscall.
4902         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4903         (lll_mutex_cond_lock): Likewise.
4905 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4907         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4908         New function.
4909         (lll_mutex_cond_lock): Define.
4911 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4913         * Makefile (tests): Add tst-signal6.
4914         * tst-signal6.c: New file.
4916         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4917         (__lll_mutex_unlock_force): New function
4918         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4920         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4921         (__lll_mutex_unlock_force): New function.
4922         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4924         * tst-rwlock7.c (do_test): Use correct format specifier.
4926         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4927         Find break parameter in correct asm argument.
4929 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4931         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4932         Remove out4.
4933         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4934         error occured.
4935         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4936         Add __mutex.
4937         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4938         lll_futex_requeue, lll_mutex_unlock_force): Define.
4940 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4942         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4943         (pthread_cond_t): Add __mutex.
4944         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4945         lll_futex_requeue, lll_mutex_unlock_force): Define.
4947 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4949         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4950         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4951         Add __mutex field.
4952         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4953         Define.
4954         (lll_futex_wait, lll_futex_wake): Define.
4955         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4956         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4957         FUTEX_REQUEUE instead of FUTEX_WAIT.
4958         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4959         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4960         mutex which was used in condvar structure.  Call
4961         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4962         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4964         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4965         include tcb-offsets.h.  Read wakeup value in locked region.
4966         Use the value of gbr register as THREAD_ID.
4967         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4968         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4969         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4971         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4972         macros.
4974 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4976         * sysdeps/pthread/pthread_cond_broadcast.c
4977         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4979 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4982         typo in register name.
4983         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4984         correctly.  Actually use requeue.  Little optimization.
4985         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4986         mutex address early.  Handle cancellation state as 32-bit value.
4987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4988         Remove unnecessary label.
4990 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4992         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4993         instead of FUTEX_WAIT.
4994         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4999         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
5000         used in condvar structure.  Call __pthread_mutex_cond_lock instead
5001         of __pthread_mutex_lock_internal.
5002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5004         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5005         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
5006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5008         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
5009         Add pthread_mutex_cond_lock.
5010         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
5011         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
5012         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
5013         lll_mutex_cond_lock.
5014         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5015         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5016         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5017         Add __mutex field.
5018         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5019         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5021         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
5022         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5024         * pthreadP.h: Declare __pthread_mutex_cond_lock.
5025         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
5026         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
5027         macro don't define aliases.
5029         * cancellation.c: Remove __pthread_enable_asynccancel_2.
5030         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
5031         * sysdeps/pthread/pthread_cond_timedwait.c: Use
5032         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
5033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5035         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5036         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5037         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5039 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
5041         * sem_open.c: Fix one endless loop.  Implement correct semantics
5042         wrt opening the same semaphore more then once.
5043         * sem_close.c: Adjust for sem_open change.
5044         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
5045         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
5046         * Makefile (tests): Add tst-sem7.
5047         * tst-sem7.c: New file.
5049 2003-05-16  Roland McGrath  <roland@redhat.com>
5051         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
5052         uninitialized variable braino.
5054 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
5056         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
5057         test for syscall availability.
5059         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
5060         __no_posix_timers to -1 if the syscalls don't exist.
5062         * pthread_join.c (pthread_join): Set tid field of the joined
5063         thread to -1.  This isn't necessary but helps to recognize some
5064         error conditions with almost no cost.
5066         * allocatestack.c (FREE_P): Also negative values indicate an
5067         unused stack.
5069         * unwind.c: Include <unistd.h>.
5071 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
5073         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
5075 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
5077         * Makefile (crti-objs, crtn-objs): New variables.
5078         (omit-deps, extra-objs): Add crtn.
5079         ($(objpfx)libpthread.so): Depend on both crti and crtn
5080         and links to them in multidir.
5081         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
5083 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
5085         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5086         (lll_mutex_unlock): Use atomic_exchange_rel.
5088 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
5090         * cond-perf.c (cons): Add missing locking around setting of alldone.
5092 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
5094         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
5095         related macros.
5096         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5098 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
5100         * tst-sem6.c: New file.
5101         * Makefile (tests): Add tst-sem6.
5103         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
5104         Use atomic_exchange_rel instead of atomic_exchange.
5105         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
5106         Likewise.
5108         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
5109         code for lll_futex_wait and lll_futex_wake in static apps.  Use
5110         vsyscall is possible.
5112         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
5113         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
5114         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
5115         pthread_setaffinity_np.
5116         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
5117         and pthread_setaffinity_np.
5118         * Makefile (libpthread-routines): Add pthread_getaffinity and
5119         pthread_setaffinity.
5121         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
5122         use it in case mmap to allocate the stack fails.
5123         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
5124         ARCH_MAP_FLAGS here.
5125         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
5126         ARCH_RETRY_MMAP.
5128 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
5130         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
5131         handler implementation.  It is now lockless in fork().
5132         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5133         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5134         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
5135         declare the __fork_*_lists.
5136         (struct fork_handler): Include pointers to all three functions.
5137         Add next, refcntr and need_signal elements.
5138         (__fork_handlers): New declaration.
5139         (__register_atfork_malloc): Remove declaration.
5140         (HAVE_register_atfork_malloc): Remove definition.
5141         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
5142         __pthread_child_handler variable.
5143         (__libc_pthread_init): Use __register_atfork instead of explicitly
5144         adding to the list.
5145         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
5146         and lll_futex_wake.
5147         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5149         * unwind.c (unwind_cleanup): Print error message and then abort.  This
5150         function must never be reached.
5152         * cond-perf.c: New file.
5154 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
5156         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
5158 2003-05-04  Roland McGrath  <roland@redhat.com>
5160         * Makefile ($(objpfx)../libc.so): New target.
5162 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
5164         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5165         (pthread_condattr_t): Size is only an int, don't use long for
5166         alignment.
5167         (pthread_mutexattr_t): Likewise.
5168         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5169         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5170         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5172 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
5174         * sysdeps/i386/tls.h: Define THREAD_ID.
5175         * sysdeps/ia64/tls.h: Likewise.
5176         * sysdeps/powerpc/tls.h: Likewise.
5177         * sysdeps/s390/tls.h: Likewise.
5178         * sysdeps/sh/tls.h: Likewise.
5179         * sysdeps/x86_64/tls.h: Likewise.
5180         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
5181         record ownership.
5182         * pthread_mutex_timedlock.c: Likewise.
5183         * pthread_mutex_trylock.c: Likewise.
5184         * pthread_mutex_unlock.c: Likewise.
5185         * pthread_rwlock_trywrlock.c: Likewise.
5186         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
5187         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5188         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5189         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5191         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
5192         flag.
5194 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
5196         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5197         (__SIZEOF_PTHREAD_COND_T): Define to 48.
5198         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
5199         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5200         Make __align long long instead of long.
5201         (pthread_rwlock_t): Formatting.
5202         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5203         (pthread_rwlock_t): Formatting.
5204         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5205         (pthread_cond_t): Make __align long long instead of long.
5206         (pthread_rwlock_t): Move __flags field to the same position as in
5207         linuxthreads.
5209 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
5211         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
5212         * tst-rwlock7.c (do_test): Likewise.
5214 2003-04-26  Roland McGrath  <roland@redhat.com>
5216         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
5218 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
5220         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
5221         sizeof (struct pthread).
5222         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
5223         1 struct pthread.
5224         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
5225         to 0.
5226         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
5227         struct pthread.
5228         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
5229         to 32-bit bytes.
5230         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
5231         tcbp.
5232         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
5233         unneccessarily.
5234         (NO_TLS_OFFSET): Define.
5235         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5236         add TLS_TCB_SIZE unnecessarily.
5238 2003-04-22  Roland McGrath  <roland@redhat.com>
5240         * Makeconfig (shared-thread-library): Reverse link order to work
5241         around linker bug.
5243 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
5245         * semaphore.h: Fix typo in comment.
5247 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
5249         * sysdeps/pthread/sigfillset.c: New file.
5251         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5252         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5253         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5254         * sysdeps/pthread/sigaction.c: Likewise.
5255         * sysdeps/pthread/sigprocmask.c: New file.
5256         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5257         __SIGRTMIN+1.
5258         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5259         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
5260         in this case.
5262 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
5264         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5265         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5267         * sysdeps/unix/sysv/linux/unregister-atfork.c
5268         (__unregister_atfork): Don't free memory not allocated dynamically.
5270         * semaphore.h: Remove __THROW marker from cancellation points.
5271         * nptl/sysdeps/pthread/pthread.h: Likewise.
5273 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
5275         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5276         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5277         __THROW.
5279 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
5281         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5283 2003-04-15  Roland McGrath  <roland@redhat.com>
5285         * forward.c (__pthread_unwind): Tweak to avoid warning.
5287 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
5289         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5291 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
5293         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5294         overflow CFA advance instructions.
5295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5297 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
5299         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5300         * sysdeps/i386/pthread_spin_lock.c: Likewise.
5301         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
5302         defined.
5304         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5305         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5307         DW_CFA_advance_loc for .Laddl-.Lsubl.
5309 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
5311         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5312         position-independent unwind data for static libraries.
5313         Add missing unwind info.  Add comments.
5315         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5316         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5320 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
5322         * Makefile: Make sure all cancellation points are compiled with
5323         exception and asynchronous unwind tables.
5325         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5326         which mishandles loading of global object addresses in PIC.
5327         (THREAD_SETMEM_NC): Likewise.
5329 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5331         * pthread.h: Define new data structure for cleanup buffer.  Declare
5332         new cleanup handler interfaces.
5333         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
5334         (struct pthread): Add cleanup_jmp_buf pointer.  Define
5335         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5336         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
5337         it.  Declare old cleanup handler installation functions.
5338         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
5339         handling.
5340         * cleanup_defer.c: Likewise.
5341         * cleanup_compat.c: New file.  Old cleanup code.
5342         * cleanup_def_compat.c: New file.  Old cleanup code.
5343         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5344         if own thread descriptor.
5345         * unwind.c: New file.
5346         * forward.c: Add __pthread_unwind.
5347         * init.c (pthread_functions): Add __pthread_unwind.
5348         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5349         Add ptr___pthread_unwind.
5350         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5351         and unwind function.
5352         * Makefile (libpthread-routines): Add cleanup_compat,
5353         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
5354         table generation if necessary.
5355         * version.c: Record whether unwind support is compiled in.
5356         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5357         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5358         handler interfaces.
5359         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5360         complication to generate unwind information for syscall wrappers.
5361         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5362         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5363         __cleanup_fct_attribute.
5365         * Makefile: Add rules to build and run tst-cleanup0.
5366         * tst-cleanup0.c: New file.
5367         * tst-cleanup0.expect: New file.
5369         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
5370         caller.  Optimize to avoid often unecessary local variable.
5372 2003-04-11  Roland McGrath  <roland@redhat.com>
5374         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5375         sets variable `multidir'; include that.
5376         (generated): Add it.
5377         ($(objpfx)$(multidir)/crti.o): New target.
5378         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5380 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5382         * tst-attr2.c (do_test): Add cast to avoid warning.
5383         * tst-mutex4.c (do_test): Likewise.
5385 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
5387         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5388         in child.
5390 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
5392         * Makefile (tests): Add tst-detach1.
5393         * tst-detach1.c: New file.
5395 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
5397         * sysdeps/pthread/pthread.h: Remove duplicate
5398         pthread_cleanup_{push,pop} definitions.
5400         * tst-barrier2.c: Eliminate warnings.
5401         * tst-cancel4.c: Likewise.
5402         * tst-cond4.c: Likewise.
5403         * tst-cond6.c: Likewise.
5404         * tst-detach1.c: Likewise.
5405         * tst-rwlock4.c: Likewise.
5406         * tst-rwlock6.c: Likewise.
5407         * tst-rwlock7.c: Likewise.
5408         * tst-sem3.c: Likewise.
5409         * tst-spin2.c: Likewise.
5410         * tst-umask1.c: Likewise.
5412 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
5414         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5416 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
5418         * descr.h (struct pthread): Move cancelhandling member to the front.
5420 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
5422         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5423         malloc_parent, and malloc_child statically.
5424         (__register_atfork_malloc): New function.
5425         (free_mem): Don't free any of the malloc_* variables on the list.
5426         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5427         Define HAVE_register_atfork_malloc.
5429 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
5431         * sysdeps/pthread/createthread.c (create_thread): Add some more
5432         comments explaining when to set multiple_threads and when not.
5434         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5435         THREAD_ATOMIC_BIT_SET if not already defined.
5436         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5437         THREAD_ATOMIC_BIT_SET:
5438         * sysdeps/x86_64/tls.h: Likewise.
5439         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5440         THREAD_ATOMIC_CMPXCHG_VAL.
5441         (_pthread_cleanup_pop_restore): Likewise.
5442         * cancellation.c (__pthread_enable_asynccancel): Likewise.
5443         (__pthread_enable_asynccancel_2): Likewise.
5444         (__pthread_disable_asynccancel): Likewise.
5445         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5446         (__libc_disable_asynccancel): Likewise.
5447         * init.c (sigcancel_handler): Likewise.
5448         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5449         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5451 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
5453         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5454         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5455         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5456         * Makefile (tests): Add tst-cancel11.
5457         * tst-cancel11.c: New file.
5459 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
5461         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5462         round, not the first.  Use specific_used flag instead of local
5463         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
5464         (__free_tcb): Don't call deallocate_tsd here.
5465         (start_thread): Call deallocate_tsd here.
5466         * pthread_setspecific.c: Set specific_used flag really only when
5467         needed.
5468         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5469         * tst-tsd3.c: New file.
5470         * tst-tsd4.c: New file.
5472 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5474         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5475         Use atomic_exchange_and_add instead of __lll_add.
5476         (__lll_mutex_timedlock): Likewise.
5477         Patch by Ian Wienand.
5479 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
5481         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5482         (SINGLE_THREAD_P): Fix typo.
5483         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5485 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5487         * Makefile (tests): Add tst-align.
5488         * tst-align.c: New file.
5489         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5491         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5492         function correctly.
5494         * tst-tsd2.c: Add casts to avoid warnings.
5496 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
5498         * descr.h (struct pthread): Move most often used elements to the front.
5500 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
5502         * Makefile (libpthread-routines): Add pthread_atfork.
5503         (libpthread-static-only-routines): Add pthread_atfork.
5505 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5507         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5508         of TLS_DTV_AT_TP.
5509         (INSTALL_DTV): Add parens.
5510         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5511         Use passed descr instead of THREAD_SELF.
5512         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5513         (__lll_mutex_timedlock_wait): Correct expected value after
5514         spurious wakeup.
5515         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5516         Release lock before waking up the waiters.
5517         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5518         criteria.  Reorderstruct passed to cleanup handler.  Fix
5519         handling of cancellation and failung pthread_mutex_unlock call.
5520         Use __pthread_enable_asynccancel_2 instead of
5521         __pthread_enable_asynccancel.
5522         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5523         Return result of lock re-get if it fails.
5524         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5525         for __pthread_cleanup_push.
5526         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5527         completely broken rwlock implementation.
5528         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5529         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5530         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5531         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5532         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5533         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5534         versioned_symbol macro.
5535         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5536         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5538 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5540         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5541         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5542         and __helper_tid.
5543         (struct timer): Remove th and bar field.
5544         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5545         debugging code.  Create only one helper thread.
5546         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5547         helper thread.
5548         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5549         Renamed.  Define statically.  Use thread info from siginfo.
5550         (__helper_once): New variable.
5551         (__helper_tid): New variable.
5552         (__reset_helper_control): New function.
5553         (__start_helper_thread): New function.
5555         * pthread_create.c (start_thread): Don't use setjmp inside
5556         __builtin_expect to work around gcc bug.
5558         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5559         timer_delete syscall fails, but not with ENOSYS, set
5560         __no_posix_timers.
5562         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5563         (timer_settime): Fix typo.
5564         * sysdeps/unix/sysv/linux/timer_getoverr.c
5565         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5567 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5570         offset of cleanupbuf.__prev.
5572 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5574         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5575         of included file.
5577 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5579         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5580         NULL provide default definition to syscall.
5582 2003-03-25  Roland McGrath  <roland@redhat.com>
5584         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5585         (timer_id2ptr): Fix typo.
5587 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5589         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5590         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5591         * sysdeps/ia64/pthreaddef.h: Likewise.
5592         * sysdeps/powerpc/pthreaddef.h: Likewise.
5593         * sysdeps/s390/pthreaddef.h: Likewise.
5594         * sysdeps/sh/pthreaddef.h: Likewise.
5595         * sysdeps/x86_64/pthreaddef.h: Likewise.
5596         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5597         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5598         being changed.
5599         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5600         SIGTIMER is not unblocked.
5601         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5602         RT signal taken.
5603         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5604         be send.
5605         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5606         pass pointer through as ID.
5607         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5608         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5609         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5610         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5611         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5612         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5613         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5614         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5615         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5616         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5617         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5618         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5619         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5620         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5621         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5622         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5623         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5624         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5625         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5626         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5627         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5628         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5629         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5630         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5631         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5632         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5633         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5634         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5635         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5636         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5637         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5638         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5639         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5641         * pthreadP.h: Remove FRAME_LEFT definition.
5642         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5643         already left frame.  Programs which have this problem are not POSIX
5644         compliant.
5645         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5647 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5649         * sysdeps/pthread/tst-timer.c: Check return values of the
5650         functions we test.
5652 2003-03-23  Roland McGrath  <roland@redhat.com>
5654         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5655         * tst-tls3mod.c: Likewise.
5656         * tst-tls1.c: Likewise.
5657         * tst-tls2.c: Likewise.
5659         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5660         undefined behavior.
5662         * tst-join5.c (tf1, tf2): Add a cast.
5664         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5666         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5667         Don't test anything.
5668         * tst-cond4.c: Likewise.
5669         * tst-cond6.c: Likewise.
5670         * tst-flock2.c: Likewise.
5671         * tst-mutex4.c: Likewise.
5672         * tst-rwlock4.c: Likewise.
5673         * tst-signal1.c: Likewise.
5674         * tst-spin2.c: Likewise.
5675         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5677         * tst-mutex4.c: Use test-skeleton.c.
5678         * tst-spin2.c: Likewise.
5679         * tst-sysconf.c: Likewise.
5680         * tst-barrier2.c: Likewise.
5681         * tst-cond4.c: Likewise.
5682         * tst-cond6.c: Likewise.
5683         * tst-rwlock4.c: Likewise.
5684         * tst-unload.c: Likewise.
5685         * tst-flock2.c (do_test): Use return instead of exit.
5687 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5689         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5691 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5693         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5694         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5695         instead of __lll_compare_and_swap.
5696         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5697         Likewise.
5698         Removed definition if __lll_compare_and_swap.
5700         * cancellation.c: Adjust for new form of compare&exchange macros.
5701         * cleanup_defer.c: Likewise.
5702         * init.c: Likewise.
5703         * libc-cancellation.c: Likewise.
5704         * old_pthread_cond_broadcast.c: Likewise.
5705         * old_pthread_cond_signal.c: Likewise.
5706         * old_pthread_cond_timedwait.c: Likewise.
5707         * old_pthread_cond_wait.c: Likewise.
5708         * pthread_cancel.c: Likewise.
5709         * pthread_create.c: Likewise.
5710         * pthread_detach.c: Likewise.
5711         * pthread_join.c: Likewise.
5712         * pthread_key_delete.c: Likewise.
5713         * pthread_setcancelstate.c: Likewise.
5714         * pthread_setcanceltype.c: Likewise.
5715         * pthread_timedjoin.c: Likewise.
5716         * pthread_tryjoin.c: Likewise.
5717         * sysdeps/pthread/createthread.c: Likewise.
5719 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5721         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5722         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5723         definitions.  Replace uses with calls to atomic_* functions.
5724         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5725         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5726         __lll_test_and_set calls with atomic_exchange_and_add and
5727         atomic_exchange calls respectively.
5728         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5729         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5730         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5731         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5732         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5733         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5734         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5736         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5737         returns the old value.
5739 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5741         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5742         int for variable OLDVAL and correct inline assembler contraint.
5743         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5744         type int for variable OLD.
5746         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5747         only for s390-32.
5748         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5749         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5750         instead of multiple_threads field in the TCB.
5752 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5754         * sysdeps/i386/i686/bits/atomic.h: Removed.
5755         * sysdeps/i386/i586/bits/atomic.h: Removed.
5756         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5757         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5758         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5759         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5760         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5761         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5762         * atomic.h: Removed.  Moved to glibc.
5764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5765         support for clock selection.
5767         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5768         signalling waiters.
5770 2003-03-18  Roland McGrath  <roland@redhat.com>
5772         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5773         Add __lll_rel_instr first.  Add memory clobber.
5774         (lll_mutex_unlock): Use __lll_test_and_set.
5775         From Paul Mackerras <paulus@samba.org>.
5777         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5778         unconditionally.
5779         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5780         (SINGLE_THREAD_P):  Add `header.' prefix.
5781         From Paul Mackerras <paulus@samba.org>.
5783         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5784         pthread_timedjoin_np to ...
5785         (libpthread: GLIBC_2.3.3): ... here.
5786         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5788         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5789         Avoid shadowing VAL variable.
5791         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5792         New macro.
5794 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5796         * Makefile (tests): Add tst-cond11.
5797         * tst-cond11.c: New file.
5799         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5800         struct passed to cleanup handler to eliminate one more
5801         instruction.
5802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5804         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5805         (pthrad_cond_t): Replace __unused field with __clock.
5807         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5808         waken all waiters in cleanup handler.
5809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5810         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5812         * pthread_condattr_getclock.c: New file.
5813         * pthread_condattr_setclock.c: New file.
5814         * sysdeps/pthread/pthread.h: Declare these new functions.
5815         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5816         * Makefile (libpthread-routines): Add the new functions.
5817         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5818         Renamed field to value.  Document use of the bits.
5819         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5820         change.
5821         * pthread_condattr_setpshared.c: Likewise.
5822         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5823         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5824         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5825         Add __clock field.
5826         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5827         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5828         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5829         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5831         Implement clock selection.
5832         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5833         * pthread-errnos.sym: Add ENOSYS.
5834         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5835         _POSIX_CLOCK_SELECTION.
5836         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5838         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5839         invalid .size directive.
5841 2003-03-17  Roland McGrath  <roland@redhat.com>
5843         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5844         Formatting tweaks.
5846 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5848         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5849         Use __lll_add instead of spelling it out.  Use protected symbol names.
5850         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5851         Use __lll_add.
5852         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5853         Renamed from lll_compare_and_swap.  Use new name where necessary.
5854         (__lll_add): Defined.
5855         (__lll_dec_if_positive): Defined.
5856         (__lll_test_and_set): Defined.
5857         * sysdeps/ia64/pthread_spin_init.c: Removed.
5858         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5859         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5860         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5861         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5862         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5863         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5864         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5865         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5866         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5867         __sync_lock_release_si.
5868         Patch by Jakub Jelinek.
5870         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5871         Fix timeout handling.
5872         (__lll_timedwait_tid): Likewise.
5873         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5874         Patch by Jakub Jelinek.
5876         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5878 2003-03-17  Roland McGrath  <roland@redhat.com>
5880         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5881         * sysdeps/pthread/pthread_spin_init.c: New file.
5882         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5883         * sysdeps/powerpc/Makefile: New file.
5884         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5885         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5886         * sysdeps/powerpc/pthreaddef.h: New file.
5887         * sysdeps/powerpc/tcb-offsets.sym: New file.
5888         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5889         * sysdeps/powerpc/tls.h: New file.
5890         * sysdeps/powerpc/bits/atomic.h: New file.
5891         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5892         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5893         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5895         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5896         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5897         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5898         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5899         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5900         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5901         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5902         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5903         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5904         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5905         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5906         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5907         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5908         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5909         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5911         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5912         not gettimeofday.
5913         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5914         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5915         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5916         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5917         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5919 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5921         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5922         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5924         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5925         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5927 2003-03-16  Roland McGrath  <roland@redhat.com>
5929         * tst-fork4.c: Include <string.h>.
5930         * tst-signal2.c: Likewise.
5931         * tst-mutex5.c (do_test): exit -> return.
5932         * tst-mutex2.c: Include <stdlib.h>.
5934 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5936         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5937         (__lll_mutex_timedlock_wait): Correct expected value after
5938         spurious wakeup.  Otherwise we would never wait again.
5940         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5941         zone versus inline asm stupidity.  Use correct instructions.
5943         * tst-rwlock6.c: Add some more status output.
5945 2003-03-15  Roland McGrath  <roland@redhat.com>
5947         * sysdeps/pthread/configure.in: New file.
5948         * sysdeps/pthread/configure: New file (generated).
5950 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5952         * allocatestack.c (allocate_stack): Store the exact stack size of
5953         user allocated stacks.
5955 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5957         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5958         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5959         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5960         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5961         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5962         Use `header.' prefix.
5963         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5965 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5967         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5968         __builtin_frame_address, use stack pointer.
5970         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5971         instead of __builtin_frame_pointer.
5973 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5975         * tst-basic1.c (do_test): Add cast to avoid warning.
5976         * tst-basic2.c (do_test): Likewise.
5978         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5979         amount of stack correction.
5981         * tst-fork4.c: Use test-skeleton.c.
5983 2003-03-14  Roland McGrath  <roland@redhat.com>
5985         * init.c: Fix typo "#eli" for "#else".
5987 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5989         * allocatestack.c (__stack_user): Use hidden_data_def.
5990         * pthread_create.c (__pthread_keys): Likewise.
5992         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5994 2003-03-14  Roland McGrath  <roland@redhat.com>
5996         * tst-fork4.c: New file.
5997         * Makefile (tests): Add it.
5999         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
6000         we always define the padding space.
6001         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
6002         stopped supporting its own extensions fully.
6003         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
6004         struct also called `header', so `header.multiple_threads' is the field
6005         name to use on all machines.
6006         * allocatestack.c (allocate_stack): Use `header.' prefix.
6007         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6008         * pthread_create.c (__pthread_create_2_1): Likewise.
6009         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
6010         (THREAD_SELF): Likewise.
6011         * sysdeps/x86_64/tls.h: Likewise.
6012         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6013         (SINGLE_THREAD_P): Likewise.
6014         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6015         (SINGLE_THREAD_P): Likewise.
6016         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
6017         (SINGLE_THREAD_P): Likewise.
6019         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
6020         value directly.
6022 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
6024         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
6025         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
6027         * pthread_create.c (start_thread): setjmp is expected to return 0.
6029         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
6030         (THREAD_GETMEM_NC): Likewise.
6032 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
6034         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
6035         and the size of the stack which must be allocated is a multiple,
6036         allocate one more page.
6037         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
6038         MULTI_PAGE_ALIASING.
6040 2003-03-13  Roland McGrath  <roland@redhat.com>
6042         * pthread_create.c (start_thread): Set EXITING_BIT after the
6043         event-reporting (and destructors), not before.
6045 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
6047         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
6048         lll_futex_wake): Declare register variables as long int instead of
6049         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
6050         Make syscall arguments clobbered by the syscall.
6051         (lll_futex_wait): Define using lll_futex_timed_wait.
6053         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
6054         to void *.
6056         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
6057         PPID if [! NDEBUG].
6059         * allocatestack.c (nptl_ncreated): Only declare if
6060         COLORING_INCREMENT != 0.
6062         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
6063         (__libc_enable_asynccancel_2): Remove prototype.
6065         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
6066         ctid to match kernel.
6068 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6070         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
6071         libc_multiple_threads.
6072         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
6073         __libc_multiple_threads to...
6074         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
6076         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
6077         versioning.
6078         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6079         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6081         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
6082         (__pthread_once_internal): Define.
6084         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
6085         macros instead of .symver directly.
6086         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6087         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6089         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
6090         * sysdeps/x86_64/tcb-offsets.sym: New file.
6091         * sysdeps/x86_64/Makefile: New file.
6093         * sysdeps/i386/tcb-offsets.sym: Add SELF.
6094         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
6095         to access own pthread_t in TCB.
6096         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6097         Likewise.
6098         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6099         Likewise.
6100         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6102 2003-03-12  Roland McGrath  <roland@redhat.com>
6104         * pthread-errnos.sym: New file.
6105         * Makefile (gen-as-const-headers): New variable, list that file.
6106         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
6107         header <pthread-errnos.h> instead of defining errno values here.
6108         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6109         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6110         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6112         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6113         Likewise.
6114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6115         Likewise.
6116         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6118         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6119         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6120         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6121         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6122         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6123         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6125         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6126         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6127         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
6128         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6129         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
6130         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6131         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6132         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6133         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6134         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6135         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6136         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6137         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6138         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
6139         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
6140         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
6141         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6144         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
6145         CLONE_CHILD_SETTID worked.
6147 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6149         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
6150         file.
6151         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
6152         file.
6154         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6155         (pthread_cond_t): Add padding.
6157         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
6158         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
6159         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
6161         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
6162         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
6163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
6164         (__pthread_rwlock_timedrdlock): Likewise.
6165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
6166         (__pthread_rwlock_wrlock): Likewise.
6167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
6168         (__pthread_rwlock_rdlock): Likewise.
6170         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
6172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
6173         result of lock re-get if it fails.
6175 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6177         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
6178         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6179         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6181         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6182         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6183         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6184         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6185         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6186         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6188         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
6189         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
6191         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
6192         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
6193         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
6194         (create_thread): Likewise.
6195         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
6196         * init.c (__pthread_initialize_minimal_internal): Initialize
6197         __libc_multiple_threads_ptr if necessary.
6198         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
6199         __pthread_multiple_threads and __libc_multiple_threads_ptr.
6200         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
6201         __libc_multiple_threads.
6202         (__libc_pthread_init): Return pointer to __libc_pthread_init if
6203         necessary.
6205         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
6206         (THREAD_SETMEM_NC): Likewise.
6208         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
6209         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
6210         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
6211         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
6213         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
6214         Eliminate one entire instruction.
6216         * cancellation.c (__pthread_enable_asynccancel_2): New function.
6217         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
6218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6219         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
6220         instead of __pthread_enable_asynccancel.
6221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6222         (__pthread_cond_wait): Likewise.
6223         * sysdeps/pthread/pthread_cond_timedwait.c
6224         (__pthread_cond_timedwait): Likewise.
6225         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6228         (__condvar_cleanup): Wake up all waiters in case we got signaled
6229         after being woken up but before disabling asynchronous
6230         cancellation.
6231         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6233         (__condvar_cleanup): Likewise.
6235         * init.c (__NR_set_tid_address): If already defined, don't redefine.
6236         Make it an error if architecture has no #if case.  Add x86-64.
6238         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6239         pt-initfini.s generation.
6241         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6242         (TLS_INIT_TP): Fix typo.
6244 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6246         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6247         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6249         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6250         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6251         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6252         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6253         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6254         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6255         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6256         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6258 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/pthread/pthread_cond_timedwait.c
6261         (__pthread_cond_timedwait): Return the result of the final
6262         locking.  If it succeeds, the regular function return value.
6264         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6265         Return result of the final locking.
6266         * version.c (__nptl_main): Work around problems with the strange
6267         INTERNAL_SYSCALL macro on ppc32.
6268         * init.c (__pthread_initialize_minimal_internal): Unblock
6269         SIGCANCEL in case the parent blocked it.
6270         Reported by Paul Mackerras <paulus@samba.org>.
6272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6274         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6276 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6278         * sysdeps/pthread/pthread_cond_timedwait.c
6279         (__pthread_cond_timedwait): Unlock and fail if
6280         __pthread_mutex_unlock_internal failed.
6282         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6283         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6284         Use ARCH_CLONE.
6285         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6286         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6287         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6288         ALLOCATE_STACK): New macros.
6289         (TLS_TPADJ): New macro.
6290         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6291         (allocate_stack): Handle TLS_DTV_AT_TP and
6292         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
6293         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6294         Don't set PD->self.
6295         * init.c [__ia64__] (__NR_set_tid_address): Define.
6297         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6298         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6299         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6300         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6301         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6302         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6303         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6304         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6305         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6306         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6307         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6308         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6309         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6310         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6311         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6312         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6313         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6314         * sysdeps/ia64/bits/atomic.h: New file.
6315         * sysdeps/ia64/Makefile: New file.
6316         * sysdeps/ia64/pthread_spin_init.c: New file.
6317         * sysdeps/ia64/pthread_spin_lock.c: New file.
6318         * sysdeps/ia64/pthread_spin_trylock.c: New file.
6319         * sysdeps/ia64/pthread_spin_unlock.c: New file.
6320         * sysdeps/ia64/pthreaddef.h: New file.
6321         * sysdeps/ia64/tcb-offsets.sym: New file.
6322         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6323         * sysdeps/ia64/tls.h: New file.
6325         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6326         to syscall instead of no arguments.
6328 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
6330         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6331         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6332         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6333         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6335         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6336         unused code.
6338         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6340         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6341         lowlevelbarrier.sym.
6342         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6343         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6344         Include lowlevelbarrier.h and don't define offsets locally.
6345         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6347         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6348         (__lll_mutex_lock_wait): Reverse order of first two parameters.
6349         (__lll_mutex_timedlock_wait): Likewise.
6350         (lll_mutex_lock): Adjust asm for that.
6351         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
6352         (lll_lock): Adjust asm for operand order change.
6353         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6354         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6356         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6357         Reverse order of parameters.
6358         (__lll_timedwait_tid): Remove regparms attribute.
6359         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6360         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6362         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6363         (__lll_timedwait_tid): Remove one unnecessary instruction.
6365         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6366         __lll_mutex_timedlock_wait only for NOT_IN_libc.
6367         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6368         lowlevelmutex.S.
6370         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6371         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6372         for NOT_IN_libc.
6373         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6374         lowlevellock.S.
6376         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6377         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
6378         for libc.so.
6379         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6380         define LOCK here (if UP is not defined).  The actual code is in
6381         lowlevelmutex.S.
6383         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6384         LOCK is already defined.  Don't define lll_unlock_wake_cb and
6385         __lll_timedwait_tid for libc.so.
6386         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6387         define LOCK here (if UP is not defined).  The actual code is in
6388         lowlevellock.S.
6390         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6391         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6392         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6393         instead of lowlevelsem.h.
6394         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6395         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6396         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6398         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6399         lowlevelrwlock.sym.
6400         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6401         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6402         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6404         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6405         register loading.
6406         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6407         last changed.  D'oh.
6409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6412         of __libc_locking_needed.
6413         (lll_trylock): Initialize %eax to zero.
6415         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6416         pthread_cond_t definition.
6418 2003-03-10  Roland McGrath  <roland@redhat.com>
6420         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6421         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6422         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6423         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6424         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6426         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6427         Instead of setting PD->multiple_threads, set globals
6428         __pthread_multiple_threads and __libc_multiple_threads.
6429         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6430         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6431         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6433         * descr.h (struct pthread): Conditionalize first member on
6434         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
6435         containing an anonymous tcbhead_t.  Move `list' member out.
6436         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6437         * allocatestack.c: Remove use of `header.data.' prefix.
6438         * pthread_create.c: Likewise.
6439         * init.c (__pthread_initialize_minimal_internal): Likewise.
6440         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6441         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6442         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6443         * sysdeps/x86_64/tls.h: Likewise.
6444         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6445         (SINGLE_THREAD_P): Likewise.
6446         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6447         (SINGLE_THREAD_P): Likewise.
6448         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6449         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6451 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
6453         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6455         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6456         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6458         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6459         leftovers from the ia32 code.
6461         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6462         memory load.
6463         (clear_once_control): Don't load %esi.
6465         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6466         handling.
6468         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6470         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6471         * sysdeps/unix/sysv/linux/createthread.c: ...here.
6473         * Makefile (tests): Add tst-cond10.
6474         * tst-cond10.c: New file.
6476 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
6478         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6479         * tst-signal3.c (do_test): Likewise.
6480         * tst-sem5.c (do_test): Likewise.
6481         * tst-kill6.c (do_test): Likewise.
6482         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
6484         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6485         of inc/dec.
6486         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6487         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6488         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6489         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6491         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6493         Likewise.
6494         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6495         Likewise.
6496         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6497         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6498         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6501         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6502         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6503         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6505         * allocatestack.c (allocate_stack): If mprotect() fails free the
6506         TLS memory.
6508 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6510         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6512         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6513         lll_wake_tid.  This was used only to work around kernel limits in
6514         the early days.
6515         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6516         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6517         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6518         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6520         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6521         (__pthread_initialize_minimal_internal): Change initialization of
6522         __static_tls_align_m1 appropriately.
6523         * pthreadP.h (__static_tls_align_m1): Renamed from
6524         __static_tls_align.
6525         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6526         instead of __static_tls_align-1.
6528 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6530         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6532         * pthread_create.c: Define __pthread_keys using nocommon
6533         attribute, not by placing it explicitly in bss.
6534         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6536         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6537         Use it in mmap call to allocate stacks.
6539         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6541         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6542         result of the thread function.
6544 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6546         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6547         version is just fine.
6549         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6550         (__pthread_child_handler): Renamed from pthread_child_handler,
6551         exported, and marked hidden.  Change all users.
6552         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6553         free __pthread_child_handler from child list.
6555 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6557         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6559         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6560         Fix handling of cancellation and failing pthread_mutex_unlock call.
6561         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6562         (__pthread_cond_wait): Likewise.
6564         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6565         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6566         lll_futex_timed_wait call.
6567         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6568         (pthread_rwlock_timedwrlock): Likewise.
6570         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6571         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6572         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6574         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6575         check of lll_futex_wake return value.
6577 2003-03-03  Roland McGrath  <roland@redhat.com>
6579         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6581         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6582         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6583         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6585 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6587         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6588         error for CPU clocks.
6590         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6591         _POSIX_MONOTONIC_CLOCK.
6592         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6594         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6595         recent kernels.
6597 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6599         * descr.h (struct pthread): Move cleanup field to the front.
6601 2003-03-01  Roland McGrath  <roland@redhat.com>
6603         * sem_open.c (sem_open): Braino fix.
6605 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6607         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6609         __pthread_cleanup_pop functionality.
6610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6612         * descr.h (struct pthread): Move tid field to the front now that
6613         it is often used.
6615         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6616         (__lll_mutex_timedlock_wait): Remove.
6617         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6618         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6619         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6620         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6621         (lll_unlock_wake_cb): Don't save and restore %esi.
6622         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6623         %esi.
6624         (__lll_timedwait_tid): Add alignment.
6625         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6626         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6627         %esi.
6628         (__lll_timedwait_tid): Removed.
6629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6630         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6631         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6632         (pthread_barrier_wait): Don't save, load, and restore %esi for
6633         last thread.
6634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6635         (__pthread_cond_signal): Don't save, load, and restore %esi.
6636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6637         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6638         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6639         Don't save, load, and restore %esi.
6641 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6643         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6644         Release lock before waking up the waiters.
6646         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6648         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6649         (reader_thread): Likewise.
6651         * sysdeps/pthread/pthread_rwlock_unlock.c
6652         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6653         to wake up readers if there are none.
6655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6656         Release internal lock before wake threads.
6658 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6660         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6661         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6662         predefined.
6663         * tst-rwlock9.c: Likewise.
6664         * tst-rwlock10.c: New file.
6665         * tst-rwlock11.c: New file.
6667         * Makefile (tests): Add tst-dlsym1.
6668         * tst-dlsym1.c: New file.
6670         * init.c (__pthread_initialize_minimal_internal): Set
6671         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6672         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6674 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6676         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6678         * tst-cond2.c: Fix sychronization with child.
6680         * tst-rwlock8.c (reader_thread): Remove unused variable.
6682         * Makefile: Add rules to build and run tst-tls3.
6683         * tst-tls3.c: New file.
6684         * tst-tls3mod.c: New file.
6686         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6687         * tst-rwlock8.c: New file.
6688         * tst-rwlock9.c: New file.
6689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6690         complete broken rwlock implementation.
6691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6692         Likewise.
6693         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6694         Likewise.
6695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6696         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6697         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6698         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6699         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6700         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6701         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6703 2003-02-23  Roland McGrath  <roland@redhat.com>
6705         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6707 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6709         * Makefile (tests): Add tst-context1.
6710         * tst-context1.c: New file.
6712         * Makefile (tests): Add tst-tls1 and tst-tls2.
6713         * tst-tls1.c: New file.
6714         * tst-tls2.c: New file.
6716         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6717         for failed cmpxchg.
6719         * pthread_create.c (start_thread): Set EXITING_BIT early.
6721         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6722         (THREAD_GETMEM_NC): Likewise.
6724 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6726         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6727         off 3 more bytes by using offset-less instructions when possible.
6729         * Makefile: Add dependency for $(objpfx)version.d.
6731         * eintr.c (eintr_source): Add unnecessary return but the compiler
6732         insists.
6734         * tst-kill3.c: Include <unistd.h>.
6736 2003-02-21  Roland McGrath  <roland@redhat.com>
6738         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6740 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6742         * Makefile (tests): Add tst-eintr1.
6743         (distribute): Add eintr.c.
6744         * tst-eintr1.c: New file.
6745         * eintr.c: New file.
6747         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6749         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6750         Disallow sending SIGCANCEL.
6752         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6753         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6754         * tst-kill1.c: New file.
6755         * tst-kill2.c: New file.
6756         * tst-kill3.c: New file.
6757         * tst-kill5.c: New file.
6758         * tst-kill6.c: New file.
6759         * tst-basic7.c: Renamed to...
6760         * tst-kill4.c: ...this.
6762 2003-02-21  Roland McGrath  <roland@redhat.com>
6764         * Makefile (install-lib-ldscripts): New variable.
6766 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6768         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6769         * pthread_cancel.c: Use INVALID_TD_P.
6770         * pthread_detach.c: Likewise.
6771         * pthread_getschedparam.c: Likewise.
6772         * pthread_setschedparam.c: Likewise.
6773         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6774         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6775         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6776         * pthread_timedjoin.c: Likewise.
6778         * tst-basic7.c: Include <signal.h>.
6780         * pthread_join.c (pthread_join): Limited checking for invalid
6781         descriptors.
6782         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6784 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6786         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6787         beginning of the loop.  Clear the entire first block of TSD.
6788         * Makefile (tests): Add tst-key4.
6789         * tst-key4.c: New file.
6791 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6793         * Makefile (tests): Add tst-basic7.
6794         * tst-basic7.c: New file.
6796         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6797         Add some more __builtin_expect.
6799         * pthreadP.h: Define dummy version of DEBUGGING_P.
6801 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6803         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6804         _POSIX_THREAD_PRIORITY_SCHEDULING.
6805         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6806         _XOPEN_REALTIME_THREADS.
6807         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6809         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6810         kernel returns EINVAL for PID <= 0, work around it.
6812         * Makefile (tests): Add tst-signal5.
6813         * tst-signal5.c: New file.
6815         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6816         and LOGIN_NAME_MAX.
6818         * tst-cancel1.c (tf): Block all signals.
6820         * Makefile (tests): Add tst-basic6.
6821         * tst-basic6.c: New file.
6823         * tst-basic1.c: Add test for process ID.
6825         * Makefile (tests): Add tst-cancel10.
6826         * tst-cancel10.c: New file.
6828         * Makefile (tests): Add tst-signal4.
6829         * tst-signal4.c: New file.
6831         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6832         __sigismember instead of sigismember.  Add __builtin_expect.
6834 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6836         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6837         pthread_setcancelstate, and pthread_rwlock_setpshared.
6839         * tst-cancel7.c (do_test): Make sure the pid file exists before
6840         canceling the thread.
6842         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6843         pthread_rwlock_timedrdlock tests.
6844         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6845         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6846         Check for invalid tv_nsec field.
6847         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6848         Likewise.
6850         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6851         recursive mutex of overflow.
6853         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6855         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6856         going into an endless loop.
6857         * Makefile (tests): Add tst-cancel9.
6858         * tst-cancel9.c: New file.
6860         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6862 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6864         * tst-mutex5.c (do_test): Add more timedlock tests.
6866         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6867         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6869         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6870         use INLINE_SYSCALL.  Error number is returned, not -1.
6872         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6873         and __deallocate_stack with internal_function.
6874         * pthread_create.c: Adjust definitions appropriately.
6875         * allocatestack.c: Likewise.
6877         * pthread_join.c: Add one more __builtin_expect.
6878         * pthread_timedjoin.c: Likewise.
6880         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6881         not data of sequence number does not match.
6882         Add one __builtin_expect.
6884         * Makefile (tests): Add tst-clock1.
6885         * tst-clock1.c: New file.
6887         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6888         negative arguments.
6889         * Makefile (tests): Add tst-basic5.
6890         * tst-basic5.c: New file.
6892 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6894         * Makefile (tests): Add tst-basic4.
6895         * tst-basic4.c: New file.
6897         * pthreadP.h: Add declaraction for __nptl_nthreads.
6898         * pthread_create.c: Define __nptl_nthreads
6899         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6900         after thread is done.  If then zero, call exit(0).
6901         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6902         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6903         * init.c (pthread_functions): Initialize ptr_nthreads.
6904         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6905         (__reclaim_stacks): Decrement __nptl_nthreads.
6906         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6907         Define.
6908         * Makefile (tests): Add tst-basic3.
6909         * tst-basic3.c: New file.
6911         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6912         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6913         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6914         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6915         if asynchronous canceling is enabled.
6916         * pthread_join.c (pthread_join): When recognizing circular joins,
6917         take into account the other thread might be already canceled.
6918         * Makefile (tests): Add tst-join5.
6919         * tst-join5.c: New file.
6921         * Makefile (tests): Add tst-join4.
6922         * tst-join4.c: New file.
6924 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6926         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6928 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6930         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6931         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6932         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6933         warning.
6934         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6935         to avoid warning.
6936         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6937         error if lll_futex_wake failed.
6939 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6942         handling of cancellation and failung pthread_mutex_unlock call.
6943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6944         * Makefile (tests): Add tst-cond8 and tst-cond9.
6945         * tst-cond8.c: New file.
6946         * tst-cond9.c: New file.
6948         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6950         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6951         non-standard initializers with __USE_GNU.
6953         * Makefile (tests): Add tst-cleanup3.
6954         * tst-cleanup3.c: New file.
6956 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6958         * Makefile (tests): Add tst-attr1 and tst-attr2.
6959         * tst-attr1.c: New file.
6960         * tst-attr2.c: New file.
6962         * Makefile: Add rules to build and run tst-atfork2 test.
6963         * tst-atfork2.c: New file.
6964         * tst-atfork2mod.c: New file.
6966         * sysdeps/unix/sysv/linux/unregister-atfork.c
6967         (__unregister_atfork): Free the memory allocated for the handlers
6968         after removing them from the lists.
6970         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6971         cleanup function.
6973         * tst-atfork1.c (do_test): Wait for the child we forked.
6974         Report error in child.
6976         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6978         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6980 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6982         * Makefile (tests): Add tst-cancel8.
6983         * tst-cancel8.c: New file.
6985         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6986         clearing of control variable.
6987         * Makefile (tests): Add tst-once3 and tst-once4.
6988         * tst-once3.c: New file.
6989         * tst-once4.c: New file.
6991 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6993         * sysdeps/sh/Makefile: New file.
6994         * sysdeps/sh/bits/atomic.h: New file.
6995         * sysdeps/sh/pthread_spin_init.c: New file.
6996         * sysdeps/sh/pthread_spin_lock.c: New file.
6997         * sysdeps/sh/pthread_spin_trylock.S: New file.
6998         * sysdeps/sh/pthread_spin_unlock.S: New file.
6999         * sysdeps/sh/pthreaddef.h: New file.
7000         * sysdeps/sh/tcb-offsets.sym: New file.
7001         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
7002         * sysdeps/sh/tls.h: New file.
7003         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
7004         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
7005         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
7006         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
7007         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
7008         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
7009         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
7010         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
7011         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
7012         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
7013         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
7014         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
7015         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
7016         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
7017         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
7018         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
7019         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
7020         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
7021         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
7022         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
7023         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
7024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
7025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
7026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
7027         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
7028         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
7029         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
7030         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
7031         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
7032         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
7034 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
7036         * tst-cond2.c: Rearrange code to not rely on behavior undefined
7037         according to POSIX.
7039         * tst-basic2.c (do_test): Lock mutex before creating the thread.
7041 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
7043         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
7044         (TLS_GET_FS): New #define.
7045         (TLS_SET_FS): New #define.
7046         Correct value of __NR_set_thread_area.
7048         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
7050 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
7052         * Makefile (tests): Add tst-popen1.
7053         * tst-popen1.c: New file.
7055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
7056         but inactive generalization.
7057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7059         Minor optimization, remove one instruction.
7060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7062 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7064         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
7066 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7068         * init.c (__NR_set_tid_address): Add #ifdef for s390.
7069         * sysdeps/pthread/pthread_barrier_wait.c: New file.
7070         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
7071         * sysdeps/pthread/pthread_cond_signal.c: New file.
7072         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
7073         * sysdeps/pthread/pthread_cond_wait.c: New file.
7074         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
7075         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
7076         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
7077         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
7078         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
7079         * sysdeps/s390/Makefile: New file.
7080         * sysdeps/s390/bits/atomic.h: New file.
7081         * sysdeps/s390/pthread_spin_init.c: New file.
7082         * sysdeps/s390/pthread_spin_lock.c: New file.
7083         * sysdeps/s390/pthread_spin_trylock.c: New file.
7084         * sysdeps/s390/pthread_spin_unlock.c: New file.
7085         * sysdeps/s390/pthreaddef.h: New file.
7086         * sysdeps/s390/tcb-offsets.sym: New file.
7087         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
7088         * sysdeps/s390/tls.h: New file.
7089         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
7090         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
7091         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
7092         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
7093         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
7094         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
7095         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7096         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
7097         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
7098         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
7099         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
7100         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
7101         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
7102         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
7103         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
7104         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
7105         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
7106         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
7107         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
7108         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
7109         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
7110         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7111         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
7113 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
7115         * atomic.h: Add a couple more default implementations.
7116         (atomic_compare_and_exchange_acq): Use
7117         __arch_compare_and_exchange_32_acq in return value definition.  It
7118         always exists.
7119         (atomic_bit_set): Renamed from atomic_set_bit.
7120         Add missing atomic_ prefixes.
7122         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
7123         thread library is available, use correct value to mark initialized
7124         once variable.
7126 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
7128         * allocatestack.c (allocate_stack): Use __getpagesize instead of
7129         __sysconf to determine pagesize.
7131         * pthread_create.c: Include <atomic.h>.
7132         * allocatestack.c (allocate_stack): Implement coloring of the
7133         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
7134         size minus one.  Adjust users.
7135         * sysdeps/i386/i686/Makefile: New file.
7137 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
7139         * allocatestack.c: Improve comment throughout the file.
7141         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7142         (__lll_lock_wait): Add branch prediction.
7143         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7144         (__lll_lock_wait): Likewise.
7145         (lll_unlock_wake_cb): Removed.
7147 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
7149         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
7150         _POSIX_THREAD_PRIORITY_SCHEDULING.
7152 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
7154         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7155         Fix return type of ptr___pthread_getspecific.
7157 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
7159         * Makefile (tests): Add tst-umask1.
7160         (tst-umask1-ARGS): Define.
7161         * tst-umask1.c: New file.
7163 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
7165         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
7166         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
7167         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
7168         pthread_rwlock_unlock.
7169         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
7170         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
7171         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
7172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
7173         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7174         New file.
7175         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
7176         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7177         New file.
7178         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
7179         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
7180         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
7181         New file.
7182         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
7183         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
7184         New file.
7185         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
7186         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
7187         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
7188         New file.
7189         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
7190         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
7191         New file.
7192         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
7194         * Makefile (libpthread-routines): Remove lowlevelcond and
7195         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
7196         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
7197         and pthread_cond_broadcast.
7198         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
7199         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
7200         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
7201         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
7202         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
7203         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
7204         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
7205         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
7206         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
7207         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
7208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
7209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
7210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
7211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
7212         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
7213         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
7214         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
7215         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
7216         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
7217         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
7218         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
7219         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
7220         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
7221         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
7222         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
7223         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
7224         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
7225         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
7226         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
7227         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
7228         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
7230         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
7231         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
7232         of the code is moved to ...
7233         * sysdeps/pthread/createthread.c: ...here.  New file.
7235 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
7237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7238         (__new_sem_post): Clear %eax before returning.
7239         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7241         * Makefile (tests): Add tst-cleanup2.
7242         * tst-cleanup2.c: New file.
7244         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7245         Interpret first parameter correctly.
7247 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
7249         * Makefile (headers): Add bits/semaphore.h.
7251 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
7253         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7254         if not SHARED.
7256 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
7258         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7259         must be used and mapping failed.
7260         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7262         * Makefile (CFLAGS-pthread_self.os): Define this, not
7263         CFLAGS-pthread_self.c.
7265 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7267         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7268         lll_unlock_wake_cb.
7270         * Makefile (libpthread-routines): Add version.  Add rules to build
7271         version.os and banner.h.
7272         * version.c: New file.
7274 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
7276         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7277         the alias unconditional.
7278         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
7280 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7282         * Makefile (CFLAGS-pthread_self.c): New definition.
7284 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7286         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7287         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7288         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7289         * init.c (__pthread_initialize_minimal_internal): Likewise.
7291 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
7293         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7295         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7296         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7297         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7298         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7299         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7300         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7302 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7304         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7305         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7306         * tst-cancel-wrappers.sh: Remove all exceptions.
7308 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
7310         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7311         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
7313         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7314         Use __libc_pthread_functions array if SHARED.
7316         * pthreadP.h: Move pthread_cond_2_0_t definition to...
7317         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7319         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7320         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7321         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7322         __libc_ptf_call instead of __libc_maybe_call.
7323         (PTF): New #define.
7324         (__libc_cleanup_region_start): Wrap function name with PTF call.
7325         (__libc_cleanup_region_end): Likewise.
7326         (__libc_cleanup_end): Likewise.
7328         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7329         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7330         * pthread_key_create.c: Add __pthread_key_create_internal alias.
7331         * pthreadP.h: Add prototypes.
7333         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7334         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7335         __pthread_rwlock_unlock aliases.
7336         * pthreadP.h: Add prototypes for new aliases.
7338         * pthreadP.h (struct pthead_functions): Moved to...
7339         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
7340         * init.c (pthread_functions): Add initializers for new elements.
7342         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7343         __pthread_cleanup_pop_restore aliases.
7344         * pthreadP.h: Add prototypes.
7346         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7347         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7348         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7349         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7350         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7351         * pthreadP.h: Adjust prototypes and callers.
7353 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
7355         * Makefile (tests): Add tst-cancel7.
7356         (tst-cancel7-ARGS): New variable.
7357         * tst-cancel7.c: New file.
7359         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7360         around gcc defficiencies.
7361         * old_pthread_cond_signal.c: Likewise.
7362         * old_pthread_cond_timedwait.c: Likewise.
7363         * old_pthread_cond_wait.c: Likewise.
7365         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7367 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7369         * Makefile (tests): Add tst-cond7.
7370         * tst-cond7.c: New file.
7372         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7373         (condvar_cleanup): Get condvar address from the right place.
7375         * atomic.h: Correct definitions of atomic_full_barrier,
7376         atomic_read_barrier, atomic_write_barrier.
7378         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7379         race-free.
7380         * old_pthread_cond_signal.c: Likewise.
7381         * old_pthread_cond_timedwait.c: Likewise.
7382         * old_pthread_cond_wait.c: Likewise.
7384 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
7386         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7388 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7390         * pthreadP.h (pthread_cond_2_0_t): New type.
7391         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7392         Use new type for the 2.0 condvar function prototypes.
7393         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7394         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7395         parameter.
7396         * old_pthread_cond_destroy.c: Likewise.
7397         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
7398         * old_pthread_cond_signal.c: Likewise.
7399         * old_pthread_cond_timedwait.c: Likewise.
7400         * old_pthread_cond_wait.c: Likewise.
7402         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7403         (__pthread_cond_wait): Don't save cancellation mode and seq value
7404         in same location.
7406         * herrno.c (__h_errno_location): Don't define as weak.
7408 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7410         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7411         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7412         and pthread_cond_wait.
7413         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7414         Renamed to...
7415         (__pthread_cond_broadcast_2_0): ... this.
7416         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7417         Renamed to...
7418         (__pthread_cond_destroy_2_0): ... this.
7419         * old_pthread_cond_init.c (__old_pthread_cond_init):
7420         Renamed to...
7421         (__pthread_cond_init_2_0): ... this.
7422         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7423         Renamed to...
7424         (__pthread_cond_signal_2_0): ... this.
7425         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7426         Renamed to...
7427         (__pthread_cond_wait_2_0): ... this.
7428         * pthread_cond_destroy.c: Include shlib-compat.h.
7429         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7430         * pthread_cond_init.c: Include shlib-compat.h.
7431         (pthread_cond_init): Change strong_alias into versioned_symbol.
7432         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7433         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7434         fields.
7435         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7436         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7437         __pthread_cond_wait_2_0): New prototypes.
7438         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7439         __old_pthread_cond_init, __old_pthread_cond_signal,
7440         __old_pthread_cond_wait): Removed.
7441         * init.c: Include shlib-compat.h.
7442         (pthread_functions): Guard ptr___pthread_attr_init_2_0
7443         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7444         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7445         ptr___pthread_cond_*_2_0 fields.
7446         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7447         pthread_cond_*@GLIBC_2.0 compatibility symbols.
7449         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7450         LIBC_SIGACTION was not yet defined.
7451         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7452         [!defined LIBC_SIGACTION] (__sigaction): New function and
7453         libc_hidden_weak.
7454         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7455         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7457 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7459         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7461 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
7463         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7464         New, larger type definition.
7465         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7466         implementation.
7467         * Versions [libpthread]: Add definitions for new pthread_cond_*
7468         interfaces for version GLIBC_2.3.2.
7469         * pthread_cond_init.c: Update initialization for new type definition.
7470         * Makefile (libpthread-routines): Remove pthread_cond_wait,
7471         pthread_cond_timedwait, pthread_cond_signal, and
7472         pthread_cond_broadcast.  Add old_pthread_cond_init,
7473         old_pthread_cond_destroy, old_pthread_cond_wait,
7474         old_pthread_cond_timedwait, old_pthread_cond_signal, and
7475         old_pthread_cond_broadcast.
7476         * old_pthread_cond_broadcast.c: New file.
7477         * old_pthread_cond_destroy.c: New file.
7478         * old_pthread_cond_init.c: New file.
7479         * old_pthread_cond_signal.c: New file.
7480         * old_pthread_cond_timedwait.c: New file.
7481         * old_pthread_cond_wait.c: New file.
7482         * pthreadP.h: Add prototypes for the compatibility interfaces.
7484         * pthread_cond_destroy.c: Don't include <errno.h>.
7486 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
7488         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7489         unnecessary zero offset when addressing MUTEX.
7491 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7493         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7494         __register_atfork.
7495         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7496         for __register_atfork.
7498 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7500         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7501         instead of ASSEMBLER test macro.
7503         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7504         __libc_current_sigrtmax): Add libc_hidden_def.
7506         * sysdeps/pthread/list.h: Remove assert.h include.
7508 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7510         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7511         __pthread_initialize_minimal_internal not
7512         __pthread_initialize_minimal.
7514 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7516         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7517         __pthread_initialize_minimal as hidden.
7519         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7520         constructor.
7522 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7524         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7525         $(common-objpfx)format.lds, include that into the output script.
7526         Fix comment.
7527         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7529 2002-12-28  Andreas Jaeger  <aj@suse.de>
7531         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7532         nsec resolution changes.
7533         (xstat64_conv): Likewise.
7534         (xstat32_conv): Likewise.
7535         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7536         struct kernel_stat.
7537         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7538         structs stat and stat64.
7539         * time/time.h (__timespec_defined): Define for __USE_MISC.
7540         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7542 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7544         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7545         argument.
7546         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7547         (pthread_exit): Use strong_alias to avoid warnings.
7548         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7549         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7550         ptr___pthread_attr_init_2_*.
7551         * init.c (pthread_functions): Adjust.
7553 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7555         * forward.c: Make all functions available by default again.  It
7556         caused too much trouble.
7558         * pt-siglongjmp.c: Removed.
7560 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7562         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7563         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7564         * sysdeps/i386/Makefile: New file.
7565         * sysdeps/i386/tcb-offsets.sym: New file.
7566         * sysdeps/pthread/tcb-offsets.h: New file.
7567         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7568         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7570         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7571         __register_atfork...
7572         (GLIBC_2.3.2): ...here.
7574 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7576         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7577         pthread_attr_setstackaddr with __attribute_deprecated__.
7579 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7581         * pt-system.c (system): Remove cancellation handling.
7582         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7583         cancellation routines.
7585 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7587         * descr.h: Include <dl-sysdep.h>.
7588         (struct pthread): Move header.data.list to the back of the struct.
7589         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7590         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7591         (SYSINFO_OFFSEET): Likewise.
7593 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7595         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7596         Define.
7597         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7598         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7599         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7600         (USE_DL_SYSINFO): Undef.
7602 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7604         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7605         $(common-objpfx)libc.so.
7606         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7607         it is bigger than pipe buffer size even on arches with bigger
7608         page size.
7609         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7611 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7613         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7614         correct errno access for case that USE___THREAD is not defined.
7616 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7618         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7619         Patch by Marijn Ros <marijn@mad.scientist.com>.
7621 2002-12-22  Roland McGrath  <roland@redhat.com>
7623         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7625 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7627         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7629 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7631         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7632         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7633         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7635         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7636         of int $0x80.
7637         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7638         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7639         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7640         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7641         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7642         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7643         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7644         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7646         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7647         sysenter.
7648         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7650         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7652         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7653         in new TCB.
7654         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7655         that sysinfo is properly initialized.
7656         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7657         to 1 only for ld.so.
7659         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7660         RTLD_CORRECT_DYNAMIC_WEAK.
7662 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7664         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7665         Use return 0 as 6th argument to FORWARD4.
7666         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7668 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7670         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7671         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7672         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7673         (INIT_SYSINFO): New #define.
7674         (TLS_TP_INIT): Use INIT_SYSINFO.
7675         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7676         At test to make sure SYSINFO_OFFSET value is correct.
7677         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7679 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7681         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7682         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7683         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7684         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7685         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7686         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7687         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7689 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7691         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7692         macro instead of using int $0x80 directly.
7694         * sysdeps/pthread/bits/stdio-lock.h: New file.
7695         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7696         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7697         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7698         * Makefile (routines): Add libc-lowlevelmutex.
7700         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7701         __i686.get_pc_thunk.dx.
7703 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7705         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7706         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7707         ($(objpfx)tst-cancel-wrappers.out): New rule.
7708         * tst-cancel-wrappers.sh: New test.
7709         * tst-locale1.c: Include signal.h.
7710         (uselocale): Test static linking of __libc_current_sigrt*.
7712 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7714         * Makefile (tests): Add tst-cancel6.
7715         * tst-cancel6.c: New file
7717 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7719         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7720         Define meaningfully for assembler as well.
7721         * pthreadP.h (struct pthread_functions): Remove
7722         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7723         and ptr_pthread_attr_init_2_1 fields.
7724         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7725         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7726         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7727         (FORWARD3): Define using FORWARD4.
7728         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7729         versions.
7730         * pt-system.c: Remove duplicate stdlib.h include.
7732 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7734         * sem_init.c: Define sem_init@GLIBC_2.0.
7735         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7736         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7738         * flockfile.c: Moved to...
7739         * sysdeps/pthread/flockfile.c: ...here.  New file.
7740         * funlockfile.c: Moved to...
7741         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7742         * ftrylockfile.c: Moved to...
7743         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7745 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7747         * libc-cancellation.c: Guard both function with
7748         #if !defined NOT_IN_libc.
7749         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7750         automatically provided pthread wrappers.
7751         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7752         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7753         nor in libpthread.
7754         * pt-open.c: Removed.
7755         * pt-fcntl.c: Removed.
7756         * pt-fsync.c: Removed.
7757         * pt-lseek.c: Removed.
7758         * pt-msgrcv.c: Removed.
7759         * pt-msgsnd.c: Removed.
7760         * pt-msync.c: Removed.
7761         * pt-nanosleep.c: Removed.
7762         * pt-open64.c: Removed.
7763         * pt-pause.c: Removed.
7764         * pt-pread.c: Removed.
7765         * pt-pread64.c: Removed.
7766         * pt-pwrite.c: Removed.
7767         * pt-pwrite64.c: Removed.
7768         * pt-read.c: Removed.
7769         * pt-recv.c: Removed.
7770         * pt-recvfrom.c: Removed.
7771         * pt-recvmsg.c: Removed.
7772         * pt-send.c: Removed.
7773         * pt-sendto.c: Removed.
7774         * pt-sigtimedwait.c: Removed.
7775         * pt-sigwait.c: Removed.
7776         * pt-wait.c: Removed.
7777         * pt-waitpid.c: Removed.
7778         * pt-write.c: Removed.
7779         * pt-accept.c: Removed.
7780         * pt-close.c: Removed.
7781         * pt-connect.c: Removed.
7782         * pt-lseek64.c: Removed.
7783         * pt-sendmsg.c: Removed.
7784         * pt-tcdrain.c: Removed.
7786 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7788         * init.c (__pthread_initialize_minimal_internal): Renamed from
7789         __pthread_initialize_minimal.  Make old name an alias.  This
7790         converts a normal relocation into a relative relocation.
7792         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7794         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7795         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7796         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7797         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7798         pt-sigwaitinfo, pt-waitid, and pt-writev.
7799         * pt-creat.c: Removed.
7800         * pt-poll.c: Removed.
7801         * pt-pselect.c: Removed.
7802         * pt-readv.c: Removed.
7803         * pt-select.c: Removed.
7804         * pt-sigpause.c: Removed.
7805         * pt-sigsuspend.c: Removed.
7806         * pt-sigwaitinfo.c: Removed.
7807         * pt-waitid.c: Removed.
7808         * pt-writev.c: Removed.
7810         * init.c (pthread_functions): New variable.
7811         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7812         (or NULL) to __libc_pthread_init.
7813         * forward.c: Rewrite to use __libc:pthread_functions array to get
7814         function addresses.
7815         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7816         prototype.
7817         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7818         Take new parameter.  Copy content of variable pointed to by it
7819         to __libc_pthread_init.
7821         * pthreadP.h (struct pthread_functions): New type.
7822         (__libc_pthread_init): Declare.
7824         * pthread_attr_destroy.c: Add namespace protected alias.
7825         * pthread_attr_getdetachstate.c: Likewise.
7826         * pthread_attr_getinheritsched.c: Likewise.
7827         * pthread_attr_getschedparam.c: Likewise.
7828         * pthread_attr_getschedpolicy.c: Likewise.
7829         * pthread_attr_getscope.c: Likewise.
7830         * pthread_attr_setdetachstate.c: Likewise.
7831         * pthread_attr_setinheritsched.c: Likewise.
7832         * pthread_attr_setschedparam.c: Likewise.
7833         * pthread_attr_setschedpolicy.c: Likewise.
7834         * pthread_attr_setscope.c: Likewise.
7835         * pthread_cond_broadcast.c: Likewise.
7836         * pthread_cond_destroy.c: Likewise.
7837         * pthread_cond_init.c: Likewise.
7838         * pthread_cond_signal.c: Likewise.
7839         * pthread_cond_wait.c: Likewise.
7840         * pthread_condattr_destroy.c: Likewise.
7841         * pthread_condattr_init.c: Likewise.
7842         * pthread_equal.c: Likewise.
7843         * pthread_exit.c: Likewise.
7844         * pthread_getschedparam.c: Likewise.
7845         * pthread_self.c: Likewise.
7846         * pthread_setcancelstate.c: Likewise.
7847         * pthread_setschedparam.c: Likewise.
7848         * pthread_mutex_destroy.c: Likewise.
7849         * pthread_mutex_init.c: Likewise.
7850         * pthreadP.h: Add prototypes for the aliases.
7852         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7853         multiple_threads member in correct TCB to 1.
7855         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7856         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7857         member of thread decriptor, otherwise return unconditionally 1.
7859 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7861         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7862         regular Linux version.  Remove file.
7863         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7864         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7865         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7866         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7867         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7868         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7869         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7870         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7871         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7872         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7873         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7874         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7875         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7876         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7877         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7878         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7879         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7880         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7881         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7882         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7883         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7884         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7885         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7886         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7887         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7888         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7889         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7890         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7891         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7892         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7894 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7896         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7897         * sysdeps/unix/sysv/linux/open.c: Removed.
7898         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7899         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7900         * sysdeps/unix/sysv/linux/msync.c: Removed.
7901         * sysdeps/unix/sysv/linux/read.c: Removed.
7902         * sysdeps/unix/sysv/linux/close.c: Removed.
7903         * sysdeps/unix/sysv/linux/creat.c: Removed.
7904         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7905         * sysdeps/unix/sysv/linux/pause.c: Removed.
7906         * sysdeps/unix/sysv/linux/select.c: Removed.
7907         * sysdeps/unix/sysv/linux/write.c: Removed.
7909 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7911         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7912         element in TCB to see whether locking is needed.
7914         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7915         MULTIPLE_THREADS_OFFSET value is correct.
7917         * sysdeps/unix/sysv/linux/close.c: New file.
7918         * sysdeps/unix/sysv/linux/connect.S: New file.
7919         * sysdeps/unix/sysv/linux/creat.c: New file.
7920         * sysdeps/unix/sysv/linux/fsync.c: New file.
7921         * sysdeps/unix/sysv/linux/llseek.c: New file.
7922         * sysdeps/unix/sysv/linux/lseek.c: New file.
7923         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7924         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7925         * sysdeps/unix/sysv/linux/msync.c: New file.
7926         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7927         * sysdeps/unix/sysv/linux/open.c: New file.
7928         * sysdeps/unix/sysv/linux/open64.c: New file.
7929         * sysdeps/unix/sysv/linux/pause.c: New file.
7930         * sysdeps/unix/sysv/linux/poll.c: New file.
7931         * sysdeps/unix/sysv/linux/pread.c: New file.
7932         * sysdeps/unix/sysv/linux/pread64.c: New file.
7933         * sysdeps/unix/sysv/linux/pselect.c: New file.
7934         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7935         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7936         * sysdeps/unix/sysv/linux/readv.c: New file.
7937         * sysdeps/unix/sysv/linux/recv.S: New file.
7938         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7939         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7940         * sysdeps/unix/sysv/linux/select.c: New file.
7941         * sysdeps/unix/sysv/linux/send.S: New file.
7942         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7943         * sysdeps/unix/sysv/linux/sendto.S: New file.
7944         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7945         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7946         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7947         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7948         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7949         * sysdeps/unix/sysv/linux/system.c: New file.
7950         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7951         * sysdeps/unix/sysv/linux/wait.c: New file.
7952         * sysdeps/unix/sysv/linux/waitid.c: New file.
7953         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7954         * sysdeps/unix/sysv/linux/writev.c: New file.
7955         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7957         * pt-readv.c: Fix comment.
7959 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7961         * tst-cleanup1.c: Include stdlib.h.
7963         * tst-cancel5.c: New test.
7964         * Makefile (tests): Add tst-cancel5.
7965         (tst-cancel5): Link against libc.so libpthread.so in that order.
7967 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7969         * forward.c (test_loaded): Prevent recursive calls.
7971         * Makefile (routines): Add libc-cancellation.
7972         * libc-cancellation.c: New file.
7973         * descr.h (struct pthread): Add multiple_threads field.
7974         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7975         new thread descriptor to 1.
7976         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7977         Initialize multiple_thread field after successful thread creation.
7978         * cancellation.c (__do_cancel): Move to pthreadP.h.
7979         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7980         (__pthread_disable_asynccancel): Add internal_function attribute.
7981         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7982         * pthread_setcancelstate.c: Likewise.
7983         * pthread_setcanceltype.c: Likewise.
7984         * pthread_exit.c: Likewise.
7985         * pthreadP.h (CANCELLATION_P): Likewise.
7986         (__do_cancel): Define as static inline.
7987         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7988         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7989         declarations.
7990         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7991         fields.  Define MULTIPLE_THREADS_OFFSET.
7992         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7993         declaration.
7994         * sysdeps/unix/sysv/linux/accept.S: New file.
7995         * sysdeps/unix/sysv/linux/read.c: New file.
7996         * sysdeps/unix/sysv/linux/write.c: New file.
7997         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7998         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7999         initialization of __libc_locking_needed.
8000         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
8001         __libc_locking_needed, use multiple_threads field in TCB.
8002         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8004 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8006         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
8007         version.
8008         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
8010         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
8011         access to __libc_locking_needed for PIC.
8013 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
8015         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
8016         declare for libc.so.
8017         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
8018         expression.
8019         (__libc_lock_lock): Put into statement expression.
8020         (__libc_lock_unlock): Remove trailing semicolon.
8021         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
8023 2002-12-12  Roland McGrath  <roland@redhat.com>
8025         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
8026         "m" constraint to refer to __libc_locking_needed.  Declare it here.
8028 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8030         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
8031         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
8032         Initialize __libc_locking_needed.
8033         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
8034         instead of __register_pthread_fork_handler.
8035         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
8036         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
8037         fork-gen with libc_pthread_init.
8038         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
8039         of __register_pthread_fork_handler.
8040         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
8041         of __register_pthread_fork_handler.
8042         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
8043         __libc_locking_needed to determine whether lock prefix can be avoided.
8044         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8046 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
8048         * Makefile (tests): Add tst-cleanup1.
8049         * tst-cleanup1.c: New file.
8050         * cancellation.c (__cleanup_thread): Removed.
8051         (__do_cancel): Remove call to __cleanup_thread.
8052         * pthreadP.h: Remove __cleanup_thread prorotype.
8054         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8055         Remember function and argument even if cancellation handler
8056         function is not available.
8057         (__libc_cleanup_region_end): Execute registered function directly if
8058         pthread functions are not available.
8059         (__libc_cleanup_end): Likewise.
8061         * init.c (__pthread_initialize_minimal): Fix initialization in
8062         static lib by preventing gcc from being too clever.
8064 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
8066         * init.c (__pthread_initialize_minimal): Remove unneccesary
8067         sigaddset call.
8069         * Makefile (tests): We can run tst-locale2 now.
8071 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
8073         * Versions: Remove duplicated sigwait entry.
8075 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
8077         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
8078         inside libpthread.
8080         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
8082         * pthreadP.h: Declare __pthread_enable_asynccancel and
8083         __pthread_disable_asynccancel.
8084         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
8085         (CANCEL_RESET): Use __pthread_disable_asynccancel.
8086         * cancellation.c (__pthread_enable_asynccancel): New function.
8087         (__pthread_disable_asynccancel): New function.
8088         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
8089         * pt-close.c: Likewise.
8090         * pt-connect.c: Likewise.
8091         * pt-creat.c: Likewise.
8092         * pt-fcntl.c: Likewise.
8093         * pt-fsync.c: Likewise.
8094         * pt-lseek.c: Likewise.
8095         * pt-lseek64.c: Likewise.
8096         * pt-msgrcv.c: Likewise.
8097         * pt-msgsnd.c: Likewise.
8098         * pt-msync.c: Likewise.
8099         * pt-nanosleep.c: Likewise.
8100         * pt-open.c: Likewise.
8101         * pt-open64.c: Likewise.
8102         * pt-pause.c: Likewise.
8103         * pt-poll.c: Likewise.
8104         * pt-pread.c: Likewise.
8105         * pt-pread64.c: Likewise.
8106         * pt-pselect.c: Likewise.
8107         * pt-pwrite.c: Likewise.
8108         * pt-pwrite64.c: Likewise.
8109         * pt-read.c: Likewise.
8110         * pt-readv.c: Likewise.
8111         * pt-recv.c: Likewise.
8112         * pt-recvfrom.c: Likewise.
8113         * pt-recvmsg.c: Likewise.
8114         * pt-select.c: Likewise.
8115         * pt-send.c: Likewise.
8116         * pt-sendmsg.c: Likewise.
8117         * pt-sendto.c: Likewise.
8118         * pt-sigpause.c: Likewise.
8119         * pt-sigsuspend.c: Likewise.
8120         * pt-sigtimedwait.c: Likewise.
8121         * pt-sigwait.c: Likewise.
8122         * pt-sigwaitinfo.c: Likewise.
8123         * pt-system.c: Likewise.
8124         * pt-tcdrain.c: Likewise.
8125         * pt-wait.c: Likewise.
8126         * pt-waitid.c: Likewise.
8127         * pt-waitpid.c: Likewise.
8128         * pt-write.c: Likewise.
8129         * pt-writev.c: Likewise.
8130         * pthread_join.c: Likewise.
8131         * pthread_timedjoin.c: Likewise.
8133         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
8134         (__xpg_sigpause): New function.
8135         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
8137 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
8139         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
8141         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
8142         _GI_pthread_cleanup_pop to pthreadP.h.
8144         * ftrylockfile.c: Use _IO_lock_trylock instead of
8145         pthread_mutex_trylock.
8147         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
8148         (CANCEL_RESET): Likewise.
8149         (__pthread_setcanceltype_): Declare.
8150         (__pthread_mutex_lock_internal): Declare.
8151         (__pthread_mutex_unlock_internal): Declare.
8152         (__pthread_once_internal): Declare.
8153         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
8154         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
8156         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
8157         and pthread_mutex_unlock.
8158         * pthread_cond_wait.c: Likewise.
8159         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
8160         * pthread_mutex_unlock.c: Likewise.
8162         * pthread_setcanceltype.c: Add additional alias
8163         __pthread_setcanceltype.
8165         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
8166         * sem_open.c (sem_open): Likewise.
8167         Use __libc_open, __libc_write, and __libc_close instead of
8168         open, write, and close respectively.
8170         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
8171         Rewrite as statement expression since it must return a value.
8173         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
8174         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
8175         __pthread_kill.
8177         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
8178         alias __pthread_once_internal.
8180         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
8182 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
8184         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
8185         * tst-stdio1.c: New file.
8186         * tst-stdio2.c: New file.
8188         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
8190         * Makefile (tests): Comment out tst-locale2 for now.
8191         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
8193         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
8194         -D_IO_MTSAFE_IO.
8195         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
8196         Use _IO_lock_init instead of explicit assignment.
8198         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
8199         Define __libc_lock_* and __libc_lock_recursive macros with
8200         lowlevellock macros, not pthread mutexes.
8202         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
8203         of pthread_mutex_lock.
8204         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
8205         instead of pthread_mutex_unlock.
8207 2002-12-06  Roland McGrath  <roland@redhat.com>
8209         * allocatestack.c (__stack_user): Use uninitialized defn.
8210         * init.c (__pthread_initialize_minimal): Initialize it here.
8212 2002-12-05  Roland McGrath  <roland@redhat.com>
8214         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
8215         string.
8216         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
8218         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
8219         missing & here too.
8221 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
8223         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8224         lowlevellock.
8225         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
8226         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
8227         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
8228         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
8229         for __libc_lock_* macros.
8230         * Makefile (routines): Add libc-lowlevellock.
8232 2002-10-09  Roland McGrath  <roland@redhat.com>
8234         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
8235         Under [__PIC__], call the function via the pointer fetched for
8236         comparison rather than a call by name that uses the PLT.
8237         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8238         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8239         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8240         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8241         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8243 2002-12-04  Roland McGrath  <roland@redhat.com>
8245         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8247         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8248         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8250         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8252 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8254         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8255         a completely opaque, non-integer type.
8256         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8258 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
8260         * sysdeps/i386/tls.h: Include stdlib.h.
8261         * sysdeps/x86_64/tls.h: Likewise.
8263 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8265         * Makefile (tests): Add tst-locale2.
8266         (tests-static): Likewise.
8267         * tst-locale2.c: New file.
8269         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8270         volatile and add memory clobbers to lock operations.
8272 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
8274         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8275         * sysdeps/i386/i486/bits/atomic.h: New file.
8276         * sysdeps/i386/i586/bits/atomic.h: New file.
8277         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8278         include i486 version.
8279         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8280         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8281         Patch by Marijn Ros <marijn@mad.scientist.com>.
8283         * allocatestack.c (get_cached_stack): Don't crash if we first
8284         found a stack with a larger size then needed.
8285         Reported by Hui Huang <hui.huang@sun.com>.
8287         * Makefile (tests): Add tst-sysconf.
8288         * tst-sysconf.c: New file.
8290         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8291         PTHREAD_THREADS_MAX.
8293 2002-12-02  Roland McGrath  <roland@redhat.com>
8295         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8296         Declare using hidden_proto instead of attribute_hidden, so there are
8297         non-.hidden static symbols for gdb to find.
8298         (__pthread_keys): Likewise.
8299         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8300         * allocatestack.c (__stack_user): Likewise.
8301         * pthread_create.c (__pthread_keys): Likewise.
8302         (__nptl_threads_events, __nptl_last_event): Make these static instead
8303         of hidden.
8304         * pthread_key_create.c (__pthread_pthread_keys_max,
8305         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8307 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
8309         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
8310         statically.
8311         * tst-locale1.c: New file.
8313         * pthread_cond_timedwait.c: Include <stdlib.h>.
8315         * Makefile (tests): Add tst-fork2 and tst-fork3.
8316         * tst-fork2.c: New file.
8317         * tst-fork3.c: New file.
8319 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
8321         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8323         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8324         require it to 200112L.
8326         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8327         instruction only if HAVE_CMOV is defined.
8328         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8330         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8332         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8334         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8336         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8338 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
8340         * sysdeps/x86_64/bits/atomic.h: New file.
8342         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8343         16-bit operations.
8345         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8346         possible since gettid cannot fail.
8348         * sysdeps/x86_64/pthreaddef.h: New file.
8350         * sysdeps/i386/pthreaddef.h (gettid): Removed.
8352         * sysdeps/x86_64/pthread_spin_init.c: New file.
8353         * sysdeps/x86_64/pthread_spin_lock.c: New file.
8354         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8355         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8357         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8358         Add missing lock prefix.  Minute optimization.
8360         * tst-spin2.c (main): Also check successful trylock call.
8362         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8363         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
8365         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8366         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
8368         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
8369         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8370         value in case of an error.  Add support for INTERNAL_SYSCALL.
8372         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8373         value in case of an error.
8375         * sysdeps/x86_64/tls.h: New file.
8377 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8379         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
8380         takes the array member name and the index as parameters.
8381         (THREAD_SETMEM_NC): Likewise.
8382         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8383         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8384         interfaces.
8386         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8387         to decide which code to use.
8388         (THREAD_SETMEM_NC): Likewise.
8390         * allocatestack.c (queue_stack): Don't remove stack from list here.
8391         Do it in the caller.  Correct condition to prematurely terminate
8392         loop to free stacks.
8393         (__deallocate_stack): Remove stack from list here.
8395 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8397         * Makefile (tests): Add tst-stack1.
8398         * tst-stack1.c: New file.
8400         * allocatestack.c (allocate_stack): Initialize the TCB on a user
8401         provided stack.
8403         * pthread_attr_getstack.c: Return bottom of the thread area.
8405 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
8407         * Makefile (libpthread-routines): Add pt-allocrtsig and
8408         pthread_kill_other_threads.
8409         * pt-allocrtsig.c: New file.
8410         * pthread_kill_other_threads.c: New file.
8411         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8412         all three functions.
8413         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8414         allocrtsig.
8415         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8416         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8417         and __libc_allocate_rtsig_private.
8418         * Versions (libpthread): Export pthread_kill_other_threads_np,
8419         __libc_current_sigrtmin, and __libc_current_sigrtmax.
8421 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
8423         * allocatestack.c (allocate_stack): stackaddr in attribute points to
8424         the end of the stack.  Adjust computations.
8425         When mprotect call fails dequeue stack and free it.
8426         * pthread_attr_setstack.c: Store top of the stack in stackaddr
8427         attribute.
8428         * pthread_getattr_np.c: Likewise.
8430         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8431         surprises.
8433 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
8435         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8436         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8438 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
8440         * pthread_getspecific.c: Optimize access to first 2nd-level array.
8441         * pthread_setspecific.c: Likewise.
8443 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
8445         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8446         definitions.  Get them from the official place.
8447         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8449         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8450         Use new CLONE_ flags in clone() calls.
8452         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8453         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8455         * Versions: Add pthread_* functions for libc.
8456         * forward.c: New file.
8458         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8459         errno-loc.
8460         * herrno.c: New file.
8461         * res.c: New file.
8463         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8464         sem_trywait, and sem_timedwait.  Add herrno and res.
8465         * sem_init.c: Don't initialize lock and waiters members.
8466         * sem_open.c: Likewise.
8467         * sem_post.c: Removed.
8468         * sem_wait.c: Removed.
8469         * sem_trywait.c: Removed.
8470         * sem_timedwait.c: Removed.
8471         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8472         Includes full implementations of sem_post, sem_wait, sem_trywait,
8473         and sem_timedwait.
8474         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8475         for new implementation.
8476         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8477         and waiters fields.
8479         * tst-sem3.c: Improve error message.
8480         * tst-signal3.c: Likewise.
8482         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8483         to tell the kernel about the termination futex and to initialize tid
8484         member.  Don't initialize main_thread.
8485         * descr.h (struct pthread): Remove main_thread member.
8486         * cancelllation.c (__do_cancel): Remove code handling main thread.
8487         The main thread is not special anymore.
8489         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
8490         size of the stacks to stack_cache_actsize.
8492         * pt-readv.c: Add missing "defined".
8493         * pt-sigwait.c: Likewise.
8494         * pt-writev.c: Likewise.
8496 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
8498         * Versions: Export __connect from libpthread.
8499         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8501         * Makefile (libpthread-routines): Add pt-raise.
8502         * sysdeps/unix/sysv/linux/raise.c: New file.
8503         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8504         * sysdeps/generic/pt-raise.c: New file.
8506         * pthread_cond_init.c: Initialize all data elements of the condvar
8507         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8509         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8510         * pthread_create.c: Likewise.
8512         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8513         * tst-key1.c: New file.
8514         * tst-key2.c: New file.
8515         * tst-key3.c: New file.
8517         * Versions: Export pthread_detach for version GLIBC_2.0.
8518         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8520 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8522         * pthread_key_create.c: Terminate search after an unused key was found.
8523         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8525         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8526         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8528 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8530         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8531         dynamic lookup for errno in PIC.
8533         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8534         release the stack lock as soon as possible.
8535         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8536         the static TLS block.
8537         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8539         * cancellation.c: Renamed from cancelation.c.
8540         * Makefile: Adjust accordingly.
8541         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8542         * cleanup_defer.c: Use CANCELLATION_P.
8543         * pthread_testcancel.c: Likewise.
8544         * descr.h: Fix spelling in comments.
8545         * init.c: Likewise.
8546         * pthread_getattr_np.c: Likewise.
8547         * pthread_getschedparam.c: Likewise.
8548         * pthread_setschedparam.c: Likewise.
8549         * Versions: Likewise.
8551         * pt-pselect.c: New file.
8552         * Makefile (libpthread-routines): Add pt-pselect.
8553         * Versions: Add pselect.
8555         * tst-cancel4.c: New file.
8556         * Makefile (tests): Add tst-cancel4.
8558 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8560         * pthread_mutex_lock.c: Always record lock ownership.
8561         * pthread_mutex_timedlock.c: Likewise.
8562         * pthread_mutex_trylock.c: Likewise.
8564         * pt-readv.c: New file.
8565         * pt-writev.c: New file.
8566         * pt-creat.c: New file.
8567         * pt-msgrcv.c: New file.
8568         * pt-msgsnd.c: New file.
8569         * pt-poll.c: New file.
8570         * pt-select.c: New file.
8571         * pt-sigpause.c: New file.
8572         * pt-sigsuspend.c: New file.
8573         * pt-sigwait.c: New file.
8574         * pt-sigwaitinfo.c: New file.
8575         * pt-waitid.c: New file.
8576         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8577         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8578         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8579         * Versions: Add all the new functions.
8581         * tst-exit1.c: New file.
8582         * Makefile (tests): Add tst-exit1.
8584         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8586 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8588         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8590         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8591         call.  pthread_join is an official cancellation point.
8592         * pthread_timedjoin.c: Likewise.
8594         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8595         and the condvar's mutex are retrieved.
8596         * pthread_cond_timedwait.c: Likewise.
8597         Reported by dice@saros.East.Sun.COM.
8599 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8601         * pthreadP.h: Cut out all type definitions and move them...
8602         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8603         * pthreadP.h: Include <internaltypes.h>.
8605         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8606         performance tweaks.
8608         * sem_trywait.c: Shuffle #includes around to get right order.
8609         * sem_timedwait.c: Likewise.
8610         * sem_post.c: Likewise.
8611         * sem_wait.c: Likewise.
8613         * nptl 0.3 released.
8615         * Makefile (tests): Add tst-signal3.
8616         * tst-signal3.c: New file.
8618 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8620         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8621         the asms modify the sem object.
8622         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8624         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8625         the actual members.
8626         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8627         * semaphoreP.h: Include pthreadP.h.
8628         * sem_getvalue.c: Adjust to sem_t change.
8629         * sem_init.c: Likewise.
8630         * sem_open.c: Likewise.
8631         * sem_post.c: Likewise.
8632         * sem_timedwait.c: Likewise.
8633         * sem_trywait.c: Likewise.
8634         * sem_wait.c: Likewise.
8636 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8638         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8639         * tst-basic2.c: New file.
8640         * tst-exec1.c: New file.
8641         * tst-exec2.c: New file.
8642         * tst-exec3.c: New file.
8644         * tst-fork1.c: Remove extra */.
8646         * nptl 0.2 released.  The API for IA-32 is complete.