[BZ #3291]
[glibc.git] / nptl / ChangeLog
blobf96101aa9e143a6d025a155cfccae0d004a29493
1 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3         [BZ #3251]
4         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
5         Patch by Petr Baudis.
7 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
9         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
11         * tst-cancel2.c (tf): Loop as long as something was written.
13 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
15         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
16         mutexes wake all mutexes.
17         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
18         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
19         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
21 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
23         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
24         to guarantee the thread is always canceled.
26 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
28         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
29         Include stdlib.h.
30         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
31         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
32         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
33         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
34         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
36 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
38         [BZ #3123]
39         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
40         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
41         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
42         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
43         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
44         * Makefile (tests): Add tst-cond22.
45         * tst-cond22.c: New file.
47 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
49         [BZ #3124]
50         * descr.h (struct pthread): Add parent_cancelhandling.
51         * sysdeps/pthread/createthread.c (create_thread): Pass parent
52         cancelhandling value to child.
53         * pthread_create.c (start_thread): If parent thread was canceled
54         reset the SIGCANCEL mask.
55         * Makefile (tests): Add tst-cancel25.
56         * tst-cancel25.c: New file.
58 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
59             Ulrich Drepper  <drepper@redhat.com>
61         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
62         counterp if it is already zero.
63         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
65 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
66             Roland McGrath  <roland@redhat.com>
68         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
69         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
70         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
71         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
72         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
73         lll_robust_mutex_timedlock, lll_mutex_unlock,
74         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
75         Add _L_*_ symbols around the subsection.
76         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
77         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
79 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
80             Roland McGrath  <roland@redhat.com>
82         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
83         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
84         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
85         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
86         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
87         lll_robust_mutex_timedlock, lll_mutex_unlock,
88         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
89         Add _L_*_ symbols around the subsection.
90         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
91         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
93 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
95         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
96         change because it can disturb too much existing code.  If real hard
97         reader preference is needed we'll introduce another type.
98         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
99         (pthread_rwlock_timedwrlock): Likewise.
100         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
101         Likewise.
103 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
105         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
106         reader preference.
107         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
108         (pthread_rwlock_timedwrlock): Likewise.
109         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
110         Likewise.
112 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
114         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
115         Only define ifdef SHARED.
117 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
119         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
120         (free_stacks): ...here.
121         (__free_stack_cache): New function.
122         * pthreadP.h: Declare __free_stack_cache.
123         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
124         ptr_freeres.
125         * init.c (pthread_functions): Initialize ptr_freeres.
126         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
127         New freeres function.
129 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
131         [BZ #3018]
132         * Makefile (extra-objs): Add modules to extra-test-objs instead.
134 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
136         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
137         _XOPEN_REALTIME_THREADS.
139 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
141         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
142         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
143         HAVE_CLOCK_GETTIME_VSYSCALL.
144         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
146 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
148         * sysdeps/unix/sysv/linux/bits/posix_opt.h
149         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
150         * descr.h (struct priority_protection_data): New type.
151         (struct pthread): Add tpp field.
152         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
153         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
154         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
155         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
156         TPP mutexes.
157         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
158         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
159         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
160         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
161         * tpp.c: New file.
162         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
163         boosted by TPP.
164         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
165         * pthread_mutexattr_getprioceiling.c
166         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
167         in the SCHED_FIFO priority range.
168         * pthread_mutexattr_setprioceiling.c
169         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
170         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
171         if mutex is not TPP.  Ceiling is now in __data.__lock.
172         * pthread_mutex_setprioceiling.c: Include stdbool.h.
173         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
174         is now in __data.__lock.  Add locking.
175         * pthread_create.c (__free_tcb): Free pd->tpp structure.
176         * Makefile (libpthread-routines): Add tpp.
177         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
178         * tst-tpp.h: New file.
179         * tst-mutexpp1.c: New file.
180         * tst-mutexpp6.c: New file.
181         * tst-mutexpp10.c: New file.
182         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
183         * tst-mutex6.c (TEST_FUNCTION): Likewise.
185 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
187         [BZ #2843]
188         * pthread_join.c (pthread_join): Account for self being canceled
189         when checking for deadlocks.
190         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
191         (tf1): Don't print anything after pthread_join returns, this would be
192         another cancellation point.
193         (tf2): Likewise.
194         * tst-join6.c: New file.
195         * Makefile (tests): Add tst-join6.
197 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
199         [BZ #2892]
200         * pthread_setspecific.c (__pthread_setspecific): Check
201         out-of-range index before checking for unused key.
203         * sysdeps/pthread/gai_misc.h: New file.
205 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
207         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
208         file.  Don't use sysctl.
209         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
210         overwrite the file if this is likely not true.
212 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
214         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
215         * Makefile (tests): Add tst-getpid3.
216         * tst-getpid3.c: New file.
218 2006-07-30  Roland McGrath  <roland@redhat.com>
220         * Makefile (libpthread-routines): Add ptw-sigsuspend.
222         * sysdeps/unix/sysv/linux/i386/not-cancel.h
223         (pause_not_cancel): New macro.
224         (nanosleep_not_cancel): New macro.
225         (sigsuspend_not_cancel): New macro.
226         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
227         nanosleep_not_cancel macro from <not-cancel.h>.
228         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
229         macro from <not-cancel.h>.
231 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
232             Jakub Jelinek  <jakub@redhat.com>
234         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
235         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
236         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
237         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
238         * pthread_mutex_init.c: Add support for priority inheritance mutex.
239         * pthread_mutex_lock.c: Likewise.
240         * pthread_mutex_timedlock.c: Likewise.
241         * pthread_mutex_trylock.c: Likewise.
242         * pthread_mutex_unlock.c: Likewise.
243         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
244         all mutexes.
245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
247         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
248         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
249         pthread-pi-defines.sym.
250         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
251         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
253         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
254         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
255         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
256         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
257         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
258         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
259         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
260         _POSIX_THREAD_PRIO_INHERIT to 200112L.
261         * tst-mutex1.c: Adjust to allow use in PI mutex test.
262         * tst-mutex2.c: Likewise.
263         * tst-mutex3.c: Likewise.
264         * tst-mutex4.c: Likewise.
265         * tst-mutex5.c: Likewise.
266         * tst-mutex6.c: Likewise.
267         * tst-mutex7.c: Likewise.
268         * tst-mutex7a.c: Likewise.
269         * tst-mutex8.c: Likewise.
270         * tst-mutex9.c: Likewise.
271         * tst-robust1.c: Likewise.
272         * tst-robust7.c: Likewise.
273         * tst-robust8.c: Likewise.
274         * tst-mutexpi1.c: New file.
275         * tst-mutexpi2.c: New file.
276         * tst-mutexpi3.c: New file.
277         * tst-mutexpi4.c: New file.
278         * tst-mutexpi5.c: New file.
279         * tst-mutexpi6.c: New file.
280         * tst-mutexpi7.c: New file.
281         * tst-mutexpi7a.c: New file.
282         * tst-mutexpi8.c: New file.
283         * tst-mutexpi9.c: New file.
284         * tst-robust1.c: New file.
285         * tst-robust2.c: New file.
286         * tst-robust3.c: New file.
287         * tst-robust4.c: New file.
288         * tst-robust5.c: New file.
289         * tst-robust6.c: New file.
290         * tst-robust7.c: New file.
291         * tst-robust8.c: New file.
292         * Makefile (tests): Add the new tests.
294         * pthread_create.c (start_thread): Add some casts to avoid warnings.
295         * pthread_mutex_destroy.c: Remove unneeded label.
297 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
299         * pthread_mutex_init.c (__pthread_mutex_init): Move some
300         computations to compile time.
302 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
304         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
306 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
308         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
310 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
312         * pthread_key_create.c (__pthread_key_create): Do away with
313         __pthread_keys_lock.
315         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
316         (__kernel_cpumask_size): Mark as hidden.
317         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
319         * sem_open.c (__sem_mappings_lock): Mark as hidden.
320         * semaphoreP.h (__sem_mappings_lock): Likewise.
322 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
324         * pthread_atfork.c: Mark __dso_handle as hidden.
326 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
328         [BZ #2644]
329         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
330         the reload problem.  Change the one path in pthread_cancel_init
331         which causes the problem.  Force gcc to reload.  Simplify callers.
332         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
333         (_Unwind_GetBSP): Undo last patch.
335 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
337         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
338         function pointer is reloaded after pthread_cancel_init calls.
340         [BZ #2644]
341         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
342         pointers are reloaded after pthread_cancel_init calls.
344 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
346         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
347         __always_inline.
349 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
351         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
352         Allocate new object which is passed to timer_sigev_thread so that
353         the timer can be deleted before the new thread is scheduled.
355 2006-04-26  Roland McGrath  <roland@redhat.com>
357         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
359 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
361         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
362         suffix for conditional jumps.
363         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
364         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
365         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
366         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
367         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
368         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
370         * init.c (sigcancel_handler): Compare with correct PID even if the
371         thread is in the middle of a fork call.
372         (sighandler_setxid): Likewise.
373         Reported by Suzuki K P <suzuki@in.ibm.com> .
375 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
377         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
379 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
381         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
382         fails [Coverity CID 105].
384 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
386         * sysdeps/pthread/pthread.h: Add nonnull attributes.
388 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
390         [BZ #2505]
391         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
392         Define __lll_rel_instr using lwsync.
394 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
396         * allocatestack.c (allocate_stack): Always initialize robust_head.
397         * descr.h: Define struct robust_list_head.
398         (struct pthread): Use robust_list_head in robust mutex list definition.
399         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
400         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
401         (__pthread_initialize_minimal_internal): Register robust_list with
402         the kernel.
403         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
404         Declare __set_robust_list_avail.
405         * pthread_create.c (start_thread): Register robust_list of new thread.
406         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
407         waiters.
408         * pthread_mutex_destroy.c: For robust mutexes don't look at the
409         number of users, it's unreliable.
410         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
411         set_robust_list syscall is available.
412         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
413         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
414         Set robust_head.list_op_pending before trying to lock a robust mutex.
415         * pthread_mutex_timedlock.c: Likewise.
416         * pthread_mutex_trylock.c: Likewise.
417         * pthread_mutex_unlock.c: Likewise for unlocking.
418         * Makefile (tests): Add tst-robust8.
419         * tst-robust8.c: New file.
421 2006-03-08  Andreas Schwab  <schwab@suse.de>
423         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
424         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
426 2006-03-05  Roland McGrath  <roland@redhat.com>
428         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
429         and $config_os doesn't match *linux*.
431 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
433         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
434         Use __syscall_error.
435         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
436         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
437         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
438         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
439         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
440         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
442 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
444         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
446 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
448         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
449         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
450         mutex.
451         (__lll_robust_timedlock_wait): Likewise.
452         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
453         (__lll_robust_lock_wait): Likewise.
454         (__lll_robust_timedlock_wait): Likewise.
455         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
456         (__lll_robust_lock_wait): Likewise.
457         (__lll_robust_timedlock_wait): Likewise.
459 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
461         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
462         lll_robust_mutex_trylock, lll_robust_mutex_lock,
463         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
464         lll_robust_mutex_unlock): Define.
465         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
467 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
469         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
470         instead of <clone.S>.
472 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
474         * Makefile (libpthread-routines): Add
475         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
476         and pthread_mutex_[sg]etprioceiling.
477         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
478         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
479         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
480         pthread_mutex_setprioceiling.
481         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
482         PTHREAD_PRIO_PROTECT): New enum values.
483         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
484         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
485         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
486         prototypes.
487         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
488         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
489         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
490         Define.
491         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
492         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
493         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
494         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
495         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
496         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
497         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
498         protocol mutexes.
499         * pthread_mutex_getprioceiling.c: New file.
500         * pthread_mutex_setprioceiling.c: New file.
501         * pthread_mutexattr_getprioceiling.c: New file.
502         * pthread_mutexattr_setprioceiling.c: New file.
503         * pthread_mutexattr_getprotocol.c: New file.
504         * pthread_mutexattr_setprotocol.c: New file.
506 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
508         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
510 2006-02-27  Roland McGrath  <roland@redhat.com>
512         * sysdeps/pthread/Subdirs: List nptl here too.
513         * configure (libc_add_on_canonical): New variable.
515         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
517         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
518         self to get main source tree's file.
519         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
520         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
521         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
522         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
523         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
524         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
525         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
526         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
527         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
528         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
529         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
530         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
531         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
533         * Makefile: Use $(sysdirs) in vpath directive.
535         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
536         (CPPFLAGS-timer_routines.c): Likewise.
538         * Makeconfig (includes): Variable removed.
540 2006-02-26  Roland McGrath  <roland@redhat.com>
542         * sysdeps/generic/pt-raise.c: Moved to ...
543         * pt-raise.c: ... here.
544         * sysdeps/generic/lowlevellock.h: Moved to ...
545         * lowlevellock.h: ... here.
547 2006-02-23  Roland McGrath  <roland@redhat.com>
549         * descr.h (struct pthread): Add final member `end_padding'.
550         (PTHREAD_STRUCT_END_PADDING): Use it.
552 2006-02-20  Roland McGrath  <roland@redhat.com>
554         * sysdeps/mips: Directory removed, saved in ports repository.
555         * sysdeps/unix/sysv/linux/mips: Likewise.
557 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
559         * tst-robust1.c: Add second mutex to check that the mutex list is
560         handled correctly.
562 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
564         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
565         lll_robust_mutex_trylock, lll_robust_mutex_lock,
566         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
567         lll_robust_mutex_unlock): New macros.
568         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
569         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
570         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
571         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
572         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
574 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
576         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
577         definitions.
578         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
580 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
582         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
583         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
584         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
585         (lll_robust_mutex_unlock): Likewise.
587 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
589         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
590         Set robust_list.__next rather than robust_list.
591         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
592         (__pthread_list_t): New typedef.
593         (pthread_mutex_t): Replace __next and __prev fields with __list.
594         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
595         (__pthread_list_t): New typedef.
596         (pthread_mutex_t): Replace __next and __prev fields with __list.
597         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
598         (__pthread_list_t, __pthread_slist_t): New typedefs.
599         (pthread_mutex_t): Replace __next and __prev fields with __list.
600         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
601         (__pthread_list_t, __pthread_slist_t): New typedefs.
602         (pthread_mutex_t): Replace __next and __prev fields with __list.
603         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
604         (__pthread_list_t, __pthread_slist_t): New typedefs.
605         (pthread_mutex_t): Replace __next and __prev fields with __list.
606         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
607         (__pthread_slist_t): New typedef.
608         (pthread_mutex_t): Replace __next field with __list.
610 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
612         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
613         PTHREAD_MUTEX_OWNERDEAD.
614         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
615         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
616         * Makefile (libpthread-routines): Add lowlevelrobustlock.
617         * pthread_create.c (start_thread): Very much simplify robust_list loop.
618         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
619         to PTHREAD_MUTEX_INCONSISTENT.
620         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
621         * pthread_mutex_lock.c: Reimplement robust mutex handling.
622         * pthread_mutex_trylock.c: Likewise.
623         * pthread_mutex_timedlock.c: Likewise.
624         * pthread_mutex_unlock.c: Likewise.
625         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
626         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
627         lowlevelrobustlock.sym.
628         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
629         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
630         definitions.
631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
632         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
633         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
634         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
635         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
637 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
639         * allocatestack.c (allocate_stack): Initialize robust_list.
640         * init.c (__pthread_initialize_minimal_internal): Likewise.
641         * descr.h (struct xid_command): Pretty printing.
642         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
643         robust_list.  Adjust macros.
644         * pthread_create.c (start_thread): Adjust robust_list handling.
645         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
646         but the owner for all robust mutex types.
647         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
648         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
649         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
650         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
652         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
653         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
655 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
657         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
658         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
660 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
662         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
663         Return status.
664         (lll_futex_timed_wait): Define.
666 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
668         * tst-cancel4.c: Test ppoll.
670 2006-01-18  Andreas Jaeger  <aj@suse.de>
672         [BZ #2167]
673         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
674         (pthread_mutex_t): Follow changes for other archs.  Based on patch
675         by Jim Gifford <patches@jg555.com>.
677 2006-01-13  Richard Henderson  <rth@redhat.com>
679         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
681 2006-01-10  Roland McGrath  <roland@redhat.com>
683         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
684         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
685         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
686         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
687         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
688         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
689         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
690         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
691         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
692         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
694 2006-01-09  Roland McGrath  <roland@redhat.com>
696         * tst-initializers1-c89.c: New file.
697         * tst-initializers1-c99.c: New file.
698         * tst-initializers1-gnu89.c: New file.
699         * tst-initializers1-gnu99.c: New file.
700         * Makefile (tests): Add them.
701         (CFLAGS-tst-initializers1-c89.c): New variable.
702         (CFLAGS-tst-initializers1-c99.c): New variable.
703         (CFLAGS-tst-initializers1-gnu89.c): New variable.
704         (CFLAGS-tst-initializers1-gnu99.c): New variable.
706         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
707         Use __extension__ on anonymous union definition.
708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
709         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
710         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
711         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
712         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
714 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
716         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
717         Don't give the union a name because it changes the mangled name.
718         Instead name the struct for __data.
719         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
720         Likewise.
721         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
722         Likewise.
724 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
726         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
727         stack bias to mc_ftp field.
729 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
731         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
732         being too clever and reloading the futex value where it shouldn't.
734 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
736         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
737         correct type.
739 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
741         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
742         Add cfi directives.
744 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
746         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
747         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
748         rename in tcbhead_t.
750         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
751         Don't give the union a name because it changes the mangled name.
752         Instead name the struct for __data.
753         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
754         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
755         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
756         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
757         * pthread_create.c (start_thread): Adjust robust mutex free loop.
758         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
760 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
762         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
763         Return status.
764         (lll_futex_timed_wait): Define.
765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
766         * sysdeps/pthread/aio_misc.h: New file.
768 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
770         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
772 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
774         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
775         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
776         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
778 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
780         * tst-cancel24.cc: Use C headers instead of C++ headers.
782 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
784         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
785         sparc-linux configured glibc.
786         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
787         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
788         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
789         atomic_compare_and_exchange_val_24_acq instead of
790         atomic_compare_and_exchange_val_acq.
791         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
792         instead of atomic_exchange_rel.
793         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
794         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
795         file.
796         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
797         file.
798         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
799         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
800         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
801         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
802         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
803         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
804         New file.
805         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
806         New file.
807         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
808         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
809         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
810         file.
811         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
812         file.
813         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
815 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
817         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
818         mutex initializers.
820 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
822         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
823         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
824         THREAD_COPY_POINTER_GUARD): Define.
825         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
826         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
828 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
830         * version.c: Update copyright year.
832 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
834         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
835         .eh_frame section, use cfi_* directives.
836         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
838 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
840         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
841         now.
843 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
845         * sysdeps/pthread/sigaction.c: Removed.
846         * sigaction.c: New file.
847         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
849 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
851         * Makefile (tests): Add tst-signal7.
852         * tst-signal7.c: New file.
854 2005-12-27  Roland McGrath  <roland@redhat.com>
856         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
857         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
858         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
859         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
860         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
861         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
862         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
863         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
864         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
865         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
866         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
868 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
870         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
871         and __prev field to pthread_mutex_t.
872         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
873         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
874         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
875         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
876         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
877         to pthread_mutex_t.
879 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
881         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
882         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
883         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
884         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
885         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
886         and PTHREAD_MUTEXATTR_FLAG_BITS.
887         * descr.h (struct pthread): Add robust_list field and define
888         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
889         * pthread_mutexattr_getrobust.c: New file.
890         * pthread_mutexattr_setrobust.c: New file.
891         * pthread_mutex_consistent.c: New file.
892         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
893         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
894         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
895         Adjust pthread_mutex_t initializers.
896         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
897         field to pthread_mutex_t.
898         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
899         and __prev field to pthread_mutex_t.
900         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
901         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
902         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
903         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
904         * pthread_mutexattr_gettype.c: Likewise.
905         * pthread_mutexattr_setpshared.c: Likewise.
906         * pthread_mutexattr_settype.c: Likewise.
907         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
908         Initialize mutex kind according to robust flag.
909         * pthread_mutex_lock.c: Implement local robust mutex.
910         * pthread_mutex_timedlock.c: Likewise.
911         * pthread_mutex_trylock.c: Likewise.
912         * pthread_mutex_unlock.c: Likewise.
913         * pthread_create.c (start_thread): Mark robust mutexes which remained
914         locked as dead.
915         * tst-robust1.c: New file.
916         * tst-robust2.c: New file.
917         * tst-robust3.c: New file.
918         * tst-robust4.c: New file.
919         * tst-robust5.c: New file.
920         * tst-robust6.c: New file.
921         * tst-robust7.c: New file.
922         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
923         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
924         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
925         tst-robust5, tst-robust6, and tst-robust7.
927         * tst-typesizes.c: New file.
928         * Makefile (tests): Add tst-typesizes.
930         * tst-once3.c: More debug output.
932 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
934         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
935         missing after last change.
937         * version.c: Update copyright year.
939 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
941         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
942         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
943         * pthread_mutex_trylock.c: Likewise.
944         * pthread_mutex_timedlock.c: Likewise.
945         * pthread_mutex_unlock.c: Likewise.
947 2005-12-22  Roland McGrath  <roland@redhat.com>
949         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
950         so that #include_next's search location is not reset to the -I..
951         directory where <nptl/...> can be found.
953 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
955         [BZ #1913]
956         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
957         Fix unwind info.  Remove useless branch prediction prefix.
958         * tst-cancel24.cc: New file.
959         * Makefile: Add rules to build and run tst-cancel24.
961 2005-12-21  Roland McGrath  <roland@redhat.com>
963         * libc-cancellation.c: Use <> rather than "" #includes.
964         * pt-cleanup.c: Likewise.
965         * pthread_create.c: Likewise.
966         * pthread_join.c: Likewise.
967         * pthread_timedjoin.c: Likewise.
968         * pthread_tryjoin.c: Likewise.
969         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
970         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
971         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
972         * unwind.c: Likewise.
974 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
976         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
977         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
978         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
979         THREAD_COPY_POINTER_GUARD): Define.
981 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
983         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
984         rather than one.
985         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
986         THREAD_COPY_POINTER_GUARD): Define.
987         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
988         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
989         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
990         THREAD_COPY_POINTER_GUARD): Define.
991         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
992         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
993         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
994         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
995         Use PTR_DEMANGLE for B0 if defined.
997 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
999         * pthread_create.c (__pthread_create_2_1): Use
1000         THREAD_COPY_POINTER_GUARD if available.
1001         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1002         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1003         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1004         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1005         * sysdeps/x86_64/tls.h: Likewise.
1007 2005-12-15  Roland McGrath  <roland@redhat.com>
1009         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1011 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1013         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1014         sysdeps/generic.
1015         * errno-loc.c: New file.
1017 2005-12-12  Roland McGrath  <roland@redhat.com>
1019         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1020         adjustments before choosing stack size.  Update minimum stack size
1021         calculation to match allocate_stack change.
1023 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1025         * allocatestack.c (allocate_stack): Don't demand that there is an
1026         additional full page available on the stack beside guard, TLS, the
1027         minimum stack.
1029 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1031         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1032         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1034         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1035         compiling 32-bit code we must define __cleanup_fct_attribute.
1037 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1039         [BZ #1920]
1040         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1041         __attribute__ instead of __attribute.
1042         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1043         (__cleanup_fct_attribute): Likewise.
1045 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1047         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1048         a write barrier before writing libgcc_s_getcfa.
1050 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1052         * sysdeps/unix/sysv/linux/configure: Removed.
1054 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1056         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1057         optional init_array/fini_array support.
1059 2005-10-24  Roland McGrath  <roland@redhat.com>
1061         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1062         versioned_symbol use.
1064 2005-10-16  Roland McGrath  <roland@redhat.com>
1066         * init.c (__pthread_initialize_minimal_internal): Even when using a
1067         compile-time default stack size, apply the minimum that allocate_stack
1068         will require, and round up to page size.
1070 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1072         * Makefile ($(test-modules)): Remove static pattern rule.
1074 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1075             Ulrich Drepper  <drepper@redhat.com>
1077         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1078         alignment in callback function.
1079         * Makefile: Add rules to build and run tst-align3.
1080         * tst-align3.c: New file.
1082 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1084         * allocatestack.c (setxid_signal_thread): Add
1085         INTERNAL_SYSCALL_DECL (err).
1087 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1089         * allocatestack.c (setxid_signal_thread): Need to use
1090         atomic_compare_and_exchange_bool_acq.
1092 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1093             Jakub Jelinek  <jakub@redhat.com>
1095         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1096         CANCEL_RESTMASK.
1097         (struct pthread): Move specific_used field to avoid padding.
1098         Add setxid_futex field.
1099         * init.c (sighandler_setxid): Reset setxid flag and release the
1100         setxid futex.
1101         * allocatestack.c (setxid_signal_thread): New function.  Broken
1102         out of the bodies of the two loops in __nptl_setxid.  For undetached
1103         threads check whether they are exiting and if yes, don't send a signal.
1104         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1105         * pthread_create.c (start_thread): For undetached threads, check
1106         whether setxid bit is set.  If yes, wait until signal has been
1107         processed.
1109         * allocatestack.c (STACK_VARIABLES): Initialize them.
1110         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1112 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1114         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1115         waiters, awake all waiters on the associated mutex.
1117 2005-09-22  Roland McGrath  <roland@redhat.com>
1119         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1120         ../sysdeps/x86_64/hp-timing.h).
1122 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1124         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1125         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1126         (lll_futex_wake_unlock): Define.
1127         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1128         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1129         (lll_futex_wake_unlock): Define.
1130         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1131         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1132         (lll_futex_wake_unlock): Define.
1133         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1134         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1135         (lll_futex_wake_unlock): Define.
1136         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1137         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1138         (lll_futex_wake_unlock): Define.
1139         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1140         lll_futex_wake_unlock.
1141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1142         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1143         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1145         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1146         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1148 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1150         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1151         Fix typo in register name.
1153 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1155         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1156         Use __sigfillset.  Document that sigfillset does the right thing wrt
1157         to SIGSETXID.
1159 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1161         [BZ #1102]
1162         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1163         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1164         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1165         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1166         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1167         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1168         in the structure.
1169         * Makefile (tests): Add tst-initializers1.
1170         (CFLAGS-tst-initializers1.c): Set.
1171         * tst-initializers1.c: New test.
1173 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1175         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1176         Make sure __flags are located at offset 48 from the start of the
1177         structure.
1179 2005-07-02  Roland McGrath  <roland@redhat.com>
1181         * Makeconfig: Comment fix.
1183 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1185         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1186         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1187         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1188         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1189         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1190         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1191         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1192         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1193         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1194         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1196 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1198         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1199         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1200         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1201         fields.
1202         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1203         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1204         field.  Put in sysinfo field unconditionally.
1205         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1206         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1207         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1208         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1209         fields.
1210         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1211         * pthread_create.c (__pthread_create_2_1): Use
1212         THREAD_COPY_STACK_GUARD macro.
1213         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1214         tests.
1215         * tst-stackguard1.c: New file.
1216         * tst-stackguard1-static.c: New file.
1218 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1220         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1221         Invoke CGOTSETUP and CGOTRESTORE.
1222         (CGOTSETUP, CGOTRESTORE): Define.
1224 2005-05-29  Richard Henderson  <rth@redhat.com>
1226         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1227         (tf_write, tf_writev): Use it.
1228         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1229         the system minimum.
1231 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1233         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1234         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1235         __librt_*_asynccancel@local.
1237 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1239         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1240         all occurrences of JUMPTARGET.  Instead append @local to labels.
1242 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1244         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1245         size/alignment of struct pthread rather than tcbhead_t.
1246         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1247         Likewise.
1248         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1249         Likewise.
1250         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1251         Likewise.
1253 2005-05-19  Richard Henderson  <rth@redhat.com>
1255         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1256         __sync_val_compare_and_swap, not explicit _si variant.
1257         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1259 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1261         [BZ #915]
1262         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1264 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1266         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1267         .eh_frame section, use cfi_* directives.
1269 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1271         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1272         of "" includes.
1274 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1276         [BZ #1075]
1277         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1278         aio_write blocks.
1280 2005-04-27  Roland McGrath  <roland@redhat.com>
1282         * Makefile (tests): Remove tst-clock2.
1284         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1285         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1286         translating to the kernel clockid_t for our own process/thread clock.
1288         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1290 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1292         * old_pthread_cond_init.c: Include <errno.h>.
1293         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1294         process shared or uses clock other than CLOCK_REALTIME.
1295         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1297 2005-04-13  David S. Miller  <davem@davemloft.net>
1299         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1300         * sysdeps/sparc/sparc64/clone.S: New file.
1302 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1304         [BZ #1102]
1305         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1306         __inline instead of inline.
1307         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1309 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1311         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1312         functionally equivalent, but shorter instructions.
1313         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1314         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1315         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1316         Likewise.
1317         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1318         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1319         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1320         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1322         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1323         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1324         Likewise.
1325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1326         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1328         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1329         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1331 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1333         * sysdeps/mips/Makefile: New file.
1334         * sysdeps/mips/nptl-sysdep.S: New file.
1335         * sysdeps/mips/tcb-offsets.sym: New file.
1336         * sysdeps/mips/pthread_spin_lock.S: New file.
1337         * sysdeps/mips/pthread_spin_trylock.S: New file.
1338         * sysdeps/mips/pthreaddef.h: New file.
1339         * sysdeps/mips/tls.h: New file.
1340         * sysdeps/mips/jmpbuf-unwind.h: New file.
1341         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1342         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1343         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1344         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1345         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1346         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1347         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1348         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1349         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1350         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1352 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1354         [BZ #1112]
1355         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1356         variable to scerr.
1358 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1360         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1362 2005-02-25  Roland McGrath  <roland@redhat.com>
1364         * alloca_cutoff.c: Correct license text.
1365         * tst-unload.c: Likewise.
1366         * sysdeps/pthread/allocalim.h: Likewise.
1367         * sysdeps/pthread/pt-initfini.c: Likewise.
1368         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1369         * sysdeps/pthread/bits/sigthread.h: Likewise.
1370         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1371         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1373 2005-02-16  Roland McGrath  <roland@redhat.com>
1375         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1376         Use unsigned int * for ptr_nthreads.
1378 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1380         [BZ #721]
1381         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1382         gcc4.
1384 2005-02-07  Richard Henderson  <rth@redhat.com>
1386         [BZ #787]
1387         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1388         argument.
1390 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1392         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1393         order of arguments in invocation of atomic_add_zero.
1395 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1397         [BZ #737]
1398         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1399         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1400         at least gotntpoff relocation and addition.
1401         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1402         Likewise.
1403         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1404         Likewise.
1405         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1406         Likewise.
1408 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1410         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1411         entry for static tls deallocation fix.
1412         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1413         also contains information whether the memory pointed to is static
1414         TLS or not.
1415         * sysdeps/i386/tls.h: Likewise.
1416         * sysdeps/ia64/tls.h: Likewise.
1417         * sysdeps/powerpc/tls.h: Likewise.
1418         * sysdeps/s390/tls.h: Likewise.
1419         * sysdeps/sh/tls.h: Likewise.
1420         * sysdeps/sparc/tls.h: Likewise.
1421         * sysdeps/x86_64/tls.h: Likewise.
1423 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1425         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1427 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1429         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1430         %esp.
1431         * Makefile (tests): Add tst-align2.
1432         * tst-align2.c: New test.
1433         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1434         -mpreferred-stack-boundary=4.
1436 2004-12-18  Roland McGrath  <roland@redhat.com>
1438         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1439         New file removed withdrawn for the moment.
1441 2004-12-17  Richard Henderson  <rth@redhat.com>
1443         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1444         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1446 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1448         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1449         Increased PTHREAD_STACK_MIN.
1451         * tst-context1.c (stacks): Use bigger stack size.
1453 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1455         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1456         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1458 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1460         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1461         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1462         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1464 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1466         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1468 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1470         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1471         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1473         * tst-getpid1.c: If child crashes, report this first.  Print which
1474         signal.
1476 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1478         * init.c (__pthread_initialize_minimal_internal): Also unblock
1479         SIGSETXID.
1481 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1483         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1484         _POSIX_THREAD_CPUTIME): Define to 0.
1485         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1486         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1487         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1488         __timer_signal_thread_tclk): Remove.
1489         (init_module): Remove their initialization.
1490         (thread_cleanup): Remove their cleanup assertions.
1491         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1492         __timer_signal_thread_tclk): Remove.
1493         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1494         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1495         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1497 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1499         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1500         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1502         * Makefile (tests): Add tst-getpid2.
1503         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1504         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1505         * tst-getpid2.c: New test.
1507 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1509         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1511 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1513         * Makefile (tests): Add tst-getpid1.
1514         * tst-getpid1.c: New file.
1515         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1516         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1518 2004-12-02  Roland McGrath  <roland@redhat.com>
1520         * Makefile (libpthread-nonshared): Variable removed.
1521         ($(objpfx)libpthread_nonshared.a): Target removed.
1522         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1523         These are now handled by generic magic from
1524         libpthread-static-only-routines being set.
1526 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1528         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1529         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1530         _POSIX_THREAD_PRIO_PROTECT): Define.
1531         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1532         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1533         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1535 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1537         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1538         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1539         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1540         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1541         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1542         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1543         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1545 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1547         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1549         * Makefile (libpthread-routines): Add pthread_setschedprio.
1550         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1551         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1552         * pthread_setschedprio.c: New file.
1554 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1556         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1557         * pthread_cancel.c (pthread_create): Likewise.
1559         * Makefile (libpthread-routines): Add vars.
1560         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1561         * init.c (__default_stacksize, __is_smp): Remove.
1562         * vars.c: New file.
1563         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1564         and define a wrapper macro.
1565         (PTHREAD_STATIC_FN_REQUIRE): Define.
1566         * allocatestack.c (__find_thread_by_id): Undefine.
1567         * pthread_create (__pthread_keys): Remove.
1568         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1569         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1570         PTHREAD_STATIC_FN_REQUIRE.
1572 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1574         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1575         parameter to REGISTER macro.
1577 2004-11-17  Roland McGrath  <roland@redhat.com>
1579         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1580         Make sure SIGCANCEL is blocked as well.
1582 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1584         * sysdeps/pthread/setxid.h: New file.
1585         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1586         (struct xid_command): Add forward decl.
1587         (struct pthread_functions): Change return type of __nptl_setxid hook
1588         to int.
1589         * pthreadP.h (__nptl_setxid): Change return type to int.
1590         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1591         calling thread, return its return value and set errno on failure.
1592         * descr.h (struct xid_command): Change id type to long array.
1594         * Makefile: Add rules to build and test tst-setuid1 and
1595         tst-setuid1-static.
1596         * tst-setuid1.c: New test.
1597         * tst-setuid1-static.c: New test.
1599 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1601         * Makefile (tests): Add tst-exit3.
1602         * tst-exit3.c: New test.
1604 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1606         * Makefile (tests): Add tst-exit2.
1607         * tst-exit2.c: New file.
1609 2004-11-09  Roland McGrath  <roland@redhat.com>
1611         [BZ #530]
1612         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1613         here, before calling clone.
1614         * pthread_create.c (start_thread): Don't do it here.
1616 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1618         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1620 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1622         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1623         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1624         assembler warning.
1626 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1628         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1629         if sched_priority is not between minprio and maxprio.
1631 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1633         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1634         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1636         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1637         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1639 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1641         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1642         not-cancelable I/O functions.
1644 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1646         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1647         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1648         make sure 2 is stored in the futex and we looked at the old value.
1649         Fix a few other problems to return the correct value.
1651 2004-10-14  Richard Henderson  <rth@redhat.com>
1653         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1654         make gcc4 happy.
1656 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1658         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1659         of pthread-functions.h and pthreaddef.h.
1660         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1662         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1663         Change __data.__nwaiters from int to unsigned int.
1665         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1666         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1668         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1669         before return type.
1671         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1672         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1674 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1676         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1677         test fails, remove message queue.
1678         (tf_msgsnd): Likewise.
1680 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1682         * tst-clock1.c: Change #ifdef to #if defined.
1683         * tst-clock2.c: Likewise.
1684         * tst-cond11.c: Likewise.
1686         * sysdeps/pthread/timer_create.c (timer_create): Use
1687         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1688         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1689         THREAD_CPUTIME.
1691 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1693         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1694         _POSIX_THREAD_CPUTIME): Define to 0.
1696 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1698         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1699         and _POSIX_THREAD_CPUTIME to zero.
1700         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1701         * tst-barrier2.c: Fix testing for POSIX feature.
1702         * tst-clock1.c: Likewise.
1703         * tst-clock2.c: Likewise.
1704         * tst-cond11.c: Likewise.
1705         * tst-cond4.c: Likewise.
1706         * tst-cond6.c: Likewise.
1707         * tst-flock2.c: Likewise.
1708         * tst-mutex4.c: Likewise.
1709         * tst-mutex9.c: Likewise.
1710         * tst-rwlock12.c: Likewise.
1711         * tst-rwlock4.c: Likewise.
1712         * tst-signal1.c: Likewise.
1713         * tst-spin2.c: Likewise.
1714         * sysdeps/pthread/posix-timer.h: Likewise.
1715         * sysdeps/pthread/timer_create.c: Likewise.
1716         * sysdeps/pthread/timer_routines.c: Likewise.
1718 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1720         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1721         (__lll_mutex_timedlock_wait): Address futex correctly.
1723         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1724         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1725         make sure 2 is stored in the futex and we looked at the old value.
1726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1727         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1728         which might very well made the code not working at all before.
1729         [BZ #417]
1731 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1733         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1734         allow SIGSETXID to be sent.
1735         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1736         for SIGSETXID to be defined.
1737         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1738         SIGSETXID cannot be blocked.
1740         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1741         Add __extension__ to long long types.
1742         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1743         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1744         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1745         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1746         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1747         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1748         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1750 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1752         * descr.h (struct pthread): Add stopped_start field.
1753         * sysdeps/pthread/createthread.c (create_thread): Set
1754         start_stopped flag in descriptor for new thread appropriately.
1755         * pthread_create.c (start_thread): Only take lock to be stopped on
1756         startup if stopped_start flag says so.
1758 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1760         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1761         is created detached and if yes, do not try to free the stack in case
1762         the thread creation failed.
1763         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1764         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1765         case there has been no error.  [BZ #405]
1767         * pthread_create.c (start_thread): Don't wait for scheduler data
1768         etc to be set at the beginning of the function.  The cancellation
1769         infrastructure must have been set up.  And enable async
1770         cancellation before potentially going to sleep.  [BZ #401]
1772 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1774         * Versions: Remove exports for pthread_set*id_np functions.
1775         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1776         for now.
1777         * Makefile: Don't build pthread_set*id code for now.
1779 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1781         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1782         internal use.
1783         * allocatestack.c (__nptl_setxid): New function.
1784         * descr.h (struct xid_command): Define type.
1785         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1786         (sighandler_setxid): New function.
1787         (__pthread_initialize_minimal): Register sighandler_setxid for
1788         SIGCANCEL.
1789         * pt-allocrtsig.c: Update comment.
1790         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1791         Declare __nptl_setxid.
1792         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1793         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1794         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1795         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1796         and pthread_setresuid_np.
1797         * pthread_setgid_np.c: New file.
1798         * pthread_setuid_np.c: New file.
1799         * pthread_setegid_np.c: New file.
1800         * pthread_seteuid_np.c: New file.
1801         * pthread_setregid_np.c: New file.
1802         * pthread_setreuid_np.c: New file.
1803         * pthread_setresgid_np.c: New file.
1804         * pthread_setresuid_np.c: New file.
1805         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1806         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1807         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1808         and pthread_setresuid_np.
1809         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1810         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1811         pthread_setregid, and pthread_setresgid.
1813 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1815         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1816         ENOMEM when out of memory.
1818 2004-09-10  Roland McGrath  <roland@redhat.com>
1820         [BZ #379]
1821         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1822         code, since we don't try to use the broken CLONE_STOPPED any more.
1823         * pthread_create.c (start_thread): Likewise.
1825 2004-09-15  Richard Henderson  <rth@redhat.com>
1827         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1829 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1831         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1832         (__libc_unwind_longjmp): Delete macro and declare as function.
1833         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1834         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1835         nptl directory.
1836         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1837         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1838         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1840 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1842         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1843         for __USE_XOPEN2K.
1844         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1845         types also for __USE_XOPEN2K.
1846         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1847         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1848         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1849         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1850         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1851         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1852         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1853         [BZ #320]
1855 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1857         * sysdeps/pthread/pthread.h
1858         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1859         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1860         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1861         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1862         [BZ #375]
1864 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1866         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1867         PSEUDO to be used with . prefix.
1869         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1870         Use atomic_increment instead of atomic_exchange_and_add.
1871         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1872         Likewise.
1873         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1874         Likewise.
1875         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1876         Likewise.
1878         * allocatestack.c (allocate_stack): Use atomic_increment_val
1879         instead of atomic_exchange_and_add.
1880         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1881         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1882         Likewise.
1883         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1884         Likewise.
1886         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1887         the initialization function might throw.
1889 2005-09-05  Richard Henderson  <rth@redhat.com>
1891         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1892         Move definition inside libpthread, libc, librt check.  Provide
1893         definition for rtld.
1895 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1897         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1898         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1899         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1900         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1901         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1902         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1903         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1904         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1905         * unwind.c: Use it.
1907         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1908         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1909         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1910         Likewise.
1911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1912         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1913         this is the last waiter, signal pthread_cond_destroy caller and
1914         avoid using the pthread_cond_t structure after unlock.
1915         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1916         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1917         Read clock type from the least significant bits of __nwaiters instead
1918         of __clock.
1919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1920         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1922 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1924         [BZ #342]
1925         * Makefile (tests): Add tst-cond20 and tst-cond21.
1926         * tst-cond20.c: New test.
1927         * tst-cond21.c: New test.
1928         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1929         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1930         it unsigned int.
1931         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1932         Likewise.
1933         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1934         (pthread_cond_t): Likewise.
1935         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1936         Likewise.
1937         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1938         Likewise.
1939         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1940         Likewise.
1941         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1942         (cond_nwaiters): New.
1943         (clock_bits): New.
1944         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1945         if there are waiters not signalled yet.
1946         Wait until all already signalled waiters wake up.
1947         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1948         __nwaiters.  If pthread_cond_destroy has been called and this is the
1949         last waiter, signal pthread_cond_destroy caller and avoid using
1950         the pthread_cond_t structure after unlock.
1951         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1952         decrement it when leaving.  If pthread_cond_destroy has been called
1953         and this is the last waiter, signal pthread_cond_destroy caller.
1954         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1955         Likewise.  Read clock type from the least significant bits of
1956         __nwaiters instead of __clock.
1957         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1958         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1959         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1960         clock type just from the last COND_CLOCK_BITS bits of value.
1961         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1962         instead of __clock, just from second bit of condattr's value.
1964 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1966         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1967         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1968         != 64.
1969         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1971 2004-08-15  Roland McGrath  <roland@frob.com>
1973         * pthread_atfork.c: Update copyright terms including special exception
1974         for these trivial files, which are statically linked into executables
1975         that use dynamic linking for the significant library code.
1977 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1979         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1980         pthread_rwlock_rdlock.
1981         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1982         Decrease __nr_readers_queued after reacquiring lock.
1983         * sysdeps/pthread/pthread_rwlock_timedrdlock
1984         (pthread_rwlock_timedrdlock): Likewise.
1985         Reported by Bob Cook <bobcook47@hotmail.com>.
1987 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1989         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1990         before pthread_barrier_wait.
1992 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1995         Remove unnecessary exception handling data.
1997 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1999         [BZ #284]
2000         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2001         instead of clockid_t.
2003 2004-07-21  Roland McGrath  <roland@redhat.com>
2005         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2007 2004-07-19  Roland McGrath  <roland@redhat.com>
2009         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2011 2004-07-02  Roland McGrath  <roland@redhat.com>
2013         * configure: Don't exit.
2015 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2017         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2018         (__pthread_cond_timedwait): Check for invalid nanosecond in
2019         timeout value.
2021 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2023         * Makefile: Add rules to build and run tst-fini1.
2024         * tst-fini1.c: New file.
2025         * tst-fini1mod.c: New file.
2027 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2029         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2030         if no cancellation support is needed.
2031         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2032         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2033         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2034         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2035         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2036         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2037         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2038         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2039         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2041         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2042         only if not already defined.
2044 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2046         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2047         constraint "m" instead of "0" for futex.
2049         * shlib-versions: Add powerpc64-.*-linux.*.
2051 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2054         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2055         for valid tv_nsec.
2056         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2057         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2058         bits.
2060 2004-06-29  Roland McGrath  <roland@redhat.com>
2062         * Banner: NPTL no longer has its own version number.
2063         * Makefile (nptl-version): Variable removed.
2064         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2065         using $(version), the glibc version number.
2067 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2069         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2070         Fix branch offset for a PLT entry.
2071         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2072         Likewise.
2073         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2074         Likewise.
2075         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2076         Likewise.
2077         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2078         Likewise.
2080 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2082         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2083         unconditionally.
2085 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2087         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2088         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2089         instead of tv_sec.
2090         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2091         (pthread_rwlock_timedrdlock): Likewise.
2093 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2095         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2096         Set __r7 to val, not mutex.
2098 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2100         * Makefile: Add rules to build tst-rwlock14.
2101         * tst-rwlock14.c: New file.
2103 2004-06-24  Boris Hu  <boris.hu@intel.com>
2105         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2106         check.
2107         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2109 2004-06-19  Andreas Jaeger  <aj@suse.de>
2111         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2112         assembler in last patch.
2114 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2116         * sysdeps/pthread/pthread_cond_timedwait.c
2117         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2118         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2119         (__pthread_cond_timedwait): Check for invalid nanosecond in
2120         timeout value.
2121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2122         * tst-cond19.c: New file.
2123         * Makefile: Add rules to build and run tst-cond19.
2125 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2127         * tst-context1.c (GUARD_PATTERN): Defined.
2128         (tst_context_t): Define struct containing ucontext_t & guard words.
2129         (ctx): Declare as an array of tst_context_t.
2130         (fct): Verify uc_link & guard words are still valid.
2131         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2133 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2135         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2136         Add __data.__futex field, reshuffle __data.__clock.
2137         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2138         (__pthread_cond_signal): Increment __futex at the same time as
2139         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2140         address of low 32-bits of __wakeup_seq to futex syscall.
2141         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2142         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2143         releasing internal lock to FUTEX_WAIT.
2144         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2145         (__pthread_cond_timedwait): Likewise.
2146         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2147         (FUTEX_CMP_REQUEUE): Define.
2148         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2149         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2150         Pass __futex value from before the unlock and __futex address instead
2151         of address of low 32-bits of __wakeup_seq to futex syscall.
2152         Fallback to FUTEX_WAKE all on any errors.
2154 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2156         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2157         comment typo.
2158         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2159         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2160         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2161         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2162         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2164 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2166         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2167         Add memory clobber to inline assembly.
2168         (__lll_mutex_trylock): Likewise.
2169         (__lll_mutex_cond_trylock): Likewise.
2171 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2173         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2174         Pass val argument as 6th system call argument in %r7.
2176 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2178         * Makefile (tests): Add tst-cond16.
2179         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2180         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2181         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2182         Add __data.__futex field, reshuffle __data.__clock.
2183         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2184         (__pthread_cond_signal): Increment __futex at the same time as
2185         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2186         address of low 32-bits of __wakeup_seq to futex syscall.
2187         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2188         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2189         releasing internal lock to FUTEX_WAIT.
2190         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2191         (__pthread_cond_timedwait): Likewise.
2192         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2193         (FUTEX_CMP_REQUEUE): Define.
2194         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2195         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2196         Pass __futex value from before the unlock and __futex address instead
2197         of address of low 32-bits of __wakeup_seq to futex syscall.
2198         Fallback to FUTEX_WAKE all on any errors.
2199         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2200         Define.
2201         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2202         internally.  Return non-zero if error, zero if success.
2203         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2204         Add __data.__futex field, reshuffle __data.__clock.
2205         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2206         Define.
2207         (lll_futex_requeue): Add val argument, return 1 unconditionally
2208         for the time being.
2209         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2210         Add __data.__futex field, reshuffle __data.__clock.
2211         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2212         Define.
2213         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2214         internally.  Return non-zero if error, zero if success.
2215         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2216         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2217         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2218         Define.
2219         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2220         internally.  Return non-zero if error, zero if success.
2221         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2222         Add __data.__futex field, reshuffle __data.__clock.
2223         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2224         Define.
2225         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2226         internally.  Return non-zero if error, zero if success.
2227         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2228         Add __data.__futex field, reshuffle __data.__clock.
2229         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2230         Add __data.__futex field, reshuffle __data.__clock.
2231         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2232         Increment __futex at the same time as __wakeup_seq or __total_seq.
2233         Pass address of __futex instead of address of low 32-bits of
2234         __wakeup_seq to futex syscall.
2235         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2236         Pass __futex value from before releasing internal lock
2237         to FUTEX_WAIT.
2238         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2239         Likewise.  Avoid unnecessary shadowing of variables.
2240         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2241         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2242         unlock and __futex address instead of address of low 32-bits of
2243         __wakeup_seq to futex_requeue macro, adjust for new return value
2244         meaning.
2245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2246         (__pthread_cond_signal): Increment __futex at the same time as
2247         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2248         address of low 32-bits of __wakeup_seq to futex syscall.
2249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2250         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2251         releasing internal lock to FUTEX_WAIT.
2252         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2253         (__pthread_cond_timedwait): Likewise.
2254         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2255         (FUTEX_CMP_REQUEUE): Define.
2256         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2257         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2258         Pass __futex value from before the unlock and __futex address instead
2259         of address of low 32-bits of __wakeup_seq to futex syscall.
2260         Fallback to FUTEX_WAKE all on any errors.
2262 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2264         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2265         Add nop to align the end of critical section.
2266         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2268 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2270         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2271         Add __broadcast_seq field.
2272         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2273         all waiters as woken with woken_seq and bump broadcast counter.
2274         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2275         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2276         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2277         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2279 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2282         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2283         Reported by Kaz Kojima.
2285 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2287         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2289 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2291         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2292         __broadcast_seq with bc_seq after acquiring internal lock instead of
2293         before it.
2295 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2297         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2298         compilation.
2299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2300         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2301         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2302         (pthread_cond_t): Add __data.__broadcast_seq field.
2303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2304         (FRAME_SIZE): Define.
2305         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2306         Comment typo fixes.
2307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2308         Define.
2309         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2310         typo fixes.
2311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2312         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2313         fixes.
2315 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2317         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2318         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2319         Add __broadcast_seq field.
2320         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2321         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2322         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2323         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2324         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2326         all waiters as woken with woken_seq and bump broadcast counter.
2327         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2329         __broadcast_seq field.
2330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2331         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2332         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2333         * pthread_cond_init.c: Initialize __broadcast_seq field.
2334         * Makefile (tests): Add tst-cond17 and tst-cond18.
2335         Add .NOTPARALLEL goal.
2336         * tst-cond16.c: New file.  From Jakub.
2337         * tst-cond17.c: New file.  From Jakub.
2338         * tst-cond18.c: New file.  From Jakub.
2340 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2342         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2343         unwind info.
2345         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2346         Parametrize frame size.  Correct some unwind info.
2347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2349 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2351         * tst-stack3.c: Note testing functionality beyond POSIX.
2353 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2355         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2356         Change conditional from ifdef to if.
2358 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2360         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2361         SYSDEP_CANCEL_ERROR): Define.
2362         (PSEUDO): Use it.
2364 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2366         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2368 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2370         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2372 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2374         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2375         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2376         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2377         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2379 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2381         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2382         thread has all signals blocked.
2384 2004-04-18  Andreas Jaeger  <aj@suse.de>
2386         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2387         (SEM_VALUE_MAX): Add missing brace.
2389 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2391         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2392         in rt subdir.
2393         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2394         * sysdeps/pthread/tst-mqueue8x.c: New test.
2395         * tst-cancel4.c: Update comment about message queues.
2397         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2398         return it_value { 0, 0 }.
2399         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2400         like SIGEV_SIGNAL.
2401         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2402         assertion for SIGEV_NONE.
2403         (thread_attr_compare): Compare all attributes, not just a partial
2404         subset.
2406 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2408         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2410 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2412         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2413         Just use a plain number.
2414         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2415         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2416         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2417         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2418         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2419         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2420         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2422 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2424         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2425         frame info.
2426         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2428 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2430         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2431         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2432         of calling sigwaitinfo.
2434 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2436         * allocatestack.c (allocate_stack): Set reported_guardsize
2437         unconditionally.
2438         * pthread_getattr_np.c (pthread_getattr_np): Use
2439         reported_guardsize instead of guardsize.
2440         * descr.h (struct pthread): Add reported_guardsize field.
2442 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2444         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2446 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2448         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2450 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2452         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2453         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2454         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2455         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2456         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2457         Define.
2458         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2459         (_POSIX_MESSAGE_PASSING): Define.
2460         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2461         (_POSIX_MESSAGE_PASSING): Define.
2462         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2463         (_POSIX_MESSAGE_PASSING): Define.
2465 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2467         * tst-context1.c (fct): Check whether correct stack is used.
2469 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2471         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2472         matching constraints for asm mem parameters.
2474         * tst-clock2.c (tf): Don't define unless needed.
2476 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2478         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2479         $(gnulib).
2481 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2483         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2484         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2485         * pthreadP.h: Declare __nptl_deallocate_tsd.
2486         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2487         Adjust caller.
2489         * Makefile (tests): Add tst-tsd5.
2490         * tst-tsd5.c: New file.
2492 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2494         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2495         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2496         is SHLIB_COMPAT check.
2497         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2498         (__pthread_attr_getaffinity_old): Likewise.
2499         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2500         (__pthread_getaffinity_old): Likewise.
2501         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2502         (__pthread_setaffinity_old): Likewise.
2504 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2506         * allocatestack.c (_make_stacks_executable): Call
2507         _dl_make_stack_executable first.
2509 2004-03-24  Roland McGrath  <roland@redhat.com>
2511         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2512         constraint instead of "0".
2514 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2516         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2517         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2519         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2520         code to avoid warning.
2522 2004-03-24  Andreas Jaeger  <aj@suse.de>
2524         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2525         (__pthread_attr_setaffinity_old): Remove const.
2527 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2529         * sysdeps/unix/sysv/linux/smp.h: New file.
2530         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2531         * init.c: Define __is_smp.
2532         (__pthread_initialize_minimal_internal): Call is_smp_system to
2533         initialize __is_smp.
2534         * pthreadP.h: Declare __is_smp.
2535         Define MAX_ADAPTIVE_COUNT is necessary.
2536         * pthread_mutex_init.c: Add comment regarding __spins field.
2537         * pthread_mutex_lock.c: Implement adaptive mutex type.
2538         * pthread_mutex_timedlock.c: Likewise.
2539         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2540         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2541         Add __spins field.
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/powerpc/bits/pthreadtypes.h: Likewise.
2545         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2546         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2547         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2548         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2549         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2550         lll_mutex_cond_trylock.
2551         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2552         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2553         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2554         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2555         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2556         Define BUSY_WAIT_NOP.
2557         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2558         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2560         * tst-mutex5.c: Add support for testing adaptive mutexes.
2561         * tst-mutex7.c: Likewise.
2562         * tst-mutex5a.c: New file.
2563         * tst-mutex7a.c: New file.
2564         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2566         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2567         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2568         vgettimeofday call might destroy the content.
2570         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2571         @pause in the loop.
2573         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2574         No need to restrict type of ret.  Make it int.  Add comment.
2576         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2577         Remove unnecessary setne instruction.
2579 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2581         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2582         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2583         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2584         If realloc fails, break out of the loop.
2586 2004-03-20  Andreas Jaeger  <aj@suse.de>
2588         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2589         (__pthread_setaffinity_old): Fix interface.
2590         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2591         (__pthread_getaffinity_old): Likewise.
2593         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2594         (__pthread_setaffinity_new): Remove duplicate declaration.
2596 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2598         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2599         the return value to a safe register.
2600         (CDISABLE): Set the function argument correctly.
2602 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2604         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2605         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2606         Rewrite so that only one locked memory operation per round is needed.
2607         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2608         (pthread_barrier_wait): After wakeup, release lock only when the
2609         last thread stopped using the barrier object.
2610         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2611         (__pthread_cond_wait): Don't store mutex address if the current
2612         value is ~0l.  Add correct cleanup support and unwind info.
2613         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2614         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2615         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2616         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2617         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2618         Add correct cleanup support and unwind info.
2619         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2620         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2621         information for syscall wrappers.
2623 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2625         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2626         cpusetsize field, remove next.
2627         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2628         parameter for size of the CPU set.
2629         (pthread_setaffinity_np): Likewise.
2630         (pthread_attr_getaffinity_np): Likewise.
2631         (pthread_attr_setaffinity_np): Likewise.
2632         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2633         interface change, keep compatibility code.
2634         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2635         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2636         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2637         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2638         __pthread_getaffinity_np.
2639         * Versions: Add version for changed interfaces.
2640         * tst-attr3.c: Adjust test for interface change.
2641         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2642         increasing buffer sizes.
2643         * pthread_attr_destroy.c: Remove unused list handling.
2644         * pthread_attr_init.c: Likewise.
2646 2004-03-17  Roland McGrath  <roland@redhat.com>
2648         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2649         first argument to clock_getres so we ever enable kernel timers.
2651 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2653         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2655 2004-03-12  Richard Henderson  <rth@redhat.com>
2657         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2658         oldvalue from CENABLE to CDISABLE.
2660 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2662         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2663         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2664         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2665         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2667 2004-03-11  Richard Henderson  <rth@redhat.com>
2669         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2670         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2671         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2673 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2675         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2676         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2677         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2679 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2681         * forward.c (__pthread_cond_broadcast_2_0,
2682         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2683         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2684         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2686 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2688         * sysdeps/sh/tcb-offsets.sym: Add PID.
2689         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2690         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2692 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2694         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2695         include <sysdep-cancel.h>, vfork is no cancellation point.
2696         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2697         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2698         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2700 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2702         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2703         libc_hidden_def.
2704         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2705         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2706         Likewise.
2707         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2708         Likewise.
2709         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2710         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2711         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2712         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2713         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2715         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2716         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2717         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2718         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2719         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2720         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2722         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2723         a local register for saving old PID.  Negate PID in parent upon exit.
2725         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2726         tcb-offsets.h.
2727         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2728         before syscall, set to the old value in the parent afterwards.
2729         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2730         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2731         tcb-offsets.h.
2732         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2733         before syscall, set to the old value in the parent afterwards.
2734         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2735         * sysdeps/s390/tcb-offsets.sym: Add PID.
2737         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2738         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2739         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2740         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2741         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2742         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2744 2004-03-10  Andreas Schwab  <schwab@suse.de>
2746         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2747         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2748         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2750 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2752         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2753         * tst-cancel21.c (do_one_test): Likewise.
2754         Reported by Gordon Jin <gordon.jin@intel.com>.
2756 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2758         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2759         if non-zero and set to INT_MIN if zero.
2760         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2761         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2762         (SAVE_PID, RESTORE_PID): Define.
2763         (__vfork): Use it.
2764         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2765         Use relative path to avoid including NPTL i386/vfork.S.
2766         (SAVE_PID, RESTORE_PID): Define.
2767         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2768         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2769         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2770         tst-vfork2x.
2771         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2772         * tst-vfork1.c: New test.
2773         * tst-vfork2.c: New test.
2774         * tst-vfork1x.c: New test.
2775         * tst-vfork2x.c: New test.
2777 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2779         * sysdeps/i386/tcb-offsets.sym: Add PID.
2780         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2781         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2782         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2784 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2786         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2788 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2790         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2791         _rtld_global_ro.
2793 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2795         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2796         _rtld_global_ro.
2798         * tst-once4.c: Remove unnecessary macro definition.
2800         * tst-mutex7.c (do_test): Limit thread stack size.
2801         * tst-once2.c (do_test): Likewise.
2802         * tst-tls3.c (do_test): Likewise.
2803         * tst-tls1.c (do_test): Likewise.
2804         * tst-signal3.c (do_test): Likewise.
2805         * tst-kill6.c (do_test): Likewise.
2806         * tst-key4.c (do_test): Likewise.
2807         * tst-join4.c (do_test): Likewise.
2808         * tst-fork1.c (do_test): Likewise.
2809         * tst-context1.c (do_test): Likewise.
2810         * tst-cond2.c (do_test): Likewise.
2811         * tst-cond10.c (do_test): Likewise.
2812         * tst-clock2.c (do_test): Likewise.
2813         * tst-cancel10.c (do_test): Likewise.
2814         * tst-basic2.c (do_test): Likewise.
2815         * tst-barrier4.c (do_test): Likewise.
2817 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2819         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2821 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2823         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2824         (__pthread_cond_timedwait): Optimize wakeup test.
2825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2826         (__pthread_cond_wait): Likewise.
2827         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2828         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2829         Likewise.
2831 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2833         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2834         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2835         the atomic instruction needed.
2836         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2837         (__lll_mutex_lock_wait): Likewise.
2839 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2841         * Makefile (tests): Add tst-cond14 and tst-cond15.
2842         * tst-cond14.c: New file.
2843         * tst-cond15.c: New file.
2845 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2847         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2848         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2849         needs to be implemented differently to be useful.
2851 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2853         * pthread_attr_setschedparam.c: Don't test priority against limits
2854         here.  Set ATTR_FLAG_SCHED_SET flag.
2855         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2856         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2857         from parent thread to child.  If attribute is used and scheduling
2858         parameters are not inherited, copy parameters from attribute or
2859         compute them.  Check priority value.
2860         * pthread_getschedparam.c: If the parameters aren't known yet get
2861         them from the kernel.
2862         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2863         ATTR_FLAG_POLICY_SET flag for thread.
2864         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2865         and ATTR_FLAG_POLICY_SET.
2867         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2869         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2870         fail if stack address hasn't been set.  Just return 0.
2872 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2874         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2875         libpthread for the files in this list.
2876         (CFLAGS-tst-unload): Removed.
2877         * tst-unload.c (do_test): Don't use complete path for
2878         LIBPHREAD_SO.
2880         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2881         tst-_res1mod2.
2883 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2885         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2886         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2887         operation per round is needed.
2888         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2889         (__lll_mutex_lock_wait): Likewise.
2891 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2893         * tst-cancel9.c (cleanup): Don't print to stderr.
2895 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2897         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2899 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2901         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2902         (__syscall_error_handler2): Call CDISABLE.
2903         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2904         (__syscall_error_handler2): Call CDISABLE.
2906         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2907         Release lock before the loop, don't reacquire it.
2909         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2911 2004-02-19  Andreas Schwab  <schwab@suse.de>
2913         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2914         Fix last change.
2916 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2918         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2919         (pthread_barrier_wait): After wakeup, release lock only when the
2920         last thread stopped using the barrier object.
2921         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2922         (pthread_barrier_wait): Likewise.
2923         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2924         Likewise.
2925         * Makefile (tests): Add tst-barrier4.
2926         * tst-barrier4.c: New file.
2928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2929         (__pthread_cond_timedwait): Perform timeout test while holding
2930         internal lock to prevent wakeup race.
2931         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2932         * sysdeps/pthread/pthread_cond_timedwait.c
2933         (__pthread_cond_timedwait): Likewise.
2934         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2935         (__pthread_cond_timedwait): Likewise.
2937 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2939         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2940         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2941         * Makefile (tests): Add tst-rwlock13.
2942         * tst-rwlock13.c: New test.
2944 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2947         (__condvar_tw_cleanup): Little optimization.
2948         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2950 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2952         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2953         libpthread as "lib" parameter to SHLIB_COMPAT.
2954         (__novmx_siglongjmp): Fix typo in function name.
2955         (__novmx_longjmp): Fix typo in function name.
2957 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2959         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2960         __builtin_expect.
2962         * sysdeps/generic/pt-longjmp.c: Moved to...
2963         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2965 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2967         * Makefile (libpthread-routines): Add pt-cleanup.
2968         * pt-longjmp.c: Removed.
2969         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2970         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2971         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2972         Version longjmp, siglongjmp for GLIBC_2.3.4.
2973         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2975 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2977         * sysdeps/pthread/pthread_cond_timedwait.c
2978         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2979         Reuse code.  Add __builtin_expects.
2981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2982         (__pthread_cond_timedwait): Get internal lock in case timeout has
2983         passed before the futex syscall.
2984         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2986 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2988         * allocatestack.c: Pretty printing.
2990         * sysdeps/pthread/createthread.c (create_thread): Don't add
2991         CLONE_DETACHED bit if it is not necessary.
2993 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2995         * pthread_getattr_np.c: Include ldsodefs.h.
2997 2004-01-16  Richard Henderson  <rth@redhat.com>
2999         * allocatestack.c: Don't declare __libc_stack_end.
3000         * init.c (__pthread_initialize_minimal_internal): Likewise.
3001         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3003 2004-01-15  Richard Henderson  <rth@redhat.com>
3005         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3006         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3007         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3008         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3009         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3010         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3011         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3012         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3014 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3016         * init.c (pthread_functions): Make array const.
3018 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3020         * allocatestack.c (__make_stacks_executable): Change interface.
3021         Check parameters.  Pass parameter on to libc counterpart.
3022         * pthreadP.h: Change declaration.
3024 2004-01-13  Richard Henderson  <rth@redhat.com>
3026         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3027         prototype form.
3028         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3029         Likewise.
3031         * sysdeps/alpha/Makefile: New file.
3032         * sysdeps/alpha/tcb-offsets.sym: New file.
3033         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3034         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3036         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3037         on powerpc version.
3039 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3041         * Makefile (tests): Add tst-backtrace1.
3042         * tst-backtrace1.c: New test.
3044 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3046         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3047         register as second parameter to the REGISTER macro.
3048         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3049         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3050         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3051         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3052         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3053         of thread register as second parameter to REGISTER macro in 64 case.
3055 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3057         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3058         (CFLAGS-getpid.o): Defined.
3059         (CFLAGS-getpid.os): Defined.
3061 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3063         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3064         returned for main thread does not overlap with any other VMA.
3065         Patch by Jakub Jelinek.
3067 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3069         * tst-raise1.c: Include stdio.h.
3071 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3073         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3074         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3075         If pid is 0, set it to selftid.
3076         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3077         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3078         != 0, return self->tid without doing a syscall.
3079         * descr.h (struct pthread): Move pid field after tid.
3081         * Makefile (tests): Add tst-raise1.
3082         * tst-raise1.c: New file.
3084 2003-12-23  Roland McGrath  <roland@redhat.com>
3086         * tst-oddstacklimit.c: New file.
3087         * Makefile (tests): Add it.
3088         (tst-oddstacklimit-ENV): New variable.
3090         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3091         value up to page size for __default_stacksize.
3093 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3095         * Makefile (tests): Add tst-eintr5.
3096         * tst-eintr5.c: New file.
3098         * eintr.c (eintr_source): Prevent sending signal to self.
3100         * tst-eintr2.c (tf1): Improve error message.
3102 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3104         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3105         * sysdeps/unix/sysv/linux/getpid.c: New file.
3106         * pthread_cancel.c: Add comment explaining use of PID field.
3107         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3108         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3109         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3110         temporarily to signal the field must not be relied on and updated
3111         by getpid().
3112         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3113         temporarily negative.
3114         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3116 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3118         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3119         (eintr_source): If ARG != NULL, use pthread_kill.
3120         * tst-eintr1.c: Adjust for this change.
3121         * tst-eintr2.c: Likewise.
3122         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3123         * tst-eintr3.c: New file.
3124         * tst-eintr4.c: New file.
3126 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3128         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3129         if CANCELSTATE_BITMASK is set.
3130         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3131         Likewise.
3133         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3134         (tests-reverse): Add tst-cancel23.
3135         * tst-cancel22.c: New test.
3136         * tst-cancel23.c: New test.
3138 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3140         * tst-eintr1.c: Better error messages.
3142         * Makefile (tests): Add tst-eintr2.
3143         * tst-eintr2.c: New file.
3145 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3147         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3148         (CFLAGS-tst-cancelx21.c): Set.
3149         * tst-cancel21.c: New test.
3150         * tst-cancelx21.c: New test.
3152         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3153         comparison operand.
3154         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3155         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3156         * pt-longjmp.c: Include jmpbuf-unwind.h.
3157         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3158         _JMPBUF_UNWINDS.  Adjust compared pointers.
3159         * init.c (__pthread_initialize_minimal_internal): Initialize
3160         pd->stackblock_size.
3161         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3162         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3163         * sysdeps/i386/jmpbuf-unwind.h: New file.
3164         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3165         * sysdeps/s390/jmpbuf-unwind.h: New file.
3166         * sysdeps/sh/jmpbuf-unwind.h: New file.
3167         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3168         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3169         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3170         (_JMPBUF_CFA_UNWINDS): Remove.
3171         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3173 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3175         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3176         (CFLAGS-tst-cancelx20.c): Set.
3177         * tst-cancel20.c: New test.
3178         * tst-cancelx20.c: New test.
3180 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3182         * init.c (__pthread_initialize_minimal_internal): Don't treat
3183         architectures with separate register stack special here when
3184         computing default stack size.
3186 2003-12-17  Roland McGrath  <roland@redhat.com>
3188         * Makefile (tst-cancelx7-ARGS): New variable.
3189         Reportd by Greg Schafer <gschafer@zip.com.au>.
3191 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3193         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3194         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3195         (tst-stack3-ENV): Set.
3196         ($(objpfx)tst-stack3-mem): New.
3197         * tst-stack3.c: New test.
3199 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3201         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3202         Add unwind directives.  Drop unused .regstk directive.
3203         (_fini_EPILOG_BEGINS): Add unwind directives.
3205 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3207         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3208         Assume parameter is a pointer.
3209         (lll_futex_wake): Likewise.
3210         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3211         Likewise.
3212         (lll_futex_wake): Likewise.
3213         Reported by Boris Hu.
3214         * sysdeps/unix/sysv/linux/unregister-atfork.c
3215         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3217         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3219 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3221         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3222         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3223         __rtld_lock_initialize for ld.so lock.
3224         Patch in part by Adam Li <adam.li@intel.com>.
3226 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3228         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3229         in $(gnulib).  Also, remove stale comment.
3231 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3233         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3234         advantage of new syscall stub and optimize accordingly.
3236         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3237         from SYS_futex, to match expectations of
3238         sysdep.h:DO_INLINE_SYSCALL.
3239         (lll_futex_clobbers): Remove.
3240         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3241         (lll_futex_wake): Likewise.
3242         (lll_futex_requeue): Likewise.
3243         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3244         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3245         Jelinek).
3246         (__lll_mutex_lock): Likewise.
3247         (__lll_mutex_cond_lock): Likewise.
3248         (__lll_mutex_timed_lock): Likewise.
3249         (__lll_mutex_unlock): Likewise.
3250         (__lll_mutex_unlock_force): Likewise.
3252         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3253         comes before the include of <sysdep.h>.
3254         (THREAD_SELF_SYSINFO): New macro.
3255         (THREAD_SYSINFO): Likewise.
3256         (INIT_SYSINFO): New macro.
3257         (TLS_INIT_TP): Call INIT_SYSINFO.
3259         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3261         * sysdeps/pthread/createthread.c (create_thread): Use
3262         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3263         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3264         THREAD_SELF_SYSINFO instead of open code.
3265         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3266         (THREAD_SYSINFO): Likewise.
3268         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3270         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3272 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3274         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3275         instead of .init.  Patch by David Mosberger.
3277 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3279         * sysdeps/pthread/configure.in: Remove broken declaration in C
3280         cleanup handling check.
3282 2003-11-30  Andreas Jaeger  <aj@suse.de>
3284         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3285         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3286         Likewise.
3288 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3290         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3291         * pthread_attr_destroy.c: Include shlib-compat.h.
3292         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3293         is set in iattr->flags.
3294         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3296 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3298         * Makefile (distribute): Add tst-cleanup4aux.c.
3300         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3301         include.
3303 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3305         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3306         pthread_cond_signal.
3308         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3309         store mutex address if the current value is ~0l.
3310         * sysdeps/pthread/pthread_cond_timedwait.c
3311         (__pthread_cond_timedwait): Likewise.
3312         * sysdeps/pthread/pthread_cond_broadcast.c
3313         (__pthread_cond_broadcast): Don't use requeue for pshared
3314         condvars.
3316         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3317         (__pthread_cond_wait): Don't store mutex address if the current
3318         value is ~0l.
3319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3320         (__pthread_cond_timedwait): Likewise.
3321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3322         (__pthread_cond_broadcast): Don't use requeue for pshared
3323         condvars.
3325         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3326         element with ~0l for pshared condvars, with NULL otherwise.
3328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3329         (__pthread_cond_wait): Don't store mutex address if the current
3330         value is ~0l.
3331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3332         (__pthread_cond_timedwait): Likewise.
3333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3334         (__pthread_cond_broadcast): Don't use requeue for pshared
3335         condvars.
3337         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3338         * tst-cond12.c: New file.
3339         * tst-cond13.c: New file.
3341 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3343         * sysdeps/pthread/configure.in: Make missing forced unwind support
3344         fatal.
3346 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3348         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3350 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3352         * Makefile: Add magic to clean up correctly.
3354 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3356         * unwind.c (FRAME_LEFT): Define.
3357         (unwind_stop): Handle old style cleanups here.
3358         (__pthread_unwind): Handle old style cleanups only if
3359         !HAVE_FORCED_UNWIND.
3360         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3361         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3362         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3363         ($(objpfx)tst-cleanupx4): Likewise.
3364         * tst-cleanup4.c: New test.
3365         * tst-cleanup4aux.c: New.
3366         * tst-cleanupx4.c: New test.
3368 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3370         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3371         lll_mutex_*lock macros to skip atomic operations on some archs.
3373 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3375         * sysdeps/pthread/tst-timer.c (main): Initialize
3376         sigev2.sigev_value as well.
3378 2003-10-15  Roland McGrath  <roland@redhat.com>
3380         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3381         is missing.
3382         * sysdeps/pthread/configure: Regenerated.
3384 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3386         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3387         locking macros.  No distinction between normal and mutex locking
3388         anymore.
3389         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3390         Merge bits from lowlevelmutex.S we still need.
3391         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3392         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3393         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3394         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3395         new mutex implementation.
3396         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3397         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3398         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3399         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3400         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3401         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3402         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3403         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3404         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3405         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3406         symbol for entry point to avoid cancellation.
3408 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3410         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3411         changes.
3412         (SAVE_OLDTYPE_0): Fix a typo.
3414 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3416         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3417         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3419 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3421         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3422         correct offset.
3424 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3426         * Makefile (tests): Add tst-cancel19.
3427         * tst-cancel19.c: New test.
3429 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3431         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3432         restoring of the old cancellation type.
3434 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3436         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3438 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3440         * sysdeps/pthread/malloc-machine.h: New file
3442 2003-09-24  Roland McGrath  <roland@redhat.com>
3444         * allocatestack.c (__make_stacks_executable): Don't ignore return
3445         value from _dl_make_stack_executable.
3447 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3449         * allocatestack.c (__make_stacks_executable): Also change
3450         permission of the currently unused stacks.
3452         * allocatestack.c (change_stack_perm): Split out from
3453         __make_stacks_executable.
3454         (allocate_stack): If the required permission changed between the time
3455         we started preparing the stack and queueing it, change the permission.
3456         (__make_stacks_executable): Call change_stack_perm.
3458         * Makefile: Build tst-execstack-mod locally.
3459         * tst-execstack-mod.c: New file.
3461 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3463         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3465 2003-09-23  Roland McGrath  <roland@redhat.com>
3467         * tst-execstack.c: New file.
3468         * Makefile (tests): Add it.
3469         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3470         (LDFLAGS-tst-execstack): New variable.
3472         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3473         whether to use PROT_EXEC for stack mmap.
3474         (__make_stacks_executable): New function.
3475         * pthreadP.h: Declare it.
3476         * init.c (__pthread_initialize_minimal_internal): Set
3477         GL(dl_make_stack_executable_hook) to that.
3479 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3481         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3482         recommendation from AMD re avoidance of lock prefix.
3484 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3486         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3487         lll_futex_timed_wait instead of lll_futex_wait.
3488         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3489         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3490         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3491         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3492         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3493         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3494         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3495         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3496         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3497         Completely revamp the locking macros.  No distinction between
3498         normal and mutex locking anymore.
3499         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3500         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3501         __lll_lock_timedwait): Fix prototypes.
3502         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3503         __lll_lock_timedwait): Likewise.
3504         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3505         macros, add __builtin_expect.
3506         (lll_mutex_timedlock): Likewise.  Fix return value.
3507         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3508         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3509         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3510         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3511         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3512         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3513         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3514         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3516 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3518         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3519         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3520         operation if possible.
3522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3523         like jumping over the lock prefix.
3525 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3527         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3528         locking macros.  No distinction between normal and mutex locking
3529         anymore.
3530         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3531         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3532         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3533         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3534         locking.  Merge bits from lowlevelmutex.S we still need.
3535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3536         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3537         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3538         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3539         * Makefile (routines): Remove libc-lowlevelmutex.
3540         (libpthread-rountines): Remove lowlevelmutex.
3541         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3542         for new mutex implementation.
3543         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3545         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3546         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3547         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3548         Likewise.
3549         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3550         Likewise.
3551         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3552         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3553         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3555         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3557         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3559         Likewise.
3560         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3561         Likewise.
3562         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3563         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3565         Don't use requeue.
3566         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3567         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3569 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3571         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3572         in parameters of asm with output parameters.
3574         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3575         type of DECR parameter to int.
3576         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3578 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3580         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3581         guardsize for each thread.
3583 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3585         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3586         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3587         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3589         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3590         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3591         NULL.
3592         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3593         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3594         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3595         (pthread_getaffinity_np): Add hidden_def.
3597         * Makefile (tests): Add tst-attr3.
3598         * tst-attr3.c: New test.
3600         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3602 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3604         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3605         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3607 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3609         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3610         * tst-align.c: Include tst-stack-align.h.
3611         (tf, do_test): Use TEST_STACK_ALIGN macro.
3613 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3615         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3616         variable.
3618 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3620         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3621         stack-related values for the initial thread.
3623 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3625         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3627 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3629         * pthread_mutex_lock.c: Minor code rearrangements.
3631 2003-09-05  Roland McGrath  <roland@redhat.com>
3633         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3634         Instead, include ../nptl_db/db_info.c to do its magic.
3635         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3636         (__pthread_pthread_key_2ndlevel_size): Likewise.
3637         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3638         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3639         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3640         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3641         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3642         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3643         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3644         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3645         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3646         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3647         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3648         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3649         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3650         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3651         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3652         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3653         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3655 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3657         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3658         of pthread_t to be compatible with LT.
3659         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3660         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3661         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3662         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3663         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3664         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3665         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3667 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3669         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3671 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3673         * unwind-forcedunwind.c: Move to...
3674         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3675         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3676         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3677         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3678         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3679         * unwind.c: Include jmpbuf-unwind.h.
3680         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3682 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3684         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3685         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3686         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3687         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3688         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3689         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3690         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3691         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3692         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3693         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3694         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3695         function.
3696         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3697         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3698         * Makefile (tests): Add tst-stack2.
3699         * tst-stack2.c: New test.
3700         * tst-stack1.c: Include limits.h and sys/param.h.
3701         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3703         * pthread_condattr_setpshared.c: Include errno.h.
3704         (pthread_condattr_setpshared): Return EINVAL if pshared
3705         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3707         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3708         defined symbol for entry point to avoid cancellation.
3709         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3710         Likewise.
3711         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3712         Likewise.
3713         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3714         Likewise.
3715         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3716         Likewise.
3717         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3718         Likewise.
3719         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3720         __close_nocancel, __read_nocancel, __write_nocancel,
3721         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3722         libpthread.so or librt.so, define to corresponding function
3723         without _nocancel suffix.
3724         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3725         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3726         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3728         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3730 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3732         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3733         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3735         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3736         in subsections has a symbol associated with it.
3738         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3739         defined symbol for entry point to avoid cancellation.
3740         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3742 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3744         * Makefile (tests): Add tst-tls5.
3745         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3746         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3747         ($(objpfx)tst-tls5): New.
3748         ($(objpfx)tst-tls6.out): Likewise.
3749         (tests): Depend on $(objpfx)tst-tls6.out.
3750         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3751         (do_test): Check pthread_self () return value alignment.
3752         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3753         (tf): Check pthread_self () return value alignment.
3754         * tst-tls5.c: New test.
3755         * tst-tls5.h: New.
3756         * tst-tls5mod.c: New.
3757         * tst-tls5moda.c: New.
3758         * tst-tls5modb.c: New.
3759         * tst-tls5modc.c: New.
3760         * tst-tls5modd.c: New.
3761         * tst-tls5mode.c: New.
3762         * tst-tls5modf.c: New.
3763         * tst-tls6.sh: New test.
3765         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3766         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3767         * init.c (pthread_functions): Initialize them.
3768         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3769         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3770         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3771         pthread_cond_timedwait@@GLIBC_2.3.2.
3773 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3775         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3776         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3777         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3778         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3779         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3780         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3782         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3784         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3785         _POSIX_THREAD_PRIORITY_SCHEDULING.
3786         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3788 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3790         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3791         nested function, use static inline function from libio.h.
3792         Code by Richard Henderson.
3794         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3795         weak.
3797 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3799         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3800         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3801         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3802         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3803         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3804         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3805         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3806         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3807         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3808         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3809         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3810         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3811         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3812         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3813         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3814         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3815         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3816         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3817         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3818         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3819         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3820         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3821         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3822         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3823         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3824         * sysdeps/sparc/tls.h: New file.
3825         * sysdeps/sparc/tcb-offsets.sym: New file.
3826         * sysdeps/sparc/Makefile: New file.
3827         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3828         * init.c [__sparc__] (__NR_set_tid_address): Define.
3830 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3832         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3833         _IO_release_lock): Define.
3835 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3837         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3838         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3840 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3842         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3843         (__pthread_cleanup_class): Add missing return types of member
3844         functions.
3846 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3848         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3849         (lll_mutex_unlock_force): Add memory barrier between store and futex
3850         syscall.
3852 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3854         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3855         tempmsg in first loop.
3857 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3859         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3860         _POSIX_THREAD_PRIORITY_SCHEDULING.
3861         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3863 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3865         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3866         (__rtld_lock_default_lock_recursive,
3867         __rtld_lock_default_unlock_recursive): Define.
3868         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3869         __rtld_lock_unlock_recursive): Define using
3870         GL(_dl_rtld_*lock_recursive).
3871         * init.c (__pthread_initialize_minimal_internal): Initialize
3872         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3873         Lock GL(_dl_load_lock) the same number of times as
3874         GL(_dl_load_lock) using non-mt implementation was nested.
3876         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3877         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3879 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3881         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3882         PIPE_BUF.
3884 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3886         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3888 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3890         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3891         to first syscall error check.  Move syscall error check for tkill
3892         into __ASSUME_CLONE_STOPPED #ifdef.
3894 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3896         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3897         is not defined, do explicit synchronization.
3898         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3899         is not defined also unlock pd->lock for non-debugging case in case
3900         it is necessary.
3901         * pthread_create.c (start_thread): Always get and release pd->lock
3902         if __ASSUME_CLONE_STOPPED is not defined.
3903         (start_thread_debug): Removed.  Adjust users.
3904         * allocatestack.c (allocate_stack): Always initialize lock if
3905         __ASSUME_CLONE_STOPPED is not defined.
3906         * Makefile (tests): Add tst-sched1.
3907         * tst-sched1.c: New file.
3909         * sysdeps/pthread/createthread.c (do_clone): Only use
3910         sched_setschduler and pass correct parameters.
3912 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3914         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3915         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3916         PTHREAD_STACK_MIN in comments.
3918 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3920         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3921         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3922         argument.
3923         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3924         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3925         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3926         (__pthread_cleanup_upto): Fix prototype.
3927         (_longjmp_unwind): Adjust caller.
3928         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3929         Change second argument to const struct pointer.
3930         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3931         * tst-sem9.c (main): Likewise.
3932         * unwind.c: Include string.h for strlen prototype.
3934 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3937         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3938         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3939         Define HAVE_CMOV.
3940         Patch by Nicholas Miell <nmiell@attbi.com>.
3942 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3944         * init.c (__pthread_initialize_minimal_internal): Initialize
3945         GL(dl_init_static_tls).
3946         * pthreadP.h (__pthread_init_static_tls): New prototype.
3947         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3948         New functions.
3949         * Makefile (tests): Add tst-tls4.
3950         (modules-names): Add tst-tls4moda and tst-tls4modb.
3951         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3952         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3953         tst-tls4modb.so.
3954         * tst-tls4.c: New file.
3955         * tst-tls4moda.c: New file.
3956         * tst-tls4modb.c: New file.
3958 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3960         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3961         before __timer_dealloc.
3962         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3963         Don't call list_unlink.
3965 2003-07-29  Roland McGrath  <roland@redhat.com>
3967         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3969 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3971         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3972         Don't reuse struct aiocb A if it failed.
3973         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3974         not just one byte, as that does not block.
3976 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3978         * sysdeps/pthread/unwind-resume.c: New file.
3979         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3980         unwind-resume in csu subdir.
3981         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3982         exceptions.
3983         (librt-sysdep_routines, librt-shared-only-routines): Add
3984         rt-unwind-resume.
3985         * sysdeps/pthread/rt-unwind-resume.c: New file.
3986         * unwind-forcedunwind.c: New file.
3987         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3988         (libpthread-shared-only-routines): Likewise.
3989         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3990         * pthreadP.h (pthread_cancel_init): New prototype.
3991         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3993         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3994         attr argument const struct pthread_attr *.
3996         * res.c (__res_state): Return __resp.
3997         * descr.h: Include resolv.h.
3998         (struct pthread): Add res field.
3999         * pthread_create.c: Include resolv.h.
4000         (start_thread): Initialize __resp.
4001         * Makefile (tests): Add tst-_res1.
4002         (module-names): Add tst-_res1mod1, tst-_res1mod2.
4003         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
4004         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
4005         libpthread.
4006         * tst-_res1.c: New file.
4007         * tst-_res1mod1.c: New file.
4008         * tst-_res1mod2.c: New file.
4010 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
4012         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4014         * Makefile: Define various *-no-z-defs variables for test DSOs
4015         which has undefined symbols.
4017 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
4019         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4020         Retry if the stwcx fails to store once_control.
4022 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
4024         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4025         pthread_attr_setaffinity.
4026         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4027         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4028         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4029         * pthread_attr_destroy.c: Free cpuset element if allocated.
4030         * pthread_create.c: Pass iattr as additional parameter to
4031         create_thread.
4032         * sysdeps/pthread/createthread.c: If attribute is provided and
4033         a new thread is created with affinity set or scheduling parameters,
4034         start thread with CLONE_STOPPED.
4035         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4036         pthread_attr_setaffinity.
4037         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4038         cpuset element.
4040 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
4042         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4044 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
4046         * sysdeps/pthread/configure.in: Require CFI directives also for
4047         ppc and s390.
4049 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
4051         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4052         Add cfi directives.
4054 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4056         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4057         CLEANUP_JMP_BUF.
4058         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4059         registers as variables.  Call __pthread_mutex_unlock_usercnt.
4060         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4061         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4062         not self pointer in __writer.  Compare with TID to determine
4063         deadlocks.
4064         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4065         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4066         Likewise.
4067         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4068         Likewise.
4069         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4070         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4071         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4072         macros also when compiling librt.
4074 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
4076         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4077         -fasynchronous-unwind-tables.
4078         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4079         (PSEUDO): Add cfi directives.
4080         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4081         Likewise.
4082         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4083         Likewise.
4085 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
4087         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4088         __pthread_unregister_cancel): Add prototypes and hidden_proto.
4089         * unwind.c (__pthread_unwind_next): Add hidden_def.
4090         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4091         Likewise.
4092         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4093         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4094         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4095         Likewise.
4096         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4097         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4098         Likewise.
4099         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4100         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4101         __pthread_unregister_cancel and __pthread_unwind_next.
4103 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
4105         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4106         different symbol for the cancellation syscall wrapper and
4107         non-cancellation syscall wrapper.
4108         (PSEUDO_END): Define.
4110 2003-07-05  Richard Henderson  <rth@redhat.com>
4112         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4113         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4114         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4115         return actual return value from the syscall, not 0.
4117 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
4119         * descr.h (struct pthread): Add pid field.
4120         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4121         (__reclaim_stacks): Likewise.
4122         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4123         also check for PID of the signal source.
4124         (__pthread_initialize_minimal_internal): Also initialize pid field
4125         of initial thread's descriptor.
4126         * pthread_cancel.c: Use tgkill instead of tkill if possible.
4127         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4128         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4129         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4130         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4132 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
4134         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4135         Fix use of parameter.
4136         (__libc_cleanup_pop): Likewise.
4138 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
4140         * init.c (sigcancel_handler): Change parameters to match handler
4141         for SA_SIGACTION.  Check signal number and code to recognize
4142         invalid invocations.
4144 2003-07-03  Roland McGrath  <roland@redhat.com>
4146         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4147         Apply sizeof (struct pthread) bias to r13 value.
4149 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
4151         * sysdeps/pthread/configure.in: Require CFI directives.
4153         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4154         definition.
4155         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4156         libpthread compilation.
4157         * unwind.c (__pthread_unwind): Add hidden_def.
4158         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4160 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4162         * libc-cancellation.c (__libc_cleanup_routine): Define.
4163         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4164         (__pthread_cleanup_pop): Define.
4166 2003-07-01  Richard Henderson  <rth@redhat.com>
4168         * sysdeps/alpha/elf/pt-initfini.c: New file.
4169         * sysdeps/alpha/pthread_spin_lock.S: New file.
4170         * sysdeps/alpha/pthread_spin_trylock.S: New file.
4171         * sysdeps/alpha/pthreaddef.h: New file.
4172         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4173         * sysdeps/alpha/tls.h: New file.
4174         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4175         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4176         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4177         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4178         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4179         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4180         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4181         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4182         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4183         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4185 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4187         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4188         cleanup support and unwind info.
4190 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
4192         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4193         Use correct cleanup handler registration.  Add unwind info.
4194         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4195         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4196         * tst-once3.c: Add cleanup handler and check it is called.
4197         * tst-once4.c: Likewise.
4198         * tst-oncex3.c: New file.
4199         * tst-oncex4.c: New file.
4200         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4202 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
4204         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4206 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
4208         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4209         (tf_msgsnd): Likewise.
4211         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4212         premature returns a bit more.
4214 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
4216         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4217         definition to the front.
4219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4220         the cleanup functions to make the names unique.  Fix dwarf opcode
4221         un unwind table.
4222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4223         functions to make the names unique.  Fix CFA offset for two blocks.
4225 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
4227         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4228         missing closing braces.
4229         Patch by Christophe Saout <christophe@saout.de>.
4231 2003-06-24  Roland McGrath  <roland@redhat.com>
4233         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4235 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
4237         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4238         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4240         * pthreadP.h: Declare __find_thread_by_id.
4241         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4242         * pthread_clock_gettime.c: Allow using other thread's clock.
4243         * pthread_clock_settime.c: Likewise.
4244         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4245         * Makefile: Add rules to build and run tst-clock2.
4246         * tst-clock2.c: New file.
4248 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
4250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4251         to use exception-based cleanup handler.
4252         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4254         * tst-cond8.c (ch): Announce that we are done.
4256         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4258         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4259         Also test aio_suspend with timeout value.
4261 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
4263         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4264         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4265         attribute_hidden.
4267         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4268         (__pthread_mutex_lock_internal): Likewise.
4269         (__pthread_mutex_unlock_internal): Likewise.
4270         (__pthread_mutex_unlock_usercnt): Declare.
4271         * pthread_mutex_destroy.c: Always fail if used in any way.
4272         * pthread_mutex_init.c: Update comment.
4273         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4274         * pthread_mutex_timedlock.c: Adjust __nusers.
4275         * pthread_mutex_trylock.c: Adjust __nusers.
4276         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4277         and public interfaces are wrapper with pass additional parameter.
4278         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4279         parameter zero.
4280         * tst-mutex8.c: New file.
4281         * Makefile (tests): Add tst-mutex8.
4282         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4283         __pthread_mutex_unlock_usercnt.
4284         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4286         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4287         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4288         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4289         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4290         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4291         Add __nusers.
4292         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4293         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4294         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4295         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4296         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4298         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4299         * pthread_mutex_timedlock.c: Likewise.
4300         * pthread_mutex_trylock.c: Adjust __nusers.
4301         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4302         * tst-mutex9.c: New file.
4303         * Makefile (tests): Add tst-mutex9.
4304         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4305         * sysdeps/ia64/tls.h: Likewise.
4306         * sysdeps/powerpc/tls.h: Likewise.
4307         * sysdeps/s390/tls.h: Likewise.
4308         * sysdeps/sh/tls.h: Likewise.
4309         * sysdeps/x86_64/tls.h: Likewise.
4310         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4311         Change type of __owner.
4312         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4313         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4314         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4315         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4316         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4318 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4320         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4321         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4323         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4324         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4325         instead of nr to lll_futex_wake.  Only set errno and return -1
4326         if err < 0.
4328         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4329         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4330         return actual return value from the syscall, not 0.
4332 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4334         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4335         find a random value.
4336         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4337         errno==EIDRM.
4339         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4340         compat_timer_settime.
4341         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4342         compat_timer_gettime.
4343         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4344         compat_timer_getoverrun.
4345         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4346         compat_timer_delete.
4348         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4349         error-checking mutex detect busy mutexes.
4351 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4353         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4354         Add ax to clobber list.
4355         (lll_mutex_cond_lock): Likewise.
4356         (lll_mutex_unlock): Likewise.
4357         (lll_lock): Likewise.
4358         (lll_unlock): Likewise.
4360         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4361         * tst-cancel18.c: New file.
4362         * tst-cancelx18.c: New file.
4364         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4365         and tcdrain.
4367         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4368         * tst-cancel17.c: New file.
4369         * tst-cancelx17.c: New file.
4371         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4372         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4373         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4375         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4377 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4379         * sysdeps/pthread/createthread.c (create_thread): Set
4380         header.multiple_threads unconditionally.
4381         * allocatestack.c (allocate_stack): Likewise.
4382         * descr.h (struct pthread): Add header.multiple_threads
4383         unconditionally.
4384         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4385         Define for librt.  #error if neither libpthread, libc nor librt.
4386         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4387         Likewise.
4388         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4389         CDISABLE): Likewise.
4390         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4391         CDISABLE): Likewise.
4392         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4393         CDISABLE): Likewise.
4394         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4395         CDISABLE): Likewise.  Access header.multiple_threads outside of
4396         libc and libpthread.
4397         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4398         Likewise.
4399         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4400         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4402 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4404         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4405         Also test early cancellation before the thread reaches the cancellation
4406         point.
4408         * Makefile: Compile forward.c with exceptions.
4410         * sysdeps/unix/sysv/linux/sleep.c: New file.
4412 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4414         * Makefile: Add CFLAGS definition to compile function wrappers
4415         duplicated from libc with exceptions.
4416         * tst-cancel4.c: Also check cancellation handlers.
4418         * Makefile: Add rules to build and run tst-cancel16 and
4419         tst-cancelx16.  Add missing CFLAGS definitions.
4420         * tst-cancel16.c: New file.
4421         * tst-cancelx16.c: New file.
4423 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4425         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4426         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4427         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4428         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4430         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4431         (LIBC_CANCEL_RESET): Likewise.
4432         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4433         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4434         librt-cancellation.
4435         (CFLAGS-libcrt-cancellation.c): Define.
4436         * sysdeps/pthread/librt-cancellation.c: New file.
4437         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4438         macros also when compiling librt.
4439         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4440         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4441         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4442         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4443         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4444         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4445         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4447         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4448         compat_timer_create.
4450 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4452         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4454         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4455         __register_atfork.
4456         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4457         Add libc_hidden_def.
4459 2003-06-13  Roland McGrath  <roland@redhat.com>
4461         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4462         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4464 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4466         * allocatestack.c (queue_stack): Always inline.
4467         * ptreadhP.h (__do_cancel): Likewise.
4469 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4471         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4472         a typo.
4474 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4477         (__pthread_cond_signal): Remove incorrect second addition for
4478         cond_lock!=0.
4480 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4483         (__pthread_cond_signal): Use correct futex pointer in
4484         __lll_mutex_lock_wait call.
4486         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4487         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4489 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4491         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4492         cancelable.
4493         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4494         Likewise.
4496         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4497         hand-written CFI generation code.  Since ENTRY/END also initiated
4498         CFI frames this caused two CFI sets to be generated.
4500 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4502         * cleanup_routine.c: New file.
4503         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4504         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4505         cleanup handling.
4506         * Makefile (libpthread-routines): Add cleanup_routine.
4507         Add more CFLAGS variables to compile with exceptions.  Add comments
4508         why which file needs unwind tables.
4509         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4510         tests.
4511         * tst-cancelx1.c: New file.
4512         * tst-cancelx2.c: New file.
4513         * tst-cancelx3.c: New file.
4514         * tst-cancelx4.c: New file.
4515         * tst-cancelx5.c: New file.
4516         * tst-cancelx6.c: New file.
4517         * tst-cancelx7.c: New file.
4518         * tst-cancelx8.c: New file.
4519         * tst-cancelx9.c: New file.
4520         * tst-cancelx10.c: New file.
4521         * tst-cancelx11.c: New file.
4522         * tst-cancelx12.c: New file.
4523         * tst-cancelx13.c: New file.
4524         * tst-cancelx14.c: New file.
4525         * tst-cancelx15.c: New file.
4526         * tst-cleanupx0.c: New file.
4527         * tst-cleanupx0.expect: New file.
4528         * tst-cleanupx1.c: New file.
4529         * tst-cleanupx2.c: New file.
4530         * tst-cleanupx3.c: New file.
4532         * tst-cleanup0.c: Make standard compliant.
4533         * tst-cleanup1.c: Likewise.
4535         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4536         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4537         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4538         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4539         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4540         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4541         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4542         CLEANUP_JMP_BUF.
4543         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4544         * tst-cancel12.c: New file.
4545         * tst-cancel13.c: New file.
4546         * tst-cancel14.c: New file.
4547         * tst-cancel15.c: New file.
4548         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4549         and tst-cancel15.
4551         * tst-cancel1.c: Add some comments.
4553         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4554         timeout correctly.
4556 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4558         * Makefile (CFLAGS-pthread_cancel.c): Define.
4560 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4562         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4563         Change type of __writer element to int.
4564         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4565         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4566         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4567         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4568         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4569         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4570         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4571         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4572         Compare with TID to determine deadlocks.
4573         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4574         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4575         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4576         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4577         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4578         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4579         Likewise.
4580         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4581         Likewise.
4582         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4583         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4584         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4585         Likewise.
4586         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4587         Likewise.
4588         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4589         * Makefile (tests): Add tst-rwlock12.
4590         * tst-rwlock12.c: New file.
4592 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4594         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4595         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4596         Remove bogus hidden_proto.
4597         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4598         Likewise.
4599         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4600         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4601         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4602         ___lll_mutex_timedlock): Likewise.
4604 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4607         (__pthread_cond_signal): Add some code to eventually handle
4608         cond_lock!=0.
4610 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4612         * Makefile (tests): Add tst-exec4.
4613         (tst-exec4-ARGS): Define.
4614         * tst-exec4.c: New file.
4616 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4618         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4619         Also fail if tv_nsec < 0.
4620         (__lll_timedwait_tid): Likewise.
4621         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4622         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4623         Likewise.
4624         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4625         Likewise.
4626         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4627         Likewise.
4628         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4629         Likewise.
4630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4631         Likewise.
4632         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4633         Likewise.
4635         * Makefile (tests): Add tst-sem8 and tst-sem9.
4636         * tst-sem8.c: New file.
4637         * tst-sem9.c: New file.
4638         * sem_open.c: Fix creation of in_use record if the file exists but
4639         no internal record.
4641         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4642         definitions.
4644         * sysdeps/pthread/timer_create.c (timer_create): In case
4645         evp==NULL, assign timer ID to sival_ptr.
4647         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4648         struct pthread_unwind_buf *.
4649         (struct pthread): Likewise for cleanup_jmp_buf element.
4651         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4652         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4653         * unwind.c (__pthread_unwind_next): Likewise.
4655 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4657         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4658         (lll_futex_timed_wait): Use int for futex value parameter.
4659         (lll_futex_wake): Likewise.
4660         (lll_futex_requeue): Likewise.
4662         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4663         Replace one memory operation with one register operation.
4665         * tst-join4.c (do_test): Fix error message.
4667         * tst-rwlock6.c (do_test): Use correct format specifier.
4669         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4670         (__lll_mutex_lock_wait): Replace one memory operation with one
4671         register operation.
4672         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4673         (__lll_mutex_lock_wait): Likewise.
4675         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4676         (__lll_mutex_cond_lock): Add one to value parameter of
4677         __lll_lock_wait to reflect reality in the futex syscall.
4678         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4679         (lll_mutex_cond_lock): Likewise.
4681 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4683         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4684         New function.
4685         (lll_mutex_cond_lock): Define.
4687 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4689         * Makefile (tests): Add tst-signal6.
4690         * tst-signal6.c: New file.
4692         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4693         (__lll_mutex_unlock_force): New function
4694         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4696         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4697         (__lll_mutex_unlock_force): New function.
4698         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4700         * tst-rwlock7.c (do_test): Use correct format specifier.
4702         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4703         Find break parameter in correct asm argument.
4705 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4707         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4708         Remove out4.
4709         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4710         error occured.
4711         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4712         Add __mutex.
4713         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4714         lll_futex_requeue, lll_mutex_unlock_force): Define.
4716 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4718         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4719         (pthread_cond_t): Add __mutex.
4720         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4721         lll_futex_requeue, lll_mutex_unlock_force): Define.
4723 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4725         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4726         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4727         Add __mutex field.
4728         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4729         Define.
4730         (lll_futex_wait, lll_futex_wake): Define.
4731         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4732         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4733         FUTEX_REQUEUE instead of FUTEX_WAIT.
4734         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4735         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4736         mutex which was used in condvar structure.  Call
4737         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4738         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4741         include tcb-offsets.h.  Read wakeup value in locked region.
4742         Use the value of gbr register as THREAD_ID.
4743         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4744         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4745         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4747         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4748         macros.
4750 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4752         * sysdeps/pthread/pthread_cond_broadcast.c
4753         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4755 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4757         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4758         typo in register name.
4759         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4760         correctly.  Actually use requeue.  Little optimization.
4761         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4762         mutex address early.  Handle cancellation state as 32-bit value.
4763         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4764         Remove unnecessary label.
4766 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4768         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4769         instead of FUTEX_WAIT.
4770         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4773         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4774         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4775         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4776         used in condvar structure.  Call __pthread_mutex_cond_lock instead
4777         of __pthread_mutex_lock_internal.
4778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4779         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4780         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4781         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4782         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4784         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4785         Add pthread_mutex_cond_lock.
4786         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4787         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4788         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4789         lll_mutex_cond_lock.
4790         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4792         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4793         Add __mutex field.
4794         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4795         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4797         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4798         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4800         * pthreadP.h: Declare __pthread_mutex_cond_lock.
4801         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4802         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
4803         macro don't define aliases.
4805         * cancellation.c: Remove __pthread_enable_asynccancel_2.
4806         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4807         * sysdeps/pthread/pthread_cond_timedwait.c: Use
4808         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4811         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4812         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4815 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
4817         * sem_open.c: Fix one endless loop.  Implement correct semantics
4818         wrt opening the same semaphore more then once.
4819         * sem_close.c: Adjust for sem_open change.
4820         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
4821         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4822         * Makefile (tests): Add tst-sem7.
4823         * tst-sem7.c: New file.
4825 2003-05-16  Roland McGrath  <roland@redhat.com>
4827         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4828         uninitialized variable braino.
4830 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
4832         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4833         test for syscall availability.
4835         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4836         __no_posix_timers to -1 if the syscalls don't exist.
4838         * pthread_join.c (pthread_join): Set tid field of the joined
4839         thread to -1.  This isn't necessary but helps to recognize some
4840         error conditions with almost no cost.
4842         * allocatestack.c (FREE_P): Also negative values indicate an
4843         unused stack.
4845         * unwind.c: Include <unistd.h>.
4847 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
4849         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4851 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
4853         * Makefile (crti-objs, crtn-objs): New variables.
4854         (omit-deps, extra-objs): Add crtn.
4855         ($(objpfx)libpthread.so): Depend on both crti and crtn
4856         and links to them in multidir.
4857         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4859 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
4861         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4862         (lll_mutex_unlock): Use atomic_exchange_rel.
4864 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
4866         * cond-perf.c (cons): Add missing locking around setting of alldone.
4868 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
4870         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4871         related macros.
4872         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4874 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
4876         * tst-sem6.c: New file.
4877         * Makefile (tests): Add tst-sem6.
4879         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4880         Use atomic_exchange_rel instead of atomic_exchange.
4881         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4882         Likewise.
4884         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4885         code for lll_futex_wait and lll_futex_wake in static apps.  Use
4886         vsyscall is possible.
4888         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4889         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4890         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4891         pthread_setaffinity_np.
4892         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4893         and pthread_setaffinity_np.
4894         * Makefile (libpthread-routines): Add pthread_getaffinity and
4895         pthread_setaffinity.
4897         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4898         use it in case mmap to allocate the stack fails.
4899         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4900         ARCH_MAP_FLAGS here.
4901         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4902         ARCH_RETRY_MMAP.
4904 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
4906         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4907         handler implementation.  It is now lockless in fork().
4908         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4909         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4910         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
4911         declare the __fork_*_lists.
4912         (struct fork_handler): Include pointers to all three functions.
4913         Add next, refcntr and need_signal elements.
4914         (__fork_handlers): New declaration.
4915         (__register_atfork_malloc): Remove declaration.
4916         (HAVE_register_atfork_malloc): Remove definition.
4917         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4918         __pthread_child_handler variable.
4919         (__libc_pthread_init): Use __register_atfork instead of explicitly
4920         adding to the list.
4921         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4922         and lll_futex_wake.
4923         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4925         * unwind.c (unwind_cleanup): Print error message and then abort.  This
4926         function must never be reached.
4928         * cond-perf.c: New file.
4930 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
4932         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4934 2003-05-04  Roland McGrath  <roland@redhat.com>
4936         * Makefile ($(objpfx)../libc.so): New target.
4938 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
4940         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4941         (pthread_condattr_t): Size is only an int, don't use long for
4942         alignment.
4943         (pthread_mutexattr_t): Likewise.
4944         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4945         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4946         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4948 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
4950         * sysdeps/i386/tls.h: Define THREAD_ID.
4951         * sysdeps/ia64/tls.h: Likewise.
4952         * sysdeps/powerpc/tls.h: Likewise.
4953         * sysdeps/s390/tls.h: Likewise.
4954         * sysdeps/sh/tls.h: Likewise.
4955         * sysdeps/x86_64/tls.h: Likewise.
4956         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4957         record ownership.
4958         * pthread_mutex_timedlock.c: Likewise.
4959         * pthread_mutex_trylock.c: Likewise.
4960         * pthread_mutex_unlock.c: Likewise.
4961         * pthread_rwlock_trywrlock.c: Likewise.
4962         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4963         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4964         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4965         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4967         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4968         flag.
4970 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
4972         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4973         (__SIZEOF_PTHREAD_COND_T): Define to 48.
4974         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4975         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4976         Make __align long long instead of long.
4977         (pthread_rwlock_t): Formatting.
4978         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4979         (pthread_rwlock_t): Formatting.
4980         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4981         (pthread_cond_t): Make __align long long instead of long.
4982         (pthread_rwlock_t): Move __flags field to the same position as in
4983         linuxthreads.
4985 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
4987         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4988         * tst-rwlock7.c (do_test): Likewise.
4990 2003-04-26  Roland McGrath  <roland@redhat.com>
4992         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4994 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
4996         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4997         sizeof (struct pthread).
4998         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4999         1 struct pthread.
5000         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
5001         to 0.
5002         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
5003         struct pthread.
5004         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
5005         to 32-bit bytes.
5006         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
5007         tcbp.
5008         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
5009         unneccessarily.
5010         (NO_TLS_OFFSET): Define.
5011         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5012         add TLS_TCB_SIZE unnecessarily.
5014 2003-04-22  Roland McGrath  <roland@redhat.com>
5016         * Makeconfig (shared-thread-library): Reverse link order to work
5017         around linker bug.
5019 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
5021         * semaphore.h: Fix typo in comment.
5023 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
5025         * sysdeps/pthread/sigfillset.c: New file.
5027         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5028         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5029         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5030         * sysdeps/pthread/sigaction.c: Likewise.
5031         * sysdeps/pthread/sigprocmask.c: New file.
5032         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5033         __SIGRTMIN+1.
5034         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5035         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
5036         in this case.
5038 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
5040         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5041         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5043         * sysdeps/unix/sysv/linux/unregister-atfork.c
5044         (__unregister_atfork): Don't free memory not allocated dynamically.
5046         * semaphore.h: Remove __THROW marker from cancellation points.
5047         * nptl/sysdeps/pthread/pthread.h: Likewise.
5049 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
5051         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5052         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5053         __THROW.
5055 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
5057         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5059 2003-04-15  Roland McGrath  <roland@redhat.com>
5061         * forward.c (__pthread_unwind): Tweak to avoid warning.
5063 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
5065         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5067 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
5069         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5070         overflow CFA advance instructions.
5071         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5073 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
5075         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5076         * sysdeps/i386/pthread_spin_lock.c: Likewise.
5077         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
5078         defined.
5080         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5081         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5082         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5083         DW_CFA_advance_loc for .Laddl-.Lsubl.
5085 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
5087         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5088         position-independent unwind data for static libraries.
5089         Add missing unwind info.  Add comments.
5091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5092         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5096 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
5098         * Makefile: Make sure all cancellation points are compiled with
5099         exception and asynchronous unwind tables.
5101         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5102         which mishandles loading of global object addresses in PIC.
5103         (THREAD_SETMEM_NC): Likewise.
5105 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5107         * pthread.h: Define new data structure for cleanup buffer.  Declare
5108         new cleanup handler interfaces.
5109         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
5110         (struct pthread): Add cleanup_jmp_buf pointer.  Define
5111         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5112         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
5113         it.  Declare old cleanup handler installation functions.
5114         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
5115         handling.
5116         * cleanup_defer.c: Likewise.
5117         * cleanup_compat.c: New file.  Old cleanup code.
5118         * cleanup_def_compat.c: New file.  Old cleanup code.
5119         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5120         if own thread descriptor.
5121         * unwind.c: New file.
5122         * forward.c: Add __pthread_unwind.
5123         * init.c (pthread_functions): Add __pthread_unwind.
5124         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5125         Add ptr___pthread_unwind.
5126         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5127         and unwind function.
5128         * Makefile (libpthread-routines): Add cleanup_compat,
5129         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
5130         table generation if necessary.
5131         * version.c: Record whether unwind support is compiled in.
5132         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5133         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5134         handler interfaces.
5135         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5136         complication to generate unwind information for syscall wrappers.
5137         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5138         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5139         __cleanup_fct_attribute.
5141         * Makefile: Add rules to build and run tst-cleanup0.
5142         * tst-cleanup0.c: New file.
5143         * tst-cleanup0.expect: New file.
5145         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
5146         caller.  Optimize to avoid often unecessary local variable.
5148 2003-04-11  Roland McGrath  <roland@redhat.com>
5150         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5151         sets variable `multidir'; include that.
5152         (generated): Add it.
5153         ($(objpfx)$(multidir)/crti.o): New target.
5154         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5156 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5158         * tst-attr2.c (do_test): Add cast to avoid warning.
5159         * tst-mutex4.c (do_test): Likewise.
5161 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
5163         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5164         in child.
5166 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
5168         * Makefile (tests): Add tst-detach1.
5169         * tst-detach1.c: New file.
5171 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
5173         * sysdeps/pthread/pthread.h: Remove duplicate
5174         pthread_cleanup_{push,pop} definitions.
5176         * tst-barrier2.c: Eliminate warnings.
5177         * tst-cancel4.c: Likewise.
5178         * tst-cond4.c: Likewise.
5179         * tst-cond6.c: Likewise.
5180         * tst-detach1.c: Likewise.
5181         * tst-rwlock4.c: Likewise.
5182         * tst-rwlock6.c: Likewise.
5183         * tst-rwlock7.c: Likewise.
5184         * tst-sem3.c: Likewise.
5185         * tst-spin2.c: Likewise.
5186         * tst-umask1.c: Likewise.
5188 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
5190         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5192 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
5194         * descr.h (struct pthread): Move cancelhandling member to the front.
5196 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
5198         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5199         malloc_parent, and malloc_child statically.
5200         (__register_atfork_malloc): New function.
5201         (free_mem): Don't free any of the malloc_* variables on the list.
5202         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5203         Define HAVE_register_atfork_malloc.
5205 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
5207         * sysdeps/pthread/createthread.c (create_thread): Add some more
5208         comments explaining when to set multiple_threads and when not.
5210         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5211         THREAD_ATOMIC_BIT_SET if not already defined.
5212         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5213         THREAD_ATOMIC_BIT_SET:
5214         * sysdeps/x86_64/tls.h: Likewise.
5215         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5216         THREAD_ATOMIC_CMPXCHG_VAL.
5217         (_pthread_cleanup_pop_restore): Likewise.
5218         * cancellation.c (__pthread_enable_asynccancel): Likewise.
5219         (__pthread_enable_asynccancel_2): Likewise.
5220         (__pthread_disable_asynccancel): Likewise.
5221         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5222         (__libc_disable_asynccancel): Likewise.
5223         * init.c (sigcancel_handler): Likewise.
5224         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5225         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5227 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
5229         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5230         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5231         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5232         * Makefile (tests): Add tst-cancel11.
5233         * tst-cancel11.c: New file.
5235 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
5237         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5238         round, not the first.  Use specific_used flag instead of local
5239         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
5240         (__free_tcb): Don't call deallocate_tsd here.
5241         (start_thread): Call deallocate_tsd here.
5242         * pthread_setspecific.c: Set specific_used flag really only when
5243         needed.
5244         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5245         * tst-tsd3.c: New file.
5246         * tst-tsd4.c: New file.
5248 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5250         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5251         Use atomic_exchange_and_add instead of __lll_add.
5252         (__lll_mutex_timedlock): Likewise.
5253         Patch by Ian Wienand.
5255 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
5257         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5258         (SINGLE_THREAD_P): Fix typo.
5259         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5261 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5263         * Makefile (tests): Add tst-align.
5264         * tst-align.c: New file.
5265         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5267         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5268         function correctly.
5270         * tst-tsd2.c: Add casts to avoid warnings.
5272 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
5274         * descr.h (struct pthread): Move most often used elements to the front.
5276 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
5278         * Makefile (libpthread-routines): Add pthread_atfork.
5279         (libpthread-static-only-routines): Add pthread_atfork.
5281 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5283         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5284         of TLS_DTV_AT_TP.
5285         (INSTALL_DTV): Add parens.
5286         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5287         Use passed descr instead of THREAD_SELF.
5288         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5289         (__lll_mutex_timedlock_wait): Correct expected value after
5290         spurious wakeup.
5291         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5292         Release lock before waking up the waiters.
5293         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5294         criteria.  Reorderstruct passed to cleanup handler.  Fix
5295         handling of cancellation and failung pthread_mutex_unlock call.
5296         Use __pthread_enable_asynccancel_2 instead of
5297         __pthread_enable_asynccancel.
5298         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5299         Return result of lock re-get if it fails.
5300         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5301         for __pthread_cleanup_push.
5302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5303         completely broken rwlock implementation.
5304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5305         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5306         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5308         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5309         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5310         versioned_symbol macro.
5311         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5312         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5314 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5316         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5317         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5318         and __helper_tid.
5319         (struct timer): Remove th and bar field.
5320         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5321         debugging code.  Create only one helper thread.
5322         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5323         helper thread.
5324         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5325         Renamed.  Define statically.  Use thread info from siginfo.
5326         (__helper_once): New variable.
5327         (__helper_tid): New variable.
5328         (__reset_helper_control): New function.
5329         (__start_helper_thread): New function.
5331         * pthread_create.c (start_thread): Don't use setjmp inside
5332         __builtin_expect to work around gcc bug.
5334         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5335         timer_delete syscall fails, but not with ENOSYS, set
5336         __no_posix_timers.
5338         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5339         (timer_settime): Fix typo.
5340         * sysdeps/unix/sysv/linux/timer_getoverr.c
5341         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5343 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5345         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5346         offset of cleanupbuf.__prev.
5348 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5350         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5351         of included file.
5353 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5355         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5356         NULL provide default definition to syscall.
5358 2003-03-25  Roland McGrath  <roland@redhat.com>
5360         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5361         (timer_id2ptr): Fix typo.
5363 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5365         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5366         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5367         * sysdeps/ia64/pthreaddef.h: Likewise.
5368         * sysdeps/powerpc/pthreaddef.h: Likewise.
5369         * sysdeps/s390/pthreaddef.h: Likewise.
5370         * sysdeps/sh/pthreaddef.h: Likewise.
5371         * sysdeps/x86_64/pthreaddef.h: Likewise.
5372         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5373         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5374         being changed.
5375         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5376         SIGTIMER is not unblocked.
5377         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5378         RT signal taken.
5379         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5380         be send.
5381         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5382         pass pointer through as ID.
5383         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5384         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5385         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5386         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5387         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5388         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5389         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5390         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5391         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5392         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5393         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5394         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5395         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5396         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5397         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5398         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5400         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5401         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5402         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5403         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5404         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5405         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5406         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5407         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5408         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5409         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5410         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5411         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5412         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5413         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5414         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5415         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5417         * pthreadP.h: Remove FRAME_LEFT definition.
5418         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5419         already left frame.  Programs which have this problem are not POSIX
5420         compliant.
5421         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5423 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5425         * sysdeps/pthread/tst-timer.c: Check return values of the
5426         functions we test.
5428 2003-03-23  Roland McGrath  <roland@redhat.com>
5430         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5431         * tst-tls3mod.c: Likewise.
5432         * tst-tls1.c: Likewise.
5433         * tst-tls2.c: Likewise.
5435         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5436         undefined behavior.
5438         * tst-join5.c (tf1, tf2): Add a cast.
5440         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5442         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5443         Don't test anything.
5444         * tst-cond4.c: Likewise.
5445         * tst-cond6.c: Likewise.
5446         * tst-flock2.c: Likewise.
5447         * tst-mutex4.c: Likewise.
5448         * tst-rwlock4.c: Likewise.
5449         * tst-signal1.c: Likewise.
5450         * tst-spin2.c: Likewise.
5451         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5453         * tst-mutex4.c: Use test-skeleton.c.
5454         * tst-spin2.c: Likewise.
5455         * tst-sysconf.c: Likewise.
5456         * tst-barrier2.c: Likewise.
5457         * tst-cond4.c: Likewise.
5458         * tst-cond6.c: Likewise.
5459         * tst-rwlock4.c: Likewise.
5460         * tst-unload.c: Likewise.
5461         * tst-flock2.c (do_test): Use return instead of exit.
5463 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5465         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5467 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5469         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5470         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5471         instead of __lll_compare_and_swap.
5472         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5473         Likewise.
5474         Removed definition if __lll_compare_and_swap.
5476         * cancellation.c: Adjust for new form of compare&exchange macros.
5477         * cleanup_defer.c: Likewise.
5478         * init.c: Likewise.
5479         * libc-cancellation.c: Likewise.
5480         * old_pthread_cond_broadcast.c: Likewise.
5481         * old_pthread_cond_signal.c: Likewise.
5482         * old_pthread_cond_timedwait.c: Likewise.
5483         * old_pthread_cond_wait.c: Likewise.
5484         * pthread_cancel.c: Likewise.
5485         * pthread_create.c: Likewise.
5486         * pthread_detach.c: Likewise.
5487         * pthread_join.c: Likewise.
5488         * pthread_key_delete.c: Likewise.
5489         * pthread_setcancelstate.c: Likewise.
5490         * pthread_setcanceltype.c: Likewise.
5491         * pthread_timedjoin.c: Likewise.
5492         * pthread_tryjoin.c: Likewise.
5493         * sysdeps/pthread/createthread.c: Likewise.
5495 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5497         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5498         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5499         definitions.  Replace uses with calls to atomic_* functions.
5500         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5501         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5502         __lll_test_and_set calls with atomic_exchange_and_add and
5503         atomic_exchange calls respectively.
5504         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5505         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5506         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5507         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5508         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5509         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5510         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5512         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5513         returns the old value.
5515 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5517         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5518         int for variable OLDVAL and correct inline assembler contraint.
5519         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5520         type int for variable OLD.
5522         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5523         only for s390-32.
5524         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5525         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5526         instead of multiple_threads field in the TCB.
5528 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5530         * sysdeps/i386/i686/bits/atomic.h: Removed.
5531         * sysdeps/i386/i586/bits/atomic.h: Removed.
5532         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5533         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5534         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5535         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5536         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5537         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5538         * atomic.h: Removed.  Moved to glibc.
5540         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5541         support for clock selection.
5543         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5544         signalling waiters.
5546 2003-03-18  Roland McGrath  <roland@redhat.com>
5548         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5549         Add __lll_rel_instr first.  Add memory clobber.
5550         (lll_mutex_unlock): Use __lll_test_and_set.
5551         From Paul Mackerras <paulus@samba.org>.
5553         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5554         unconditionally.
5555         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5556         (SINGLE_THREAD_P):  Add `header.' prefix.
5557         From Paul Mackerras <paulus@samba.org>.
5559         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5560         pthread_timedjoin_np to ...
5561         (libpthread: GLIBC_2.3.3): ... here.
5562         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5564         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5565         Avoid shadowing VAL variable.
5567         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5568         New macro.
5570 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5572         * Makefile (tests): Add tst-cond11.
5573         * tst-cond11.c: New file.
5575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5576         struct passed to cleanup handler to eliminate one more
5577         instruction.
5578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5580         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5581         (pthrad_cond_t): Replace __unused field with __clock.
5583         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5584         waken all waiters in cleanup handler.
5585         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5588         * pthread_condattr_getclock.c: New file.
5589         * pthread_condattr_setclock.c: New file.
5590         * sysdeps/pthread/pthread.h: Declare these new functions.
5591         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5592         * Makefile (libpthread-routines): Add the new functions.
5593         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5594         Renamed field to value.  Document use of the bits.
5595         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5596         change.
5597         * pthread_condattr_setpshared.c: Likewise.
5598         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5599         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5600         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5601         Add __clock field.
5602         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5603         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5604         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5605         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5607         Implement clock selection.
5608         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5609         * pthread-errnos.sym: Add ENOSYS.
5610         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5611         _POSIX_CLOCK_SELECTION.
5612         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5614         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5615         invalid .size directive.
5617 2003-03-17  Roland McGrath  <roland@redhat.com>
5619         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5620         Formatting tweaks.
5622 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5624         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5625         Use __lll_add instead of spelling it out.  Use protected symbol names.
5626         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5627         Use __lll_add.
5628         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5629         Renamed from lll_compare_and_swap.  Use new name where necessary.
5630         (__lll_add): Defined.
5631         (__lll_dec_if_positive): Defined.
5632         (__lll_test_and_set): Defined.
5633         * sysdeps/ia64/pthread_spin_init.c: Removed.
5634         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5635         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5636         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5637         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5638         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5639         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5640         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5641         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5642         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5643         __sync_lock_release_si.
5644         Patch by Jakub Jelinek.
5646         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5647         Fix timeout handling.
5648         (__lll_timedwait_tid): Likewise.
5649         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5650         Patch by Jakub Jelinek.
5652         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5654 2003-03-17  Roland McGrath  <roland@redhat.com>
5656         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5657         * sysdeps/pthread/pthread_spin_init.c: New file.
5658         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5659         * sysdeps/powerpc/Makefile: New file.
5660         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5661         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5662         * sysdeps/powerpc/pthreaddef.h: New file.
5663         * sysdeps/powerpc/tcb-offsets.sym: New file.
5664         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5665         * sysdeps/powerpc/tls.h: New file.
5666         * sysdeps/powerpc/bits/atomic.h: New file.
5667         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5668         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5669         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5671         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5672         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5673         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5674         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5675         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5676         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5677         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5678         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5679         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5680         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5681         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5682         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5683         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5684         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5685         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5687         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5688         not gettimeofday.
5689         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5690         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5691         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5692         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5693         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5695 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5697         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5698         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5701         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5703 2003-03-16  Roland McGrath  <roland@redhat.com>
5705         * tst-fork4.c: Include <string.h>.
5706         * tst-signal2.c: Likewise.
5707         * tst-mutex5.c (do_test): exit -> return.
5708         * tst-mutex2.c: Include <stdlib.h>.
5710 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5712         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5713         (__lll_mutex_timedlock_wait): Correct expected value after
5714         spurious wakeup.  Otherwise we would never wait again.
5716         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5717         zone versus inline asm stupidity.  Use correct instructions.
5719         * tst-rwlock6.c: Add some more status output.
5721 2003-03-15  Roland McGrath  <roland@redhat.com>
5723         * sysdeps/pthread/configure.in: New file.
5724         * sysdeps/pthread/configure: New file (generated).
5726 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5728         * allocatestack.c (allocate_stack): Store the exact stack size of
5729         user allocated stacks.
5731 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5733         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5734         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5735         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5736         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5737         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5738         Use `header.' prefix.
5739         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5741 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5743         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5744         __builtin_frame_address, use stack pointer.
5746         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5747         instead of __builtin_frame_pointer.
5749 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5751         * tst-basic1.c (do_test): Add cast to avoid warning.
5752         * tst-basic2.c (do_test): Likewise.
5754         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5755         amount of stack correction.
5757         * tst-fork4.c: Use test-skeleton.c.
5759 2003-03-14  Roland McGrath  <roland@redhat.com>
5761         * init.c: Fix typo "#eli" for "#else".
5763 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5765         * allocatestack.c (__stack_user): Use hidden_data_def.
5766         * pthread_create.c (__pthread_keys): Likewise.
5768         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5770 2003-03-14  Roland McGrath  <roland@redhat.com>
5772         * tst-fork4.c: New file.
5773         * Makefile (tests): Add it.
5775         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5776         we always define the padding space.
5777         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5778         stopped supporting its own extensions fully.
5779         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5780         struct also called `header', so `header.multiple_threads' is the field
5781         name to use on all machines.
5782         * allocatestack.c (allocate_stack): Use `header.' prefix.
5783         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5784         * pthread_create.c (__pthread_create_2_1): Likewise.
5785         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5786         (THREAD_SELF): Likewise.
5787         * sysdeps/x86_64/tls.h: Likewise.
5788         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5789         (SINGLE_THREAD_P): Likewise.
5790         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5791         (SINGLE_THREAD_P): Likewise.
5792         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5793         (SINGLE_THREAD_P): Likewise.
5795         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5796         value directly.
5798 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5800         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5801         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5803         * pthread_create.c (start_thread): setjmp is expected to return 0.
5805         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5806         (THREAD_GETMEM_NC): Likewise.
5808 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
5810         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5811         and the size of the stack which must be allocated is a multiple,
5812         allocate one more page.
5813         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5814         MULTI_PAGE_ALIASING.
5816 2003-03-13  Roland McGrath  <roland@redhat.com>
5818         * pthread_create.c (start_thread): Set EXITING_BIT after the
5819         event-reporting (and destructors), not before.
5821 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
5823         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5824         lll_futex_wake): Declare register variables as long int instead of
5825         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5826         Make syscall arguments clobbered by the syscall.
5827         (lll_futex_wait): Define using lll_futex_timed_wait.
5829         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5830         to void *.
5832         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5833         PPID if [! NDEBUG].
5835         * allocatestack.c (nptl_ncreated): Only declare if
5836         COLORING_INCREMENT != 0.
5838         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5839         (__libc_enable_asynccancel_2): Remove prototype.
5841         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5842         ctid to match kernel.
5844 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5846         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5847         libc_multiple_threads.
5848         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5849         __libc_multiple_threads to...
5850         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
5852         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5853         versioning.
5854         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5855         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5857         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5858         (__pthread_once_internal): Define.
5860         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5861         macros instead of .symver directly.
5862         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5863         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5865         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5866         * sysdeps/x86_64/tcb-offsets.sym: New file.
5867         * sysdeps/x86_64/Makefile: New file.
5869         * sysdeps/i386/tcb-offsets.sym: Add SELF.
5870         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5871         to access own pthread_t in TCB.
5872         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5873         Likewise.
5874         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5875         Likewise.
5876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5878 2003-03-12  Roland McGrath  <roland@redhat.com>
5880         * pthread-errnos.sym: New file.
5881         * Makefile (gen-as-const-headers): New variable, list that file.
5882         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5883         header <pthread-errnos.h> instead of defining errno values here.
5884         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5885         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5886         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5888         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5889         Likewise.
5890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5891         Likewise.
5892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5894         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5895         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5896         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5897         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5898         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5899         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5901         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5902         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5903         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5904         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5905         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5906         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5907         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5908         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5909         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5910         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5911         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5912         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5913         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5914         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5915         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5916         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5917         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5918         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5920         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5921         CLONE_CHILD_SETTID worked.
5923 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5925         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5926         file.
5927         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5928         file.
5930         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5931         (pthread_cond_t): Add padding.
5933         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5935         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5937         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5938         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5939         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5940         (__pthread_rwlock_timedrdlock): Likewise.
5941         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5942         (__pthread_rwlock_wrlock): Likewise.
5943         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5944         (__pthread_rwlock_rdlock): Likewise.
5946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5949         result of lock re-get if it fails.
5951 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5953         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5954         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5955         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5957         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5958         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5959         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5960         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5961         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5962         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5964         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5965         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5967         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5968         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5969         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5970         (create_thread): Likewise.
5971         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5972         * init.c (__pthread_initialize_minimal_internal): Initialize
5973         __libc_multiple_threads_ptr if necessary.
5974         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
5975         __pthread_multiple_threads and __libc_multiple_threads_ptr.
5976         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5977         __libc_multiple_threads.
5978         (__libc_pthread_init): Return pointer to __libc_pthread_init if
5979         necessary.
5981         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5982         (THREAD_SETMEM_NC): Likewise.
5984         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5985         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5986         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5987         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5989         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5990         Eliminate one entire instruction.
5992         * cancellation.c (__pthread_enable_asynccancel_2): New function.
5993         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5995         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5996         instead of __pthread_enable_asynccancel.
5997         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5998         (__pthread_cond_wait): Likewise.
5999         * sysdeps/pthread/pthread_cond_timedwait.c
6000         (__pthread_cond_timedwait): Likewise.
6001         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6004         (__condvar_cleanup): Wake up all waiters in case we got signaled
6005         after being woken up but before disabling asynchronous
6006         cancellation.
6007         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6008         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6009         (__condvar_cleanup): Likewise.
6011         * init.c (__NR_set_tid_address): If already defined, don't redefine.
6012         Make it an error if architecture has no #if case.  Add x86-64.
6014         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6015         pt-initfini.s generation.
6017         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6018         (TLS_INIT_TP): Fix typo.
6020 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6022         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6023         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6025         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6026         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6027         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6028         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6029         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6030         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6031         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6032         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6034 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6036         * sysdeps/pthread/pthread_cond_timedwait.c
6037         (__pthread_cond_timedwait): Return the result of the final
6038         locking.  If it succeeds, the regular function return value.
6040         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6041         Return result of the final locking.
6042         * version.c (__nptl_main): Work around problems with the strange
6043         INTERNAL_SYSCALL macro on ppc32.
6044         * init.c (__pthread_initialize_minimal_internal): Unblock
6045         SIGCANCEL in case the parent blocked it.
6046         Reported by Paul Mackerras <paulus@samba.org>.
6048         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6049         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6052 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6054         * sysdeps/pthread/pthread_cond_timedwait.c
6055         (__pthread_cond_timedwait): Unlock and fail if
6056         __pthread_mutex_unlock_internal failed.
6058         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6059         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6060         Use ARCH_CLONE.
6061         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6062         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6063         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6064         ALLOCATE_STACK): New macros.
6065         (TLS_TPADJ): New macro.
6066         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6067         (allocate_stack): Handle TLS_DTV_AT_TP and
6068         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
6069         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6070         Don't set PD->self.
6071         * init.c [__ia64__] (__NR_set_tid_address): Define.
6073         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6074         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6075         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6076         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6077         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6078         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6079         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6080         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6081         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6082         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6083         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6084         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6085         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6086         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6087         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6088         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6089         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6090         * sysdeps/ia64/bits/atomic.h: New file.
6091         * sysdeps/ia64/Makefile: New file.
6092         * sysdeps/ia64/pthread_spin_init.c: New file.
6093         * sysdeps/ia64/pthread_spin_lock.c: New file.
6094         * sysdeps/ia64/pthread_spin_trylock.c: New file.
6095         * sysdeps/ia64/pthread_spin_unlock.c: New file.
6096         * sysdeps/ia64/pthreaddef.h: New file.
6097         * sysdeps/ia64/tcb-offsets.sym: New file.
6098         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6099         * sysdeps/ia64/tls.h: New file.
6101         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6102         to syscall instead of no arguments.
6104 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
6106         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6107         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6108         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6109         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6111         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6112         unused code.
6114         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6116         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6117         lowlevelbarrier.sym.
6118         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6119         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6120         Include lowlevelbarrier.h and don't define offsets locally.
6121         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6124         (__lll_mutex_lock_wait): Reverse order of first two parameters.
6125         (__lll_mutex_timedlock_wait): Likewise.
6126         (lll_mutex_lock): Adjust asm for that.
6127         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
6128         (lll_lock): Adjust asm for operand order change.
6129         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6130         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6132         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6133         Reverse order of parameters.
6134         (__lll_timedwait_tid): Remove regparms attribute.
6135         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6136         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6138         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6139         (__lll_timedwait_tid): Remove one unnecessary instruction.
6141         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6142         __lll_mutex_timedlock_wait only for NOT_IN_libc.
6143         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6144         lowlevelmutex.S.
6146         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6147         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6148         for NOT_IN_libc.
6149         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6150         lowlevellock.S.
6152         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6153         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
6154         for libc.so.
6155         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6156         define LOCK here (if UP is not defined).  The actual code is in
6157         lowlevelmutex.S.
6159         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6160         LOCK is already defined.  Don't define lll_unlock_wake_cb and
6161         __lll_timedwait_tid for libc.so.
6162         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6163         define LOCK here (if UP is not defined).  The actual code is in
6164         lowlevellock.S.
6166         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6167         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6168         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6169         instead of lowlevelsem.h.
6170         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6171         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6172         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6174         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6175         lowlevelrwlock.sym.
6176         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6177         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6178         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6180         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6181         register loading.
6182         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6183         last changed.  D'oh.
6185         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6187         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6188         of __libc_locking_needed.
6189         (lll_trylock): Initialize %eax to zero.
6191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6192         pthread_cond_t definition.
6194 2003-03-10  Roland McGrath  <roland@redhat.com>
6196         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6197         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6198         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6199         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6200         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6202         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6203         Instead of setting PD->multiple_threads, set globals
6204         __pthread_multiple_threads and __libc_multiple_threads.
6205         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6206         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6207         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6209         * descr.h (struct pthread): Conditionalize first member on
6210         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
6211         containing an anonymous tcbhead_t.  Move `list' member out.
6212         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6213         * allocatestack.c: Remove use of `header.data.' prefix.
6214         * pthread_create.c: Likewise.
6215         * init.c (__pthread_initialize_minimal_internal): Likewise.
6216         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6217         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6218         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6219         * sysdeps/x86_64/tls.h: Likewise.
6220         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6221         (SINGLE_THREAD_P): Likewise.
6222         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6223         (SINGLE_THREAD_P): Likewise.
6224         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6225         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6227 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
6229         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6231         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6232         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6234         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6235         leftovers from the ia32 code.
6237         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6238         memory load.
6239         (clear_once_control): Don't load %esi.
6241         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6242         handling.
6244         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6246         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6247         * sysdeps/unix/sysv/linux/createthread.c: ...here.
6249         * Makefile (tests): Add tst-cond10.
6250         * tst-cond10.c: New file.
6252 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
6254         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6255         * tst-signal3.c (do_test): Likewise.
6256         * tst-sem5.c (do_test): Likewise.
6257         * tst-kill6.c (do_test): Likewise.
6258         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
6260         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6261         of inc/dec.
6262         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6263         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6264         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6265         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6267         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6269         Likewise.
6270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6271         Likewise.
6272         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6277         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6278         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6279         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6281         * allocatestack.c (allocate_stack): If mprotect() fails free the
6282         TLS memory.
6284 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6286         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6288         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6289         lll_wake_tid.  This was used only to work around kernel limits in
6290         the early days.
6291         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6292         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6293         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6294         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6296         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6297         (__pthread_initialize_minimal_internal): Change initialization of
6298         __static_tls_align_m1 appropriately.
6299         * pthreadP.h (__static_tls_align_m1): Renamed from
6300         __static_tls_align.
6301         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6302         instead of __static_tls_align-1.
6304 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6306         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6308         * pthread_create.c: Define __pthread_keys using nocommon
6309         attribute, not by placing it explicitly in bss.
6310         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6312         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6313         Use it in mmap call to allocate stacks.
6315         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6317         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6318         result of the thread function.
6320 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6322         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6323         version is just fine.
6325         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6326         (__pthread_child_handler): Renamed from pthread_child_handler,
6327         exported, and marked hidden.  Change all users.
6328         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6329         free __pthread_child_handler from child list.
6331 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6333         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6335         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6336         Fix handling of cancellation and failing pthread_mutex_unlock call.
6337         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6338         (__pthread_cond_wait): Likewise.
6340         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6341         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6342         lll_futex_timed_wait call.
6343         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6344         (pthread_rwlock_timedwrlock): Likewise.
6346         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6347         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6348         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6350         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6351         check of lll_futex_wake return value.
6353 2003-03-03  Roland McGrath  <roland@redhat.com>
6355         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6357         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6358         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6359         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6361 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6363         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6364         error for CPU clocks.
6366         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6367         _POSIX_MONOTONIC_CLOCK.
6368         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6370         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6371         recent kernels.
6373 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6375         * descr.h (struct pthread): Move cleanup field to the front.
6377 2003-03-01  Roland McGrath  <roland@redhat.com>
6379         * sem_open.c (sem_open): Braino fix.
6381 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6383         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6385         __pthread_cleanup_pop functionality.
6386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6388         * descr.h (struct pthread): Move tid field to the front now that
6389         it is often used.
6391         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6392         (__lll_mutex_timedlock_wait): Remove.
6393         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6394         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6395         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6396         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6397         (lll_unlock_wake_cb): Don't save and restore %esi.
6398         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6399         %esi.
6400         (__lll_timedwait_tid): Add alignment.
6401         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6402         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6403         %esi.
6404         (__lll_timedwait_tid): Removed.
6405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6406         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6407         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6408         (pthread_barrier_wait): Don't save, load, and restore %esi for
6409         last thread.
6410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6411         (__pthread_cond_signal): Don't save, load, and restore %esi.
6412         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6413         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6414         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6415         Don't save, load, and restore %esi.
6417 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6419         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6420         Release lock before waking up the waiters.
6422         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6424         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6425         (reader_thread): Likewise.
6427         * sysdeps/pthread/pthread_rwlock_unlock.c
6428         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6429         to wake up readers if there are none.
6431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6432         Release internal lock before wake threads.
6434 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6436         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6437         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6438         predefined.
6439         * tst-rwlock9.c: Likewise.
6440         * tst-rwlock10.c: New file.
6441         * tst-rwlock11.c: New file.
6443         * Makefile (tests): Add tst-dlsym1.
6444         * tst-dlsym1.c: New file.
6446         * init.c (__pthread_initialize_minimal_internal): Set
6447         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6448         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6450 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6452         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6454         * tst-cond2.c: Fix sychronization with child.
6456         * tst-rwlock8.c (reader_thread): Remove unused variable.
6458         * Makefile: Add rules to build and run tst-tls3.
6459         * tst-tls3.c: New file.
6460         * tst-tls3mod.c: New file.
6462         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6463         * tst-rwlock8.c: New file.
6464         * tst-rwlock9.c: New file.
6465         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6466         complete broken rwlock implementation.
6467         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6468         Likewise.
6469         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6470         Likewise.
6471         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6472         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6473         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6474         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6475         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6476         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6477         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6479 2003-02-23  Roland McGrath  <roland@redhat.com>
6481         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6483 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6485         * Makefile (tests): Add tst-context1.
6486         * tst-context1.c: New file.
6488         * Makefile (tests): Add tst-tls1 and tst-tls2.
6489         * tst-tls1.c: New file.
6490         * tst-tls2.c: New file.
6492         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6493         for failed cmpxchg.
6495         * pthread_create.c (start_thread): Set EXITING_BIT early.
6497         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6498         (THREAD_GETMEM_NC): Likewise.
6500 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6502         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6503         off 3 more bytes by using offset-less instructions when possible.
6505         * Makefile: Add dependency for $(objpfx)version.d.
6507         * eintr.c (eintr_source): Add unnecessary return but the compiler
6508         insists.
6510         * tst-kill3.c: Include <unistd.h>.
6512 2003-02-21  Roland McGrath  <roland@redhat.com>
6514         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6516 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6518         * Makefile (tests): Add tst-eintr1.
6519         (distribute): Add eintr.c.
6520         * tst-eintr1.c: New file.
6521         * eintr.c: New file.
6523         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6525         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6526         Disallow sending SIGCANCEL.
6528         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6529         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6530         * tst-kill1.c: New file.
6531         * tst-kill2.c: New file.
6532         * tst-kill3.c: New file.
6533         * tst-kill5.c: New file.
6534         * tst-kill6.c: New file.
6535         * tst-basic7.c: Renamed to...
6536         * tst-kill4.c: ...this.
6538 2003-02-21  Roland McGrath  <roland@redhat.com>
6540         * Makefile (install-lib-ldscripts): New variable.
6542 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6544         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6545         * pthread_cancel.c: Use INVALID_TD_P.
6546         * pthread_detach.c: Likewise.
6547         * pthread_getschedparam.c: Likewise.
6548         * pthread_setschedparam.c: Likewise.
6549         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6550         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6551         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6552         * pthread_timedjoin.c: Likewise.
6554         * tst-basic7.c: Include <signal.h>.
6556         * pthread_join.c (pthread_join): Limited checking for invalid
6557         descriptors.
6558         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6560 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6562         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6563         beginning of the loop.  Clear the entire first block of TSD.
6564         * Makefile (tests): Add tst-key4.
6565         * tst-key4.c: New file.
6567 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6569         * Makefile (tests): Add tst-basic7.
6570         * tst-basic7.c: New file.
6572         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6573         Add some more __builtin_expect.
6575         * pthreadP.h: Define dummy version of DEBUGGING_P.
6577 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6579         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6580         _POSIX_THREAD_PRIORITY_SCHEDULING.
6581         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6582         _XOPEN_REALTIME_THREADS.
6583         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6585         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6586         kernel returns EINVAL for PID <= 0, work around it.
6588         * Makefile (tests): Add tst-signal5.
6589         * tst-signal5.c: New file.
6591         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6592         and LOGIN_NAME_MAX.
6594         * tst-cancel1.c (tf): Block all signals.
6596         * Makefile (tests): Add tst-basic6.
6597         * tst-basic6.c: New file.
6599         * tst-basic1.c: Add test for process ID.
6601         * Makefile (tests): Add tst-cancel10.
6602         * tst-cancel10.c: New file.
6604         * Makefile (tests): Add tst-signal4.
6605         * tst-signal4.c: New file.
6607         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6608         __sigismember instead of sigismember.  Add __builtin_expect.
6610 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6612         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6613         pthread_setcancelstate, and pthread_rwlock_setpshared.
6615         * tst-cancel7.c (do_test): Make sure the pid file exists before
6616         canceling the thread.
6618         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6619         pthread_rwlock_timedrdlock tests.
6620         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6622         Check for invalid tv_nsec field.
6623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6624         Likewise.
6626         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6627         recursive mutex of overflow.
6629         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6631         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6632         going into an endless loop.
6633         * Makefile (tests): Add tst-cancel9.
6634         * tst-cancel9.c: New file.
6636         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6638 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6640         * tst-mutex5.c (do_test): Add more timedlock tests.
6642         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6643         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6645         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6646         use INLINE_SYSCALL.  Error number is returned, not -1.
6648         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6649         and __deallocate_stack with internal_function.
6650         * pthread_create.c: Adjust definitions appropriately.
6651         * allocatestack.c: Likewise.
6653         * pthread_join.c: Add one more __builtin_expect.
6654         * pthread_timedjoin.c: Likewise.
6656         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6657         not data of sequence number does not match.
6658         Add one __builtin_expect.
6660         * Makefile (tests): Add tst-clock1.
6661         * tst-clock1.c: New file.
6663         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6664         negative arguments.
6665         * Makefile (tests): Add tst-basic5.
6666         * tst-basic5.c: New file.
6668 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6670         * Makefile (tests): Add tst-basic4.
6671         * tst-basic4.c: New file.
6673         * pthreadP.h: Add declaraction for __nptl_nthreads.
6674         * pthread_create.c: Define __nptl_nthreads
6675         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6676         after thread is done.  If then zero, call exit(0).
6677         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6678         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6679         * init.c (pthread_functions): Initialize ptr_nthreads.
6680         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6681         (__reclaim_stacks): Decrement __nptl_nthreads.
6682         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6683         Define.
6684         * Makefile (tests): Add tst-basic3.
6685         * tst-basic3.c: New file.
6687         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6688         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6689         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6690         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6691         if asynchronous canceling is enabled.
6692         * pthread_join.c (pthread_join): When recognizing circular joins,
6693         take into account the other thread might be already canceled.
6694         * Makefile (tests): Add tst-join5.
6695         * tst-join5.c: New file.
6697         * Makefile (tests): Add tst-join4.
6698         * tst-join4.c: New file.
6700 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6702         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6704 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6706         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6707         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6708         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6709         warning.
6710         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6711         to avoid warning.
6712         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6713         error if lll_futex_wake failed.
6715 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6718         handling of cancellation and failung pthread_mutex_unlock call.
6719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6720         * Makefile (tests): Add tst-cond8 and tst-cond9.
6721         * tst-cond8.c: New file.
6722         * tst-cond9.c: New file.
6724         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6726         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6727         non-standard initializers with __USE_GNU.
6729         * Makefile (tests): Add tst-cleanup3.
6730         * tst-cleanup3.c: New file.
6732 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6734         * Makefile (tests): Add tst-attr1 and tst-attr2.
6735         * tst-attr1.c: New file.
6736         * tst-attr2.c: New file.
6738         * Makefile: Add rules to build and run tst-atfork2 test.
6739         * tst-atfork2.c: New file.
6740         * tst-atfork2mod.c: New file.
6742         * sysdeps/unix/sysv/linux/unregister-atfork.c
6743         (__unregister_atfork): Free the memory allocated for the handlers
6744         after removing them from the lists.
6746         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6747         cleanup function.
6749         * tst-atfork1.c (do_test): Wait for the child we forked.
6750         Report error in child.
6752         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6754         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6756 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6758         * Makefile (tests): Add tst-cancel8.
6759         * tst-cancel8.c: New file.
6761         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6762         clearing of control variable.
6763         * Makefile (tests): Add tst-once3 and tst-once4.
6764         * tst-once3.c: New file.
6765         * tst-once4.c: New file.
6767 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6769         * sysdeps/sh/Makefile: New file.
6770         * sysdeps/sh/bits/atomic.h: New file.
6771         * sysdeps/sh/pthread_spin_init.c: New file.
6772         * sysdeps/sh/pthread_spin_lock.c: New file.
6773         * sysdeps/sh/pthread_spin_trylock.S: New file.
6774         * sysdeps/sh/pthread_spin_unlock.S: New file.
6775         * sysdeps/sh/pthreaddef.h: New file.
6776         * sysdeps/sh/tcb-offsets.sym: New file.
6777         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6778         * sysdeps/sh/tls.h: New file.
6779         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6780         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6781         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6782         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6783         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6784         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6785         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6786         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6787         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6788         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6789         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6790         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6791         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6792         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6793         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6794         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6795         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6796         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6797         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6798         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6799         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6800         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6801         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6802         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6803         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6804         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6805         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6806         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6807         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6808         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6810 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
6812         * tst-cond2.c: Rearrange code to not rely on behavior undefined
6813         according to POSIX.
6815         * tst-basic2.c (do_test): Lock mutex before creating the thread.
6817 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
6819         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6820         (TLS_GET_FS): New #define.
6821         (TLS_SET_FS): New #define.
6822         Correct value of __NR_set_thread_area.
6824         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6826 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
6828         * Makefile (tests): Add tst-popen1.
6829         * tst-popen1.c: New file.
6831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6832         but inactive generalization.
6833         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6834         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6835         Minor optimization, remove one instruction.
6836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6838 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6840         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6842 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6844         * init.c (__NR_set_tid_address): Add #ifdef for s390.
6845         * sysdeps/pthread/pthread_barrier_wait.c: New file.
6846         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6847         * sysdeps/pthread/pthread_cond_signal.c: New file.
6848         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6849         * sysdeps/pthread/pthread_cond_wait.c: New file.
6850         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6851         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6852         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6853         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6854         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6855         * sysdeps/s390/Makefile: New file.
6856         * sysdeps/s390/bits/atomic.h: New file.
6857         * sysdeps/s390/pthread_spin_init.c: New file.
6858         * sysdeps/s390/pthread_spin_lock.c: New file.
6859         * sysdeps/s390/pthread_spin_trylock.c: New file.
6860         * sysdeps/s390/pthread_spin_unlock.c: New file.
6861         * sysdeps/s390/pthreaddef.h: New file.
6862         * sysdeps/s390/tcb-offsets.sym: New file.
6863         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6864         * sysdeps/s390/tls.h: New file.
6865         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6866         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6867         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6868         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6869         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6870         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6871         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6872         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6873         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6874         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6875         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6876         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6877         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6878         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6879         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6880         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6881         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6882         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6883         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6884         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6885         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6886         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6887         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6889 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
6891         * atomic.h: Add a couple more default implementations.
6892         (atomic_compare_and_exchange_acq): Use
6893         __arch_compare_and_exchange_32_acq in return value definition.  It
6894         always exists.
6895         (atomic_bit_set): Renamed from atomic_set_bit.
6896         Add missing atomic_ prefixes.
6898         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6899         thread library is available, use correct value to mark initialized
6900         once variable.
6902 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
6904         * allocatestack.c (allocate_stack): Use __getpagesize instead of
6905         __sysconf to determine pagesize.
6907         * pthread_create.c: Include <atomic.h>.
6908         * allocatestack.c (allocate_stack): Implement coloring of the
6909         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
6910         size minus one.  Adjust users.
6911         * sysdeps/i386/i686/Makefile: New file.
6913 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
6915         * allocatestack.c: Improve comment throughout the file.
6917         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6918         (__lll_lock_wait): Add branch prediction.
6919         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6920         (__lll_lock_wait): Likewise.
6921         (lll_unlock_wake_cb): Removed.
6923 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
6925         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6926         _POSIX_THREAD_PRIORITY_SCHEDULING.
6928 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
6930         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6931         Fix return type of ptr___pthread_getspecific.
6933 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
6935         * Makefile (tests): Add tst-umask1.
6936         (tst-umask1-ARGS): Define.
6937         * tst-umask1.c: New file.
6939 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
6941         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
6942         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6943         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6944         pthread_rwlock_unlock.
6945         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6946         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6947         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6948         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6949         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6950         New file.
6951         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6952         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6953         New file.
6954         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6955         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6956         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6957         New file.
6958         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6959         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6960         New file.
6961         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6962         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6963         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6964         New file.
6965         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6966         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6967         New file.
6968         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6970         * Makefile (libpthread-routines): Remove lowlevelcond and
6971         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6972         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6973         and pthread_cond_broadcast.
6974         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6975         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6976         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6977         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6978         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6979         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6980         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6981         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6982         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6983         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6986         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6988         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6989         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6990         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6991         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6992         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6993         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6994         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6995         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6996         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6997         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6998         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6999         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
7000         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
7001         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
7002         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
7003         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
7004         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
7006         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
7007         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
7008         of the code is moved to ...
7009         * sysdeps/pthread/createthread.c: ...here.  New file.
7011 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
7013         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7014         (__new_sem_post): Clear %eax before returning.
7015         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7017         * Makefile (tests): Add tst-cleanup2.
7018         * tst-cleanup2.c: New file.
7020         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7021         Interpret first parameter correctly.
7023 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
7025         * Makefile (headers): Add bits/semaphore.h.
7027 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
7029         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7030         if not SHARED.
7032 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
7034         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7035         must be used and mapping failed.
7036         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7038         * Makefile (CFLAGS-pthread_self.os): Define this, not
7039         CFLAGS-pthread_self.c.
7041 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7043         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7044         lll_unlock_wake_cb.
7046         * Makefile (libpthread-routines): Add version.  Add rules to build
7047         version.os and banner.h.
7048         * version.c: New file.
7050 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
7052         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7053         the alias unconditional.
7054         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
7056 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7058         * Makefile (CFLAGS-pthread_self.c): New definition.
7060 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7062         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7063         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7064         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7065         * init.c (__pthread_initialize_minimal_internal): Likewise.
7067 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
7069         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7071         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7072         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7073         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7074         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7075         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7076         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7078 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7080         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7081         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7082         * tst-cancel-wrappers.sh: Remove all exceptions.
7084 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
7086         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7087         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
7089         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7090         Use __libc_pthread_functions array if SHARED.
7092         * pthreadP.h: Move pthread_cond_2_0_t definition to...
7093         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7095         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7096         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7097         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7098         __libc_ptf_call instead of __libc_maybe_call.
7099         (PTF): New #define.
7100         (__libc_cleanup_region_start): Wrap function name with PTF call.
7101         (__libc_cleanup_region_end): Likewise.
7102         (__libc_cleanup_end): Likewise.
7104         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7105         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7106         * pthread_key_create.c: Add __pthread_key_create_internal alias.
7107         * pthreadP.h: Add prototypes.
7109         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7110         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7111         __pthread_rwlock_unlock aliases.
7112         * pthreadP.h: Add prototypes for new aliases.
7114         * pthreadP.h (struct pthead_functions): Moved to...
7115         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
7116         * init.c (pthread_functions): Add initializers for new elements.
7118         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7119         __pthread_cleanup_pop_restore aliases.
7120         * pthreadP.h: Add prototypes.
7122         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7123         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7124         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7125         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7126         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7127         * pthreadP.h: Adjust prototypes and callers.
7129 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
7131         * Makefile (tests): Add tst-cancel7.
7132         (tst-cancel7-ARGS): New variable.
7133         * tst-cancel7.c: New file.
7135         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7136         around gcc defficiencies.
7137         * old_pthread_cond_signal.c: Likewise.
7138         * old_pthread_cond_timedwait.c: Likewise.
7139         * old_pthread_cond_wait.c: Likewise.
7141         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7143 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7145         * Makefile (tests): Add tst-cond7.
7146         * tst-cond7.c: New file.
7148         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7149         (condvar_cleanup): Get condvar address from the right place.
7151         * atomic.h: Correct definitions of atomic_full_barrier,
7152         atomic_read_barrier, atomic_write_barrier.
7154         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7155         race-free.
7156         * old_pthread_cond_signal.c: Likewise.
7157         * old_pthread_cond_timedwait.c: Likewise.
7158         * old_pthread_cond_wait.c: Likewise.
7160 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
7162         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7164 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7166         * pthreadP.h (pthread_cond_2_0_t): New type.
7167         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7168         Use new type for the 2.0 condvar function prototypes.
7169         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7170         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7171         parameter.
7172         * old_pthread_cond_destroy.c: Likewise.
7173         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
7174         * old_pthread_cond_signal.c: Likewise.
7175         * old_pthread_cond_timedwait.c: Likewise.
7176         * old_pthread_cond_wait.c: Likewise.
7178         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7179         (__pthread_cond_wait): Don't save cancellation mode and seq value
7180         in same location.
7182         * herrno.c (__h_errno_location): Don't define as weak.
7184 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7186         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7187         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7188         and pthread_cond_wait.
7189         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7190         Renamed to...
7191         (__pthread_cond_broadcast_2_0): ... this.
7192         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7193         Renamed to...
7194         (__pthread_cond_destroy_2_0): ... this.
7195         * old_pthread_cond_init.c (__old_pthread_cond_init):
7196         Renamed to...
7197         (__pthread_cond_init_2_0): ... this.
7198         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7199         Renamed to...
7200         (__pthread_cond_signal_2_0): ... this.
7201         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7202         Renamed to...
7203         (__pthread_cond_wait_2_0): ... this.
7204         * pthread_cond_destroy.c: Include shlib-compat.h.
7205         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7206         * pthread_cond_init.c: Include shlib-compat.h.
7207         (pthread_cond_init): Change strong_alias into versioned_symbol.
7208         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7209         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7210         fields.
7211         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7212         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7213         __pthread_cond_wait_2_0): New prototypes.
7214         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7215         __old_pthread_cond_init, __old_pthread_cond_signal,
7216         __old_pthread_cond_wait): Removed.
7217         * init.c: Include shlib-compat.h.
7218         (pthread_functions): Guard ptr___pthread_attr_init_2_0
7219         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7220         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7221         ptr___pthread_cond_*_2_0 fields.
7222         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7223         pthread_cond_*@GLIBC_2.0 compatibility symbols.
7225         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7226         LIBC_SIGACTION was not yet defined.
7227         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7228         [!defined LIBC_SIGACTION] (__sigaction): New function and
7229         libc_hidden_weak.
7230         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7231         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7233 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7235         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7237 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
7239         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7240         New, larger type definition.
7241         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7242         implementation.
7243         * Versions [libpthread]: Add definitions for new pthread_cond_*
7244         interfaces for version GLIBC_2.3.2.
7245         * pthread_cond_init.c: Update initialization for new type definition.
7246         * Makefile (libpthread-routines): Remove pthread_cond_wait,
7247         pthread_cond_timedwait, pthread_cond_signal, and
7248         pthread_cond_broadcast.  Add old_pthread_cond_init,
7249         old_pthread_cond_destroy, old_pthread_cond_wait,
7250         old_pthread_cond_timedwait, old_pthread_cond_signal, and
7251         old_pthread_cond_broadcast.
7252         * old_pthread_cond_broadcast.c: New file.
7253         * old_pthread_cond_destroy.c: New file.
7254         * old_pthread_cond_init.c: New file.
7255         * old_pthread_cond_signal.c: New file.
7256         * old_pthread_cond_timedwait.c: New file.
7257         * old_pthread_cond_wait.c: New file.
7258         * pthreadP.h: Add prototypes for the compatibility interfaces.
7260         * pthread_cond_destroy.c: Don't include <errno.h>.
7262 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
7264         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7265         unnecessary zero offset when addressing MUTEX.
7267 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7269         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7270         __register_atfork.
7271         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7272         for __register_atfork.
7274 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7276         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7277         instead of ASSEMBLER test macro.
7279         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7280         __libc_current_sigrtmax): Add libc_hidden_def.
7282         * sysdeps/pthread/list.h: Remove assert.h include.
7284 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7286         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7287         __pthread_initialize_minimal_internal not
7288         __pthread_initialize_minimal.
7290 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7292         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7293         __pthread_initialize_minimal as hidden.
7295         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7296         constructor.
7298 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7300         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7301         $(common-objpfx)format.lds, include that into the output script.
7302         Fix comment.
7303         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7305 2002-12-28  Andreas Jaeger  <aj@suse.de>
7307         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7308         nsec resolution changes.
7309         (xstat64_conv): Likewise.
7310         (xstat32_conv): Likewise.
7311         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7312         struct kernel_stat.
7313         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7314         structs stat and stat64.
7315         * time/time.h (__timespec_defined): Define for __USE_MISC.
7316         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7318 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7320         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7321         argument.
7322         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7323         (pthread_exit): Use strong_alias to avoid warnings.
7324         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7325         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7326         ptr___pthread_attr_init_2_*.
7327         * init.c (pthread_functions): Adjust.
7329 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7331         * forward.c: Make all functions available by default again.  It
7332         caused too much trouble.
7334         * pt-siglongjmp.c: Removed.
7336 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7338         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7339         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7340         * sysdeps/i386/Makefile: New file.
7341         * sysdeps/i386/tcb-offsets.sym: New file.
7342         * sysdeps/pthread/tcb-offsets.h: New file.
7343         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7344         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7346         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7347         __register_atfork...
7348         (GLIBC_2.3.2): ...here.
7350 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7352         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7353         pthread_attr_setstackaddr with __attribute_deprecated__.
7355 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7357         * pt-system.c (system): Remove cancellation handling.
7358         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7359         cancellation routines.
7361 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7363         * descr.h: Include <dl-sysdep.h>.
7364         (struct pthread): Move header.data.list to the back of the struct.
7365         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7366         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7367         (SYSINFO_OFFSEET): Likewise.
7369 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7371         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7372         Define.
7373         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7374         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7375         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7376         (USE_DL_SYSINFO): Undef.
7378 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7380         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7381         $(common-objpfx)libc.so.
7382         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7383         it is bigger than pipe buffer size even on arches with bigger
7384         page size.
7385         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7387 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7389         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7390         correct errno access for case that USE___THREAD is not defined.
7392 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7394         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7395         Patch by Marijn Ros <marijn@mad.scientist.com>.
7397 2002-12-22  Roland McGrath  <roland@redhat.com>
7399         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7401 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7403         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7405 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7407         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7408         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7409         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7411         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7412         of int $0x80.
7413         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7414         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7415         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7416         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7417         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7418         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7419         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7420         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7422         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7423         sysenter.
7424         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7426         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7428         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7429         in new TCB.
7430         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7431         that sysinfo is properly initialized.
7432         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7433         to 1 only for ld.so.
7435         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7436         RTLD_CORRECT_DYNAMIC_WEAK.
7438 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7440         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7441         Use return 0 as 6th argument to FORWARD4.
7442         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7444 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7446         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7447         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7448         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7449         (INIT_SYSINFO): New #define.
7450         (TLS_TP_INIT): Use INIT_SYSINFO.
7451         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7452         At test to make sure SYSINFO_OFFSET value is correct.
7453         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7455 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7457         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7458         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7459         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7460         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7461         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7462         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7463         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7465 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7467         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7468         macro instead of using int $0x80 directly.
7470         * sysdeps/pthread/bits/stdio-lock.h: New file.
7471         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7472         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7473         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7474         * Makefile (routines): Add libc-lowlevelmutex.
7476         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7477         __i686.get_pc_thunk.dx.
7479 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7481         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7482         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7483         ($(objpfx)tst-cancel-wrappers.out): New rule.
7484         * tst-cancel-wrappers.sh: New test.
7485         * tst-locale1.c: Include signal.h.
7486         (uselocale): Test static linking of __libc_current_sigrt*.
7488 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7490         * Makefile (tests): Add tst-cancel6.
7491         * tst-cancel6.c: New file
7493 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7495         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7496         Define meaningfully for assembler as well.
7497         * pthreadP.h (struct pthread_functions): Remove
7498         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7499         and ptr_pthread_attr_init_2_1 fields.
7500         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7501         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7502         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7503         (FORWARD3): Define using FORWARD4.
7504         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7505         versions.
7506         * pt-system.c: Remove duplicate stdlib.h include.
7508 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7510         * sem_init.c: Define sem_init@GLIBC_2.0.
7511         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7512         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7514         * flockfile.c: Moved to...
7515         * sysdeps/pthread/flockfile.c: ...here.  New file.
7516         * funlockfile.c: Moved to...
7517         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7518         * ftrylockfile.c: Moved to...
7519         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7521 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7523         * libc-cancellation.c: Guard both function with
7524         #if !defined NOT_IN_libc.
7525         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7526         automatically provided pthread wrappers.
7527         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7528         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7529         nor in libpthread.
7530         * pt-open.c: Removed.
7531         * pt-fcntl.c: Removed.
7532         * pt-fsync.c: Removed.
7533         * pt-lseek.c: Removed.
7534         * pt-msgrcv.c: Removed.
7535         * pt-msgsnd.c: Removed.
7536         * pt-msync.c: Removed.
7537         * pt-nanosleep.c: Removed.
7538         * pt-open64.c: Removed.
7539         * pt-pause.c: Removed.
7540         * pt-pread.c: Removed.
7541         * pt-pread64.c: Removed.
7542         * pt-pwrite.c: Removed.
7543         * pt-pwrite64.c: Removed.
7544         * pt-read.c: Removed.
7545         * pt-recv.c: Removed.
7546         * pt-recvfrom.c: Removed.
7547         * pt-recvmsg.c: Removed.
7548         * pt-send.c: Removed.
7549         * pt-sendto.c: Removed.
7550         * pt-sigtimedwait.c: Removed.
7551         * pt-sigwait.c: Removed.
7552         * pt-wait.c: Removed.
7553         * pt-waitpid.c: Removed.
7554         * pt-write.c: Removed.
7555         * pt-accept.c: Removed.
7556         * pt-close.c: Removed.
7557         * pt-connect.c: Removed.
7558         * pt-lseek64.c: Removed.
7559         * pt-sendmsg.c: Removed.
7560         * pt-tcdrain.c: Removed.
7562 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7564         * init.c (__pthread_initialize_minimal_internal): Renamed from
7565         __pthread_initialize_minimal.  Make old name an alias.  This
7566         converts a normal relocation into a relative relocation.
7568         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7570         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7571         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7572         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7573         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7574         pt-sigwaitinfo, pt-waitid, and pt-writev.
7575         * pt-creat.c: Removed.
7576         * pt-poll.c: Removed.
7577         * pt-pselect.c: Removed.
7578         * pt-readv.c: Removed.
7579         * pt-select.c: Removed.
7580         * pt-sigpause.c: Removed.
7581         * pt-sigsuspend.c: Removed.
7582         * pt-sigwaitinfo.c: Removed.
7583         * pt-waitid.c: Removed.
7584         * pt-writev.c: Removed.
7586         * init.c (pthread_functions): New variable.
7587         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7588         (or NULL) to __libc_pthread_init.
7589         * forward.c: Rewrite to use __libc:pthread_functions array to get
7590         function addresses.
7591         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7592         prototype.
7593         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7594         Take new parameter.  Copy content of variable pointed to by it
7595         to __libc_pthread_init.
7597         * pthreadP.h (struct pthread_functions): New type.
7598         (__libc_pthread_init): Declare.
7600         * pthread_attr_destroy.c: Add namespace protected alias.
7601         * pthread_attr_getdetachstate.c: Likewise.
7602         * pthread_attr_getinheritsched.c: Likewise.
7603         * pthread_attr_getschedparam.c: Likewise.
7604         * pthread_attr_getschedpolicy.c: Likewise.
7605         * pthread_attr_getscope.c: Likewise.
7606         * pthread_attr_setdetachstate.c: Likewise.
7607         * pthread_attr_setinheritsched.c: Likewise.
7608         * pthread_attr_setschedparam.c: Likewise.
7609         * pthread_attr_setschedpolicy.c: Likewise.
7610         * pthread_attr_setscope.c: Likewise.
7611         * pthread_cond_broadcast.c: Likewise.
7612         * pthread_cond_destroy.c: Likewise.
7613         * pthread_cond_init.c: Likewise.
7614         * pthread_cond_signal.c: Likewise.
7615         * pthread_cond_wait.c: Likewise.
7616         * pthread_condattr_destroy.c: Likewise.
7617         * pthread_condattr_init.c: Likewise.
7618         * pthread_equal.c: Likewise.
7619         * pthread_exit.c: Likewise.
7620         * pthread_getschedparam.c: Likewise.
7621         * pthread_self.c: Likewise.
7622         * pthread_setcancelstate.c: Likewise.
7623         * pthread_setschedparam.c: Likewise.
7624         * pthread_mutex_destroy.c: Likewise.
7625         * pthread_mutex_init.c: Likewise.
7626         * pthreadP.h: Add prototypes for the aliases.
7628         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7629         multiple_threads member in correct TCB to 1.
7631         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7632         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7633         member of thread decriptor, otherwise return unconditionally 1.
7635 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7637         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7638         regular Linux version.  Remove file.
7639         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7640         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7641         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7642         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7643         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7644         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7645         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7646         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7647         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7648         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7649         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7650         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7651         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7652         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7653         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7654         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7655         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7656         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7657         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7658         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7659         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7660         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7661         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7662         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7663         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7664         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7665         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7666         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7667         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7668         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7670 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7672         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7673         * sysdeps/unix/sysv/linux/open.c: Removed.
7674         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7675         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7676         * sysdeps/unix/sysv/linux/msync.c: Removed.
7677         * sysdeps/unix/sysv/linux/read.c: Removed.
7678         * sysdeps/unix/sysv/linux/close.c: Removed.
7679         * sysdeps/unix/sysv/linux/creat.c: Removed.
7680         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7681         * sysdeps/unix/sysv/linux/pause.c: Removed.
7682         * sysdeps/unix/sysv/linux/select.c: Removed.
7683         * sysdeps/unix/sysv/linux/write.c: Removed.
7685 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7687         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7688         element in TCB to see whether locking is needed.
7690         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7691         MULTIPLE_THREADS_OFFSET value is correct.
7693         * sysdeps/unix/sysv/linux/close.c: New file.
7694         * sysdeps/unix/sysv/linux/connect.S: New file.
7695         * sysdeps/unix/sysv/linux/creat.c: New file.
7696         * sysdeps/unix/sysv/linux/fsync.c: New file.
7697         * sysdeps/unix/sysv/linux/llseek.c: New file.
7698         * sysdeps/unix/sysv/linux/lseek.c: New file.
7699         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7700         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7701         * sysdeps/unix/sysv/linux/msync.c: New file.
7702         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7703         * sysdeps/unix/sysv/linux/open.c: New file.
7704         * sysdeps/unix/sysv/linux/open64.c: New file.
7705         * sysdeps/unix/sysv/linux/pause.c: New file.
7706         * sysdeps/unix/sysv/linux/poll.c: New file.
7707         * sysdeps/unix/sysv/linux/pread.c: New file.
7708         * sysdeps/unix/sysv/linux/pread64.c: New file.
7709         * sysdeps/unix/sysv/linux/pselect.c: New file.
7710         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7711         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7712         * sysdeps/unix/sysv/linux/readv.c: New file.
7713         * sysdeps/unix/sysv/linux/recv.S: New file.
7714         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7715         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7716         * sysdeps/unix/sysv/linux/select.c: New file.
7717         * sysdeps/unix/sysv/linux/send.S: New file.
7718         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7719         * sysdeps/unix/sysv/linux/sendto.S: New file.
7720         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7721         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7722         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7723         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7724         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7725         * sysdeps/unix/sysv/linux/system.c: New file.
7726         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7727         * sysdeps/unix/sysv/linux/wait.c: New file.
7728         * sysdeps/unix/sysv/linux/waitid.c: New file.
7729         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7730         * sysdeps/unix/sysv/linux/writev.c: New file.
7731         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7733         * pt-readv.c: Fix comment.
7735 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7737         * tst-cleanup1.c: Include stdlib.h.
7739         * tst-cancel5.c: New test.
7740         * Makefile (tests): Add tst-cancel5.
7741         (tst-cancel5): Link against libc.so libpthread.so in that order.
7743 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7745         * forward.c (test_loaded): Prevent recursive calls.
7747         * Makefile (routines): Add libc-cancellation.
7748         * libc-cancellation.c: New file.
7749         * descr.h (struct pthread): Add multiple_threads field.
7750         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7751         new thread descriptor to 1.
7752         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7753         Initialize multiple_thread field after successful thread creation.
7754         * cancellation.c (__do_cancel): Move to pthreadP.h.
7755         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7756         (__pthread_disable_asynccancel): Add internal_function attribute.
7757         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7758         * pthread_setcancelstate.c: Likewise.
7759         * pthread_setcanceltype.c: Likewise.
7760         * pthread_exit.c: Likewise.
7761         * pthreadP.h (CANCELLATION_P): Likewise.
7762         (__do_cancel): Define as static inline.
7763         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7764         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7765         declarations.
7766         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7767         fields.  Define MULTIPLE_THREADS_OFFSET.
7768         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7769         declaration.
7770         * sysdeps/unix/sysv/linux/accept.S: New file.
7771         * sysdeps/unix/sysv/linux/read.c: New file.
7772         * sysdeps/unix/sysv/linux/write.c: New file.
7773         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7774         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7775         initialization of __libc_locking_needed.
7776         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7777         __libc_locking_needed, use multiple_threads field in TCB.
7778         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7780 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7782         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7783         version.
7784         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7786         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7787         access to __libc_locking_needed for PIC.
7789 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
7791         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7792         declare for libc.so.
7793         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7794         expression.
7795         (__libc_lock_lock): Put into statement expression.
7796         (__libc_lock_unlock): Remove trailing semicolon.
7797         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7799 2002-12-12  Roland McGrath  <roland@redhat.com>
7801         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7802         "m" constraint to refer to __libc_locking_needed.  Declare it here.
7804 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7806         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7807         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7808         Initialize __libc_locking_needed.
7809         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7810         instead of __register_pthread_fork_handler.
7811         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7812         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7813         fork-gen with libc_pthread_init.
7814         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7815         of __register_pthread_fork_handler.
7816         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7817         of __register_pthread_fork_handler.
7818         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7819         __libc_locking_needed to determine whether lock prefix can be avoided.
7820         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7822 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
7824         * Makefile (tests): Add tst-cleanup1.
7825         * tst-cleanup1.c: New file.
7826         * cancellation.c (__cleanup_thread): Removed.
7827         (__do_cancel): Remove call to __cleanup_thread.
7828         * pthreadP.h: Remove __cleanup_thread prorotype.
7830         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7831         Remember function and argument even if cancellation handler
7832         function is not available.
7833         (__libc_cleanup_region_end): Execute registered function directly if
7834         pthread functions are not available.
7835         (__libc_cleanup_end): Likewise.
7837         * init.c (__pthread_initialize_minimal): Fix initialization in
7838         static lib by preventing gcc from being too clever.
7840 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
7842         * init.c (__pthread_initialize_minimal): Remove unneccesary
7843         sigaddset call.
7845         * Makefile (tests): We can run tst-locale2 now.
7847 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
7849         * Versions: Remove duplicated sigwait entry.
7851 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
7853         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7854         inside libpthread.
7856         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7858         * pthreadP.h: Declare __pthread_enable_asynccancel and
7859         __pthread_disable_asynccancel.
7860         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7861         (CANCEL_RESET): Use __pthread_disable_asynccancel.
7862         * cancellation.c (__pthread_enable_asynccancel): New function.
7863         (__pthread_disable_asynccancel): New function.
7864         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7865         * pt-close.c: Likewise.
7866         * pt-connect.c: Likewise.
7867         * pt-creat.c: Likewise.
7868         * pt-fcntl.c: Likewise.
7869         * pt-fsync.c: Likewise.
7870         * pt-lseek.c: Likewise.
7871         * pt-lseek64.c: Likewise.
7872         * pt-msgrcv.c: Likewise.
7873         * pt-msgsnd.c: Likewise.
7874         * pt-msync.c: Likewise.
7875         * pt-nanosleep.c: Likewise.
7876         * pt-open.c: Likewise.
7877         * pt-open64.c: Likewise.
7878         * pt-pause.c: Likewise.
7879         * pt-poll.c: Likewise.
7880         * pt-pread.c: Likewise.
7881         * pt-pread64.c: Likewise.
7882         * pt-pselect.c: Likewise.
7883         * pt-pwrite.c: Likewise.
7884         * pt-pwrite64.c: Likewise.
7885         * pt-read.c: Likewise.
7886         * pt-readv.c: Likewise.
7887         * pt-recv.c: Likewise.
7888         * pt-recvfrom.c: Likewise.
7889         * pt-recvmsg.c: Likewise.
7890         * pt-select.c: Likewise.
7891         * pt-send.c: Likewise.
7892         * pt-sendmsg.c: Likewise.
7893         * pt-sendto.c: Likewise.
7894         * pt-sigpause.c: Likewise.
7895         * pt-sigsuspend.c: Likewise.
7896         * pt-sigtimedwait.c: Likewise.
7897         * pt-sigwait.c: Likewise.
7898         * pt-sigwaitinfo.c: Likewise.
7899         * pt-system.c: Likewise.
7900         * pt-tcdrain.c: Likewise.
7901         * pt-wait.c: Likewise.
7902         * pt-waitid.c: Likewise.
7903         * pt-waitpid.c: Likewise.
7904         * pt-write.c: Likewise.
7905         * pt-writev.c: Likewise.
7906         * pthread_join.c: Likewise.
7907         * pthread_timedjoin.c: Likewise.
7909         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7910         (__xpg_sigpause): New function.
7911         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7913 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
7915         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7917         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7918         _GI_pthread_cleanup_pop to pthreadP.h.
7920         * ftrylockfile.c: Use _IO_lock_trylock instead of
7921         pthread_mutex_trylock.
7923         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7924         (CANCEL_RESET): Likewise.
7925         (__pthread_setcanceltype_): Declare.
7926         (__pthread_mutex_lock_internal): Declare.
7927         (__pthread_mutex_unlock_internal): Declare.
7928         (__pthread_once_internal): Declare.
7929         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7930         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7932         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7933         and pthread_mutex_unlock.
7934         * pthread_cond_wait.c: Likewise.
7935         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7936         * pthread_mutex_unlock.c: Likewise.
7938         * pthread_setcanceltype.c: Add additional alias
7939         __pthread_setcanceltype.
7941         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7942         * sem_open.c (sem_open): Likewise.
7943         Use __libc_open, __libc_write, and __libc_close instead of
7944         open, write, and close respectively.
7946         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7947         Rewrite as statement expression since it must return a value.
7949         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7950         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7951         __pthread_kill.
7953         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7954         alias __pthread_once_internal.
7956         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7958 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
7960         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7961         * tst-stdio1.c: New file.
7962         * tst-stdio2.c: New file.
7964         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7966         * Makefile (tests): Comment out tst-locale2 for now.
7967         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7969         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7970         -D_IO_MTSAFE_IO.
7971         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7972         Use _IO_lock_init instead of explicit assignment.
7974         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7975         Define __libc_lock_* and __libc_lock_recursive macros with
7976         lowlevellock macros, not pthread mutexes.
7978         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
7979         of pthread_mutex_lock.
7980         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
7981         instead of pthread_mutex_unlock.
7983 2002-12-06  Roland McGrath  <roland@redhat.com>
7985         * allocatestack.c (__stack_user): Use uninitialized defn.
7986         * init.c (__pthread_initialize_minimal): Initialize it here.
7988 2002-12-05  Roland McGrath  <roland@redhat.com>
7990         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7991         string.
7992         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7994         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7995         missing & here too.
7997 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
7999         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8000         lowlevellock.
8001         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
8002         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
8003         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
8004         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
8005         for __libc_lock_* macros.
8006         * Makefile (routines): Add libc-lowlevellock.
8008 2002-10-09  Roland McGrath  <roland@redhat.com>
8010         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
8011         Under [__PIC__], call the function via the pointer fetched for
8012         comparison rather than a call by name that uses the PLT.
8013         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8014         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8015         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8016         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8017         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8019 2002-12-04  Roland McGrath  <roland@redhat.com>
8021         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8023         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8024         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8026         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8028 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8030         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8031         a completely opaque, non-integer type.
8032         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8034 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
8036         * sysdeps/i386/tls.h: Include stdlib.h.
8037         * sysdeps/x86_64/tls.h: Likewise.
8039 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8041         * Makefile (tests): Add tst-locale2.
8042         (tests-static): Likewise.
8043         * tst-locale2.c: New file.
8045         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8046         volatile and add memory clobbers to lock operations.
8048 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
8050         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8051         * sysdeps/i386/i486/bits/atomic.h: New file.
8052         * sysdeps/i386/i586/bits/atomic.h: New file.
8053         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8054         include i486 version.
8055         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8056         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8057         Patch by Marijn Ros <marijn@mad.scientist.com>.
8059         * allocatestack.c (get_cached_stack): Don't crash if we first
8060         found a stack with a larger size then needed.
8061         Reported by Hui Huang <hui.huang@sun.com>.
8063         * Makefile (tests): Add tst-sysconf.
8064         * tst-sysconf.c: New file.
8066         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8067         PTHREAD_THREADS_MAX.
8069 2002-12-02  Roland McGrath  <roland@redhat.com>
8071         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8072         Declare using hidden_proto instead of attribute_hidden, so there are
8073         non-.hidden static symbols for gdb to find.
8074         (__pthread_keys): Likewise.
8075         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8076         * allocatestack.c (__stack_user): Likewise.
8077         * pthread_create.c (__pthread_keys): Likewise.
8078         (__nptl_threads_events, __nptl_last_event): Make these static instead
8079         of hidden.
8080         * pthread_key_create.c (__pthread_pthread_keys_max,
8081         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8083 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
8085         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
8086         statically.
8087         * tst-locale1.c: New file.
8089         * pthread_cond_timedwait.c: Include <stdlib.h>.
8091         * Makefile (tests): Add tst-fork2 and tst-fork3.
8092         * tst-fork2.c: New file.
8093         * tst-fork3.c: New file.
8095 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
8097         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8099         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8100         require it to 200112L.
8102         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8103         instruction only if HAVE_CMOV is defined.
8104         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8106         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8108         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8110         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8112         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8114 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
8116         * sysdeps/x86_64/bits/atomic.h: New file.
8118         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8119         16-bit operations.
8121         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8122         possible since gettid cannot fail.
8124         * sysdeps/x86_64/pthreaddef.h: New file.
8126         * sysdeps/i386/pthreaddef.h (gettid): Removed.
8128         * sysdeps/x86_64/pthread_spin_init.c: New file.
8129         * sysdeps/x86_64/pthread_spin_lock.c: New file.
8130         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8131         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8133         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8134         Add missing lock prefix.  Minute optimization.
8136         * tst-spin2.c (main): Also check successful trylock call.
8138         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8139         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
8141         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8142         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
8144         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
8145         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8146         value in case of an error.  Add support for INTERNAL_SYSCALL.
8148         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8149         value in case of an error.
8151         * sysdeps/x86_64/tls.h: New file.
8153 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8155         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
8156         takes the array member name and the index as parameters.
8157         (THREAD_SETMEM_NC): Likewise.
8158         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8159         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8160         interfaces.
8162         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8163         to decide which code to use.
8164         (THREAD_SETMEM_NC): Likewise.
8166         * allocatestack.c (queue_stack): Don't remove stack from list here.
8167         Do it in the caller.  Correct condition to prematurely terminate
8168         loop to free stacks.
8169         (__deallocate_stack): Remove stack from list here.
8171 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8173         * Makefile (tests): Add tst-stack1.
8174         * tst-stack1.c: New file.
8176         * allocatestack.c (allocate_stack): Initialize the TCB on a user
8177         provided stack.
8179         * pthread_attr_getstack.c: Return bottom of the thread area.
8181 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
8183         * Makefile (libpthread-routines): Add pt-allocrtsig and
8184         pthread_kill_other_threads.
8185         * pt-allocrtsig.c: New file.
8186         * pthread_kill_other_threads.c: New file.
8187         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8188         all three functions.
8189         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8190         allocrtsig.
8191         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8192         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8193         and __libc_allocate_rtsig_private.
8194         * Versions (libpthread): Export pthread_kill_other_threads_np,
8195         __libc_current_sigrtmin, and __libc_current_sigrtmax.
8197 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
8199         * allocatestack.c (allocate_stack): stackaddr in attribute points to
8200         the end of the stack.  Adjust computations.
8201         When mprotect call fails dequeue stack and free it.
8202         * pthread_attr_setstack.c: Store top of the stack in stackaddr
8203         attribute.
8204         * pthread_getattr_np.c: Likewise.
8206         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8207         surprises.
8209 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
8211         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8212         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8214 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
8216         * pthread_getspecific.c: Optimize access to first 2nd-level array.
8217         * pthread_setspecific.c: Likewise.
8219 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
8221         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8222         definitions.  Get them from the official place.
8223         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8225         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8226         Use new CLONE_ flags in clone() calls.
8228         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8229         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8231         * Versions: Add pthread_* functions for libc.
8232         * forward.c: New file.
8234         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8235         errno-loc.
8236         * herrno.c: New file.
8237         * res.c: New file.
8239         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8240         sem_trywait, and sem_timedwait.  Add herrno and res.
8241         * sem_init.c: Don't initialize lock and waiters members.
8242         * sem_open.c: Likewise.
8243         * sem_post.c: Removed.
8244         * sem_wait.c: Removed.
8245         * sem_trywait.c: Removed.
8246         * sem_timedwait.c: Removed.
8247         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8248         Includes full implementations of sem_post, sem_wait, sem_trywait,
8249         and sem_timedwait.
8250         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8251         for new implementation.
8252         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8253         and waiters fields.
8255         * tst-sem3.c: Improve error message.
8256         * tst-signal3.c: Likewise.
8258         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8259         to tell the kernel about the termination futex and to initialize tid
8260         member.  Don't initialize main_thread.
8261         * descr.h (struct pthread): Remove main_thread member.
8262         * cancelllation.c (__do_cancel): Remove code handling main thread.
8263         The main thread is not special anymore.
8265         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
8266         size of the stacks to stack_cache_actsize.
8268         * pt-readv.c: Add missing "defined".
8269         * pt-sigwait.c: Likewise.
8270         * pt-writev.c: Likewise.
8272 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
8274         * Versions: Export __connect from libpthread.
8275         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8277         * Makefile (libpthread-routines): Add pt-raise.
8278         * sysdeps/unix/sysv/linux/raise.c: New file.
8279         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8280         * sysdeps/generic/pt-raise.c: New file.
8282         * pthread_cond_init.c: Initialize all data elements of the condvar
8283         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8285         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8286         * pthread_create.c: Likewise.
8288         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8289         * tst-key1.c: New file.
8290         * tst-key2.c: New file.
8291         * tst-key3.c: New file.
8293         * Versions: Export pthread_detach for version GLIBC_2.0.
8294         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8296 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8298         * pthread_key_create.c: Terminate search after an unused key was found.
8299         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8301         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8302         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8304 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8306         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8307         dynamic lookup for errno in PIC.
8309         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8310         release the stack lock as soon as possible.
8311         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8312         the static TLS block.
8313         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8315         * cancellation.c: Renamed from cancelation.c.
8316         * Makefile: Adjust accordingly.
8317         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8318         * cleanup_defer.c: Use CANCELLATION_P.
8319         * pthread_testcancel.c: Likewise.
8320         * descr.h: Fix spelling in comments.
8321         * init.c: Likewise.
8322         * pthread_getattr_np.c: Likewise.
8323         * pthread_getschedparam.c: Likewise.
8324         * pthread_setschedparam.c: Likewise.
8325         * Versions: Likewise.
8327         * pt-pselect.c: New file.
8328         * Makefile (libpthread-routines): Add pt-pselect.
8329         * Versions: Add pselect.
8331         * tst-cancel4.c: New file.
8332         * Makefile (tests): Add tst-cancel4.
8334 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8336         * pthread_mutex_lock.c: Always record lock ownership.
8337         * pthread_mutex_timedlock.c: Likewise.
8338         * pthread_mutex_trylock.c: Likewise.
8340         * pt-readv.c: New file.
8341         * pt-writev.c: New file.
8342         * pt-creat.c: New file.
8343         * pt-msgrcv.c: New file.
8344         * pt-msgsnd.c: New file.
8345         * pt-poll.c: New file.
8346         * pt-select.c: New file.
8347         * pt-sigpause.c: New file.
8348         * pt-sigsuspend.c: New file.
8349         * pt-sigwait.c: New file.
8350         * pt-sigwaitinfo.c: New file.
8351         * pt-waitid.c: New file.
8352         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8353         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8354         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8355         * Versions: Add all the new functions.
8357         * tst-exit1.c: New file.
8358         * Makefile (tests): Add tst-exit1.
8360         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8362 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8364         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8366         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8367         call.  pthread_join is an official cancellation point.
8368         * pthread_timedjoin.c: Likewise.
8370         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8371         and the condvar's mutex are retrieved.
8372         * pthread_cond_timedwait.c: Likewise.
8373         Reported by dice@saros.East.Sun.COM.
8375 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8377         * pthreadP.h: Cut out all type definitions and move them...
8378         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8379         * pthreadP.h: Include <internaltypes.h>.
8381         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8382         performance tweaks.
8384         * sem_trywait.c: Shuffle #includes around to get right order.
8385         * sem_timedwait.c: Likewise.
8386         * sem_post.c: Likewise.
8387         * sem_wait.c: Likewise.
8389         * nptl 0.3 released.
8391         * Makefile (tests): Add tst-signal3.
8392         * tst-signal3.c: New file.
8394 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8396         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8397         the asms modify the sem object.
8398         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8400         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8401         the actual members.
8402         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8403         * semaphoreP.h: Include pthreadP.h.
8404         * sem_getvalue.c: Adjust to sem_t change.
8405         * sem_init.c: Likewise.
8406         * sem_open.c: Likewise.
8407         * sem_post.c: Likewise.
8408         * sem_timedwait.c: Likewise.
8409         * sem_trywait.c: Likewise.
8410         * sem_wait.c: Likewise.
8412 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8414         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8415         * tst-basic2.c: New file.
8416         * tst-exec1.c: New file.
8417         * tst-exec2.c: New file.
8418         * tst-exec3.c: New file.
8420         * tst-fork1.c: Remove extra */.
8422         * nptl 0.2 released.  The API for IA-32 is complete.