* sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
[glibc.git] / nptl / ChangeLog
blob656dfe3f3eeef5368dfda8089574901de074d002
1 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4         mutexes wake all mutexes.
5         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
6         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
7         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
11         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
12         to guarantee the thread is always canceled.
14 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
16         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
17         Include stdlib.h.
18         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
19         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
20         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
21         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
22         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
24 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
26         [BZ #3123]
27         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
28         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
29         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
30         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
31         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
32         * Makefile (tests): Add tst-cond22.
33         * tst-cond22.c: New file.
35 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
37         [BZ #3124]
38         * descr.h (struct pthread): Add parent_cancelhandling.
39         * sysdeps/pthread/createthread.c (create_thread): Pass parent
40         cancelhandling value to child.
41         * pthread_create.c (start_thread): If parent thread was canceled
42         reset the SIGCANCEL mask.
43         * Makefile (tests): Add tst-cancel25.
44         * tst-cancel25.c: New file.
46 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
47             Ulrich Drepper  <drepper@redhat.com>
49         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
50         counterp if it is already zero.
51         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
53 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
54             Roland McGrath  <roland@redhat.com>
56         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
57         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
58         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
59         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
60         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
61         lll_robust_mutex_timedlock, lll_mutex_unlock,
62         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
63         Add _L_*_ symbols around the subsection.
64         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
65         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
67 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
68             Roland McGrath  <roland@redhat.com>
70         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
71         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
72         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
73         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
74         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
75         lll_robust_mutex_timedlock, lll_mutex_unlock,
76         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
77         Add _L_*_ symbols around the subsection.
78         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
79         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
81 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
83         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
84         change because it can disturb too much existing code.  If real hard
85         reader preference is needed we'll introduce another type.
86         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
87         (pthread_rwlock_timedwrlock): Likewise.
88         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
89         Likewise.
91 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
93         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
94         reader preference.
95         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
96         (pthread_rwlock_timedwrlock): Likewise.
97         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
98         Likewise.
100 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
102         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
103         Only define ifdef SHARED.
105 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
107         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
108         (free_stacks): ...here.
109         (__free_stack_cache): New function.
110         * pthreadP.h: Declare __free_stack_cache.
111         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
112         ptr_freeres.
113         * init.c (pthread_functions): Initialize ptr_freeres.
114         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
115         New freeres function.
117 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
119         [BZ #3018]
120         * Makefile (extra-objs): Add modules to extra-test-objs instead.
122 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
124         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
125         _XOPEN_REALTIME_THREADS.
127 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
129         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
130         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
131         HAVE_CLOCK_GETTIME_VSYSCALL.
132         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
134 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
136         * sysdeps/unix/sysv/linux/bits/posix_opt.h
137         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
138         * descr.h (struct priority_protection_data): New type.
139         (struct pthread): Add tpp field.
140         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
141         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
142         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
143         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
144         TPP mutexes.
145         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
146         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
147         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
148         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
149         * tpp.c: New file.
150         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
151         boosted by TPP.
152         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
153         * pthread_mutexattr_getprioceiling.c
154         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
155         in the SCHED_FIFO priority range.
156         * pthread_mutexattr_setprioceiling.c
157         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
158         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
159         if mutex is not TPP.  Ceiling is now in __data.__lock.
160         * pthread_mutex_setprioceiling.c: Include stdbool.h.
161         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
162         is now in __data.__lock.  Add locking.
163         * pthread_create.c (__free_tcb): Free pd->tpp structure.
164         * Makefile (libpthread-routines): Add tpp.
165         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
166         * tst-tpp.h: New file.
167         * tst-mutexpp1.c: New file.
168         * tst-mutexpp6.c: New file.
169         * tst-mutexpp10.c: New file.
170         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
171         * tst-mutex6.c (TEST_FUNCTION): Likewise.
173 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
175         [BZ #2843]
176         * pthread_join.c (pthread_join): Account for self being canceled
177         when checking for deadlocks.
178         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
179         (tf1): Don't print anything after pthread_join returns, this would be
180         another cancellation point.
181         (tf2): Likewise.
182         * tst-join6.c: New file.
183         * Makefile (tests): Add tst-join6.
185 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
187         [BZ #2892]
188         * pthread_setspecific.c (__pthread_setspecific): Check
189         out-of-range index before checking for unused key.
191         * sysdeps/pthread/gai_misc.h: New file.
193 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
195         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
196         file.  Don't use sysctl.
197         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
198         overwrite the file if this is likely not true.
200 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
202         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
203         * Makefile (tests): Add tst-getpid3.
204         * tst-getpid3.c: New file.
206 2006-07-30  Roland McGrath  <roland@redhat.com>
208         * Makefile (libpthread-routines): Add ptw-sigsuspend.
210         * sysdeps/unix/sysv/linux/i386/not-cancel.h
211         (pause_not_cancel): New macro.
212         (nanosleep_not_cancel): New macro.
213         (sigsuspend_not_cancel): New macro.
214         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
215         nanosleep_not_cancel macro from <not-cancel.h>.
216         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
217         macro from <not-cancel.h>.
219 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
220             Jakub Jelinek  <jakub@redhat.com>
222         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
223         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
224         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
225         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
226         * pthread_mutex_init.c: Add support for priority inheritance mutex.
227         * pthread_mutex_lock.c: Likewise.
228         * pthread_mutex_timedlock.c: Likewise.
229         * pthread_mutex_trylock.c: Likewise.
230         * pthread_mutex_unlock.c: Likewise.
231         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
232         all mutexes.
233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
235         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
236         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
237         pthread-pi-defines.sym.
238         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
239         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
240         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
241         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
242         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
243         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
244         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
245         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
246         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
247         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
248         _POSIX_THREAD_PRIO_INHERIT to 200112L.
249         * tst-mutex1.c: Adjust to allow use in PI mutex test.
250         * tst-mutex2.c: Likewise.
251         * tst-mutex3.c: Likewise.
252         * tst-mutex4.c: Likewise.
253         * tst-mutex5.c: Likewise.
254         * tst-mutex6.c: Likewise.
255         * tst-mutex7.c: Likewise.
256         * tst-mutex7a.c: Likewise.
257         * tst-mutex8.c: Likewise.
258         * tst-mutex9.c: Likewise.
259         * tst-robust1.c: Likewise.
260         * tst-robust7.c: Likewise.
261         * tst-robust8.c: Likewise.
262         * tst-mutexpi1.c: New file.
263         * tst-mutexpi2.c: New file.
264         * tst-mutexpi3.c: New file.
265         * tst-mutexpi4.c: New file.
266         * tst-mutexpi5.c: New file.
267         * tst-mutexpi6.c: New file.
268         * tst-mutexpi7.c: New file.
269         * tst-mutexpi7a.c: New file.
270         * tst-mutexpi8.c: New file.
271         * tst-mutexpi9.c: New file.
272         * tst-robust1.c: New file.
273         * tst-robust2.c: New file.
274         * tst-robust3.c: New file.
275         * tst-robust4.c: New file.
276         * tst-robust5.c: New file.
277         * tst-robust6.c: New file.
278         * tst-robust7.c: New file.
279         * tst-robust8.c: New file.
280         * Makefile (tests): Add the new tests.
282         * pthread_create.c (start_thread): Add some casts to avoid warnings.
283         * pthread_mutex_destroy.c: Remove unneeded label.
285 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
287         * pthread_mutex_init.c (__pthread_mutex_init): Move some
288         computations to compile time.
290 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
292         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
294 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
296         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
298 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
300         * pthread_key_create.c (__pthread_key_create): Do away with
301         __pthread_keys_lock.
303         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
304         (__kernel_cpumask_size): Mark as hidden.
305         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
307         * sem_open.c (__sem_mappings_lock): Mark as hidden.
308         * semaphoreP.h (__sem_mappings_lock): Likewise.
310 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
312         * pthread_atfork.c: Mark __dso_handle as hidden.
314 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
316         [BZ #2644]
317         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
318         the reload problem.  Change the one path in pthread_cancel_init
319         which causes the problem.  Force gcc to reload.  Simplify callers.
320         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
321         (_Unwind_GetBSP): Undo last patch.
323 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
325         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
326         function pointer is reloaded after pthread_cancel_init calls.
328         [BZ #2644]
329         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
330         pointers are reloaded after pthread_cancel_init calls.
332 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
334         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
335         __always_inline.
337 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
339         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
340         Allocate new object which is passed to timer_sigev_thread so that
341         the timer can be deleted before the new thread is scheduled.
343 2006-04-26  Roland McGrath  <roland@redhat.com>
345         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
347 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
349         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
350         suffix for conditional jumps.
351         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
352         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
353         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
354         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
355         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
356         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
358         * init.c (sigcancel_handler): Compare with correct PID even if the
359         thread is in the middle of a fork call.
360         (sighandler_setxid): Likewise.
361         Reported by Suzuki K P <suzuki@in.ibm.com> .
363 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
365         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
367 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
369         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
370         fails [Coverity CID 105].
372 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
374         * sysdeps/pthread/pthread.h: Add nonnull attributes.
376 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
378         [BZ #2505]
379         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
380         Define __lll_rel_instr using lwsync.
382 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
384         * allocatestack.c (allocate_stack): Always initialize robust_head.
385         * descr.h: Define struct robust_list_head.
386         (struct pthread): Use robust_list_head in robust mutex list definition.
387         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
388         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
389         (__pthread_initialize_minimal_internal): Register robust_list with
390         the kernel.
391         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
392         Declare __set_robust_list_avail.
393         * pthread_create.c (start_thread): Register robust_list of new thread.
394         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
395         waiters.
396         * pthread_mutex_destroy.c: For robust mutexes don't look at the
397         number of users, it's unreliable.
398         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
399         set_robust_list syscall is available.
400         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
401         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
402         Set robust_head.list_op_pending before trying to lock a robust mutex.
403         * pthread_mutex_timedlock.c: Likewise.
404         * pthread_mutex_trylock.c: Likewise.
405         * pthread_mutex_unlock.c: Likewise for unlocking.
406         * Makefile (tests): Add tst-robust8.
407         * tst-robust8.c: New file.
409 2006-03-08  Andreas Schwab  <schwab@suse.de>
411         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
412         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
414 2006-03-05  Roland McGrath  <roland@redhat.com>
416         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
417         and $config_os doesn't match *linux*.
419 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
421         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
422         Use __syscall_error.
423         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
424         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
425         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
426         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
427         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
428         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
430 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
432         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
434 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
436         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
437         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
438         mutex.
439         (__lll_robust_timedlock_wait): Likewise.
440         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
441         (__lll_robust_lock_wait): Likewise.
442         (__lll_robust_timedlock_wait): Likewise.
443         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
444         (__lll_robust_lock_wait): Likewise.
445         (__lll_robust_timedlock_wait): Likewise.
447 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
449         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
450         lll_robust_mutex_trylock, lll_robust_mutex_lock,
451         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
452         lll_robust_mutex_unlock): Define.
453         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
455 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
457         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
458         instead of <clone.S>.
460 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
462         * Makefile (libpthread-routines): Add
463         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
464         and pthread_mutex_[sg]etprioceiling.
465         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
466         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
467         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
468         pthread_mutex_setprioceiling.
469         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
470         PTHREAD_PRIO_PROTECT): New enum values.
471         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
472         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
473         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
474         prototypes.
475         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
476         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
477         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
478         Define.
479         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
480         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
481         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
482         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
483         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
484         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
485         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
486         protocol mutexes.
487         * pthread_mutex_getprioceiling.c: New file.
488         * pthread_mutex_setprioceiling.c: New file.
489         * pthread_mutexattr_getprioceiling.c: New file.
490         * pthread_mutexattr_setprioceiling.c: New file.
491         * pthread_mutexattr_getprotocol.c: New file.
492         * pthread_mutexattr_setprotocol.c: New file.
494 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
496         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
498 2006-02-27  Roland McGrath  <roland@redhat.com>
500         * sysdeps/pthread/Subdirs: List nptl here too.
501         * configure (libc_add_on_canonical): New variable.
503         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
505         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
506         self to get main source tree's file.
507         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
508         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
509         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
510         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
511         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
512         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
513         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
514         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
515         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
516         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
517         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
518         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
519         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
521         * Makefile: Use $(sysdirs) in vpath directive.
523         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
524         (CPPFLAGS-timer_routines.c): Likewise.
526         * Makeconfig (includes): Variable removed.
528 2006-02-26  Roland McGrath  <roland@redhat.com>
530         * sysdeps/generic/pt-raise.c: Moved to ...
531         * pt-raise.c: ... here.
532         * sysdeps/generic/lowlevellock.h: Moved to ...
533         * lowlevellock.h: ... here.
535 2006-02-23  Roland McGrath  <roland@redhat.com>
537         * descr.h (struct pthread): Add final member `end_padding'.
538         (PTHREAD_STRUCT_END_PADDING): Use it.
540 2006-02-20  Roland McGrath  <roland@redhat.com>
542         * sysdeps/mips: Directory removed, saved in ports repository.
543         * sysdeps/unix/sysv/linux/mips: Likewise.
545 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
547         * tst-robust1.c: Add second mutex to check that the mutex list is
548         handled correctly.
550 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
552         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
553         lll_robust_mutex_trylock, lll_robust_mutex_lock,
554         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
555         lll_robust_mutex_unlock): New macros.
556         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
557         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
559         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
560         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
562 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
564         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
565         definitions.
566         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
568 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
570         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
571         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
572         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
573         (lll_robust_mutex_unlock): Likewise.
575 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
577         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
578         Set robust_list.__next rather than robust_list.
579         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
580         (__pthread_list_t): New typedef.
581         (pthread_mutex_t): Replace __next and __prev fields with __list.
582         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
583         (__pthread_list_t): New typedef.
584         (pthread_mutex_t): Replace __next and __prev fields with __list.
585         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
586         (__pthread_list_t, __pthread_slist_t): New typedefs.
587         (pthread_mutex_t): Replace __next and __prev fields with __list.
588         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
589         (__pthread_list_t, __pthread_slist_t): New typedefs.
590         (pthread_mutex_t): Replace __next and __prev fields with __list.
591         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
592         (__pthread_list_t, __pthread_slist_t): New typedefs.
593         (pthread_mutex_t): Replace __next and __prev fields with __list.
594         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
595         (__pthread_slist_t): New typedef.
596         (pthread_mutex_t): Replace __next field with __list.
598 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
600         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
601         PTHREAD_MUTEX_OWNERDEAD.
602         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
603         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
604         * Makefile (libpthread-routines): Add lowlevelrobustlock.
605         * pthread_create.c (start_thread): Very much simplify robust_list loop.
606         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
607         to PTHREAD_MUTEX_INCONSISTENT.
608         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
609         * pthread_mutex_lock.c: Reimplement robust mutex handling.
610         * pthread_mutex_trylock.c: Likewise.
611         * pthread_mutex_timedlock.c: Likewise.
612         * pthread_mutex_unlock.c: Likewise.
613         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
614         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
615         lowlevelrobustlock.sym.
616         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
617         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
618         definitions.
619         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
620         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
621         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
622         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
623         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
625 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
627         * allocatestack.c (allocate_stack): Initialize robust_list.
628         * init.c (__pthread_initialize_minimal_internal): Likewise.
629         * descr.h (struct xid_command): Pretty printing.
630         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
631         robust_list.  Adjust macros.
632         * pthread_create.c (start_thread): Adjust robust_list handling.
633         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
634         but the owner for all robust mutex types.
635         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
636         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
637         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
638         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
640         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
641         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
643 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
645         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
646         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
648 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
650         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
651         Return status.
652         (lll_futex_timed_wait): Define.
654 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
656         * tst-cancel4.c: Test ppoll.
658 2006-01-18  Andreas Jaeger  <aj@suse.de>
660         [BZ #2167]
661         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
662         (pthread_mutex_t): Follow changes for other archs.  Based on patch
663         by Jim Gifford <patches@jg555.com>.
665 2006-01-13  Richard Henderson  <rth@redhat.com>
667         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
669 2006-01-10  Roland McGrath  <roland@redhat.com>
671         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
672         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
673         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
674         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
675         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
676         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
677         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
678         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
679         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
680         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
682 2006-01-09  Roland McGrath  <roland@redhat.com>
684         * tst-initializers1-c89.c: New file.
685         * tst-initializers1-c99.c: New file.
686         * tst-initializers1-gnu89.c: New file.
687         * tst-initializers1-gnu99.c: New file.
688         * Makefile (tests): Add them.
689         (CFLAGS-tst-initializers1-c89.c): New variable.
690         (CFLAGS-tst-initializers1-c99.c): New variable.
691         (CFLAGS-tst-initializers1-gnu89.c): New variable.
692         (CFLAGS-tst-initializers1-gnu99.c): New variable.
694         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
695         Use __extension__ on anonymous union definition.
696         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
697         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
698         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
699         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
700         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
702 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
704         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
705         Don't give the union a name because it changes the mangled name.
706         Instead name the struct for __data.
707         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
708         Likewise.
709         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
710         Likewise.
712 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
714         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
715         stack bias to mc_ftp field.
717 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
719         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
720         being too clever and reloading the futex value where it shouldn't.
722 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
724         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
725         correct type.
727 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
729         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
730         Add cfi directives.
732 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
734         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
735         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
736         rename in tcbhead_t.
738         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
739         Don't give the union a name because it changes the mangled name.
740         Instead name the struct for __data.
741         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
742         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
743         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
744         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
745         * pthread_create.c (start_thread): Adjust robust mutex free loop.
746         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
748 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
750         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
751         Return status.
752         (lll_futex_timed_wait): Define.
753         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
754         * sysdeps/pthread/aio_misc.h: New file.
756 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
758         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
760 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
762         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
763         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
764         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
766 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
768         * tst-cancel24.cc: Use C headers instead of C++ headers.
770 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
772         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
773         sparc-linux configured glibc.
774         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
775         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
776         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
777         atomic_compare_and_exchange_val_24_acq instead of
778         atomic_compare_and_exchange_val_acq.
779         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
780         instead of atomic_exchange_rel.
781         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
782         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
783         file.
784         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
785         file.
786         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
787         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
788         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
789         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
790         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
791         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
792         New file.
793         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
794         New file.
795         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
796         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
797         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
798         file.
799         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
800         file.
801         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
803 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
805         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
806         mutex initializers.
808 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
810         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
811         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
812         THREAD_COPY_POINTER_GUARD): Define.
813         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
814         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
816 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
818         * version.c: Update copyright year.
820 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
822         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
823         .eh_frame section, use cfi_* directives.
824         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
826 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
828         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
829         now.
831 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
833         * sysdeps/pthread/sigaction.c: Removed.
834         * sigaction.c: New file.
835         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
837 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
839         * Makefile (tests): Add tst-signal7.
840         * tst-signal7.c: New file.
842 2005-12-27  Roland McGrath  <roland@redhat.com>
844         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
845         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
846         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
847         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
848         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
849         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
850         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
851         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
852         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
853         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
854         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
856 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
858         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
859         and __prev field to pthread_mutex_t.
860         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
861         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
862         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
863         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
864         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
865         to pthread_mutex_t.
867 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
869         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
870         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
871         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
872         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
873         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
874         and PTHREAD_MUTEXATTR_FLAG_BITS.
875         * descr.h (struct pthread): Add robust_list field and define
876         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
877         * pthread_mutexattr_getrobust.c: New file.
878         * pthread_mutexattr_setrobust.c: New file.
879         * pthread_mutex_consistent.c: New file.
880         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
881         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
882         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
883         Adjust pthread_mutex_t initializers.
884         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
885         field to pthread_mutex_t.
886         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
887         and __prev field to pthread_mutex_t.
888         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
889         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
890         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
891         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
892         * pthread_mutexattr_gettype.c: Likewise.
893         * pthread_mutexattr_setpshared.c: Likewise.
894         * pthread_mutexattr_settype.c: Likewise.
895         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
896         Initialize mutex kind according to robust flag.
897         * pthread_mutex_lock.c: Implement local robust mutex.
898         * pthread_mutex_timedlock.c: Likewise.
899         * pthread_mutex_trylock.c: Likewise.
900         * pthread_mutex_unlock.c: Likewise.
901         * pthread_create.c (start_thread): Mark robust mutexes which remained
902         locked as dead.
903         * tst-robust1.c: New file.
904         * tst-robust2.c: New file.
905         * tst-robust3.c: New file.
906         * tst-robust4.c: New file.
907         * tst-robust5.c: New file.
908         * tst-robust6.c: New file.
909         * tst-robust7.c: New file.
910         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
911         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
912         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
913         tst-robust5, tst-robust6, and tst-robust7.
915         * tst-typesizes.c: New file.
916         * Makefile (tests): Add tst-typesizes.
918         * tst-once3.c: More debug output.
920 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
922         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
923         missing after last change.
925         * version.c: Update copyright year.
927 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
929         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
930         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
931         * pthread_mutex_trylock.c: Likewise.
932         * pthread_mutex_timedlock.c: Likewise.
933         * pthread_mutex_unlock.c: Likewise.
935 2005-12-22  Roland McGrath  <roland@redhat.com>
937         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
938         so that #include_next's search location is not reset to the -I..
939         directory where <nptl/...> can be found.
941 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
943         [BZ #1913]
944         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
945         Fix unwind info.  Remove useless branch prediction prefix.
946         * tst-cancel24.cc: New file.
947         * Makefile: Add rules to build and run tst-cancel24.
949 2005-12-21  Roland McGrath  <roland@redhat.com>
951         * libc-cancellation.c: Use <> rather than "" #includes.
952         * pt-cleanup.c: Likewise.
953         * pthread_create.c: Likewise.
954         * pthread_join.c: Likewise.
955         * pthread_timedjoin.c: Likewise.
956         * pthread_tryjoin.c: Likewise.
957         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
958         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
959         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
960         * unwind.c: Likewise.
962 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
964         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
965         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
966         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
967         THREAD_COPY_POINTER_GUARD): Define.
969 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
971         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
972         rather than one.
973         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
974         THREAD_COPY_POINTER_GUARD): Define.
975         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
976         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
977         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
978         THREAD_COPY_POINTER_GUARD): Define.
979         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
980         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
981         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
982         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
983         Use PTR_DEMANGLE for B0 if defined.
985 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
987         * pthread_create.c (__pthread_create_2_1): Use
988         THREAD_COPY_POINTER_GUARD if available.
989         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
990         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
991         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
992         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
993         * sysdeps/x86_64/tls.h: Likewise.
995 2005-12-15  Roland McGrath  <roland@redhat.com>
997         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
999 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1001         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1002         sysdeps/generic.
1003         * errno-loc.c: New file.
1005 2005-12-12  Roland McGrath  <roland@redhat.com>
1007         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1008         adjustments before choosing stack size.  Update minimum stack size
1009         calculation to match allocate_stack change.
1011 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1013         * allocatestack.c (allocate_stack): Don't demand that there is an
1014         additional full page available on the stack beside guard, TLS, the
1015         minimum stack.
1017 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1019         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1020         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1022         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1023         compiling 32-bit code we must define __cleanup_fct_attribute.
1025 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1027         [BZ #1920]
1028         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1029         __attribute__ instead of __attribute.
1030         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1031         (__cleanup_fct_attribute): Likewise.
1033 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1035         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1036         a write barrier before writing libgcc_s_getcfa.
1038 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1040         * sysdeps/unix/sysv/linux/configure: Removed.
1042 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1044         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1045         optional init_array/fini_array support.
1047 2005-10-24  Roland McGrath  <roland@redhat.com>
1049         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1050         versioned_symbol use.
1052 2005-10-16  Roland McGrath  <roland@redhat.com>
1054         * init.c (__pthread_initialize_minimal_internal): Even when using a
1055         compile-time default stack size, apply the minimum that allocate_stack
1056         will require, and round up to page size.
1058 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1060         * Makefile ($(test-modules)): Remove static pattern rule.
1062 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1063             Ulrich Drepper  <drepper@redhat.com>
1065         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1066         alignment in callback function.
1067         * Makefile: Add rules to build and run tst-align3.
1068         * tst-align3.c: New file.
1070 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1072         * allocatestack.c (setxid_signal_thread): Add
1073         INTERNAL_SYSCALL_DECL (err).
1075 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1077         * allocatestack.c (setxid_signal_thread): Need to use
1078         atomic_compare_and_exchange_bool_acq.
1080 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1081             Jakub Jelinek  <jakub@redhat.com>
1083         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1084         CANCEL_RESTMASK.
1085         (struct pthread): Move specific_used field to avoid padding.
1086         Add setxid_futex field.
1087         * init.c (sighandler_setxid): Reset setxid flag and release the
1088         setxid futex.
1089         * allocatestack.c (setxid_signal_thread): New function.  Broken
1090         out of the bodies of the two loops in __nptl_setxid.  For undetached
1091         threads check whether they are exiting and if yes, don't send a signal.
1092         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1093         * pthread_create.c (start_thread): For undetached threads, check
1094         whether setxid bit is set.  If yes, wait until signal has been
1095         processed.
1097         * allocatestack.c (STACK_VARIABLES): Initialize them.
1098         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1100 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1102         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1103         waiters, awake all waiters on the associated mutex.
1105 2005-09-22  Roland McGrath  <roland@redhat.com>
1107         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1108         ../sysdeps/x86_64/hp-timing.h).
1110 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1112         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1113         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1114         (lll_futex_wake_unlock): Define.
1115         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1116         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1117         (lll_futex_wake_unlock): Define.
1118         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1119         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1120         (lll_futex_wake_unlock): Define.
1121         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1122         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1123         (lll_futex_wake_unlock): Define.
1124         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1125         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1126         (lll_futex_wake_unlock): Define.
1127         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1128         lll_futex_wake_unlock.
1129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1130         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1131         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1133         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1134         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1136 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1138         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1139         Fix typo in register name.
1141 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1143         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1144         Use __sigfillset.  Document that sigfillset does the right thing wrt
1145         to SIGSETXID.
1147 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1149         [BZ #1102]
1150         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1151         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1152         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1153         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1154         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1155         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1156         in the structure.
1157         * Makefile (tests): Add tst-initializers1.
1158         (CFLAGS-tst-initializers1.c): Set.
1159         * tst-initializers1.c: New test.
1161 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1163         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1164         Make sure __flags are located at offset 48 from the start of the
1165         structure.
1167 2005-07-02  Roland McGrath  <roland@redhat.com>
1169         * Makeconfig: Comment fix.
1171 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1173         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1174         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1175         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1176         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1177         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1178         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1179         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1180         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1181         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1182         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1184 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1186         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1187         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1188         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1189         fields.
1190         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1191         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1192         field.  Put in sysinfo field unconditionally.
1193         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1194         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1195         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1196         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1197         fields.
1198         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1199         * pthread_create.c (__pthread_create_2_1): Use
1200         THREAD_COPY_STACK_GUARD macro.
1201         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1202         tests.
1203         * tst-stackguard1.c: New file.
1204         * tst-stackguard1-static.c: New file.
1206 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1208         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1209         Invoke CGOTSETUP and CGOTRESTORE.
1210         (CGOTSETUP, CGOTRESTORE): Define.
1212 2005-05-29  Richard Henderson  <rth@redhat.com>
1214         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1215         (tf_write, tf_writev): Use it.
1216         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1217         the system minimum.
1219 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1221         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1222         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1223         __librt_*_asynccancel@local.
1225 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1227         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1228         all occurrences of JUMPTARGET.  Instead append @local to labels.
1230 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1232         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1233         size/alignment of struct pthread rather than tcbhead_t.
1234         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1235         Likewise.
1236         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1237         Likewise.
1238         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1239         Likewise.
1241 2005-05-19  Richard Henderson  <rth@redhat.com>
1243         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1244         __sync_val_compare_and_swap, not explicit _si variant.
1245         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1247 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1249         [BZ #915]
1250         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1252 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1254         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1255         .eh_frame section, use cfi_* directives.
1257 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1259         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1260         of "" includes.
1262 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1264         [BZ #1075]
1265         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1266         aio_write blocks.
1268 2005-04-27  Roland McGrath  <roland@redhat.com>
1270         * Makefile (tests): Remove tst-clock2.
1272         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1273         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1274         translating to the kernel clockid_t for our own process/thread clock.
1276         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1278 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1280         * old_pthread_cond_init.c: Include <errno.h>.
1281         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1282         process shared or uses clock other than CLOCK_REALTIME.
1283         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1285 2005-04-13  David S. Miller  <davem@davemloft.net>
1287         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1288         * sysdeps/sparc/sparc64/clone.S: New file.
1290 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1292         [BZ #1102]
1293         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1294         __inline instead of inline.
1295         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1297 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1299         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1300         functionally equivalent, but shorter instructions.
1301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1302         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1303         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1304         Likewise.
1305         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1306         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1307         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1308         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1310         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1311         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1312         Likewise.
1313         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1314         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1315         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1316         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1317         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1319 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1321         * sysdeps/mips/Makefile: New file.
1322         * sysdeps/mips/nptl-sysdep.S: New file.
1323         * sysdeps/mips/tcb-offsets.sym: New file.
1324         * sysdeps/mips/pthread_spin_lock.S: New file.
1325         * sysdeps/mips/pthread_spin_trylock.S: New file.
1326         * sysdeps/mips/pthreaddef.h: New file.
1327         * sysdeps/mips/tls.h: New file.
1328         * sysdeps/mips/jmpbuf-unwind.h: New file.
1329         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1330         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1331         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1332         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1333         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1334         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1335         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1336         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1337         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1338         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1340 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1342         [BZ #1112]
1343         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1344         variable to scerr.
1346 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1348         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1350 2005-02-25  Roland McGrath  <roland@redhat.com>
1352         * alloca_cutoff.c: Correct license text.
1353         * tst-unload.c: Likewise.
1354         * sysdeps/pthread/allocalim.h: Likewise.
1355         * sysdeps/pthread/pt-initfini.c: Likewise.
1356         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1357         * sysdeps/pthread/bits/sigthread.h: Likewise.
1358         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1359         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1361 2005-02-16  Roland McGrath  <roland@redhat.com>
1363         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1364         Use unsigned int * for ptr_nthreads.
1366 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1368         [BZ #721]
1369         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1370         gcc4.
1372 2005-02-07  Richard Henderson  <rth@redhat.com>
1374         [BZ #787]
1375         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1376         argument.
1378 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1380         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1381         order of arguments in invocation of atomic_add_zero.
1383 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1385         [BZ #737]
1386         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1387         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1388         at least gotntpoff relocation and addition.
1389         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1390         Likewise.
1391         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1392         Likewise.
1393         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1394         Likewise.
1396 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1398         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1399         entry for static tls deallocation fix.
1400         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1401         also contains information whether the memory pointed to is static
1402         TLS or not.
1403         * sysdeps/i386/tls.h: Likewise.
1404         * sysdeps/ia64/tls.h: Likewise.
1405         * sysdeps/powerpc/tls.h: Likewise.
1406         * sysdeps/s390/tls.h: Likewise.
1407         * sysdeps/sh/tls.h: Likewise.
1408         * sysdeps/sparc/tls.h: Likewise.
1409         * sysdeps/x86_64/tls.h: Likewise.
1411 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1413         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1415 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1417         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1418         %esp.
1419         * Makefile (tests): Add tst-align2.
1420         * tst-align2.c: New test.
1421         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1422         -mpreferred-stack-boundary=4.
1424 2004-12-18  Roland McGrath  <roland@redhat.com>
1426         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1427         New file removed withdrawn for the moment.
1429 2004-12-17  Richard Henderson  <rth@redhat.com>
1431         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1432         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1434 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1436         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1437         Increased PTHREAD_STACK_MIN.
1439         * tst-context1.c (stacks): Use bigger stack size.
1441 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1443         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1444         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1446 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1448         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1449         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1450         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1452 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1454         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1456 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1458         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1459         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1461         * tst-getpid1.c: If child crashes, report this first.  Print which
1462         signal.
1464 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1466         * init.c (__pthread_initialize_minimal_internal): Also unblock
1467         SIGSETXID.
1469 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1471         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1472         _POSIX_THREAD_CPUTIME): Define to 0.
1473         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1474         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1475         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1476         __timer_signal_thread_tclk): Remove.
1477         (init_module): Remove their initialization.
1478         (thread_cleanup): Remove their cleanup assertions.
1479         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1480         __timer_signal_thread_tclk): Remove.
1481         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1482         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1483         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1485 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1487         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1488         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1490         * Makefile (tests): Add tst-getpid2.
1491         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1492         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1493         * tst-getpid2.c: New test.
1495 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1497         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1499 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1501         * Makefile (tests): Add tst-getpid1.
1502         * tst-getpid1.c: New file.
1503         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1504         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1506 2004-12-02  Roland McGrath  <roland@redhat.com>
1508         * Makefile (libpthread-nonshared): Variable removed.
1509         ($(objpfx)libpthread_nonshared.a): Target removed.
1510         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1511         These are now handled by generic magic from
1512         libpthread-static-only-routines being set.
1514 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1516         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1517         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1518         _POSIX_THREAD_PRIO_PROTECT): Define.
1519         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1520         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1521         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1523 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1525         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1526         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1527         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1528         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1529         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1530         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1531         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1533 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1535         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1537         * Makefile (libpthread-routines): Add pthread_setschedprio.
1538         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1539         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1540         * pthread_setschedprio.c: New file.
1542 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1544         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1545         * pthread_cancel.c (pthread_create): Likewise.
1547         * Makefile (libpthread-routines): Add vars.
1548         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1549         * init.c (__default_stacksize, __is_smp): Remove.
1550         * vars.c: New file.
1551         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1552         and define a wrapper macro.
1553         (PTHREAD_STATIC_FN_REQUIRE): Define.
1554         * allocatestack.c (__find_thread_by_id): Undefine.
1555         * pthread_create (__pthread_keys): Remove.
1556         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1557         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1558         PTHREAD_STATIC_FN_REQUIRE.
1560 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1562         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1563         parameter to REGISTER macro.
1565 2004-11-17  Roland McGrath  <roland@redhat.com>
1567         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1568         Make sure SIGCANCEL is blocked as well.
1570 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1572         * sysdeps/pthread/setxid.h: New file.
1573         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1574         (struct xid_command): Add forward decl.
1575         (struct pthread_functions): Change return type of __nptl_setxid hook
1576         to int.
1577         * pthreadP.h (__nptl_setxid): Change return type to int.
1578         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1579         calling thread, return its return value and set errno on failure.
1580         * descr.h (struct xid_command): Change id type to long array.
1582         * Makefile: Add rules to build and test tst-setuid1 and
1583         tst-setuid1-static.
1584         * tst-setuid1.c: New test.
1585         * tst-setuid1-static.c: New test.
1587 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1589         * Makefile (tests): Add tst-exit3.
1590         * tst-exit3.c: New test.
1592 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1594         * Makefile (tests): Add tst-exit2.
1595         * tst-exit2.c: New file.
1597 2004-11-09  Roland McGrath  <roland@redhat.com>
1599         [BZ #530]
1600         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1601         here, before calling clone.
1602         * pthread_create.c (start_thread): Don't do it here.
1604 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1606         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1608 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1610         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1611         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1612         assembler warning.
1614 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1616         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1617         if sched_priority is not between minprio and maxprio.
1619 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1621         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1622         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1624         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1625         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1627 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1629         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1630         not-cancelable I/O functions.
1632 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1634         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1635         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1636         make sure 2 is stored in the futex and we looked at the old value.
1637         Fix a few other problems to return the correct value.
1639 2004-10-14  Richard Henderson  <rth@redhat.com>
1641         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1642         make gcc4 happy.
1644 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1646         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1647         of pthread-functions.h and pthreaddef.h.
1648         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1650         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1651         Change __data.__nwaiters from int to unsigned int.
1653         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1654         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1656         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1657         before return type.
1659         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1660         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1662 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1664         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1665         test fails, remove message queue.
1666         (tf_msgsnd): Likewise.
1668 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1670         * tst-clock1.c: Change #ifdef to #if defined.
1671         * tst-clock2.c: Likewise.
1672         * tst-cond11.c: Likewise.
1674         * sysdeps/pthread/timer_create.c (timer_create): Use
1675         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1676         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1677         THREAD_CPUTIME.
1679 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1681         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1682         _POSIX_THREAD_CPUTIME): Define to 0.
1684 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1686         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1687         and _POSIX_THREAD_CPUTIME to zero.
1688         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1689         * tst-barrier2.c: Fix testing for POSIX feature.
1690         * tst-clock1.c: Likewise.
1691         * tst-clock2.c: Likewise.
1692         * tst-cond11.c: Likewise.
1693         * tst-cond4.c: Likewise.
1694         * tst-cond6.c: Likewise.
1695         * tst-flock2.c: Likewise.
1696         * tst-mutex4.c: Likewise.
1697         * tst-mutex9.c: Likewise.
1698         * tst-rwlock12.c: Likewise.
1699         * tst-rwlock4.c: Likewise.
1700         * tst-signal1.c: Likewise.
1701         * tst-spin2.c: Likewise.
1702         * sysdeps/pthread/posix-timer.h: Likewise.
1703         * sysdeps/pthread/timer_create.c: Likewise.
1704         * sysdeps/pthread/timer_routines.c: Likewise.
1706 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1708         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1709         (__lll_mutex_timedlock_wait): Address futex correctly.
1711         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1712         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1713         make sure 2 is stored in the futex and we looked at the old value.
1714         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1715         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1716         which might very well made the code not working at all before.
1717         [BZ #417]
1719 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1721         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1722         allow SIGSETXID to be sent.
1723         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1724         for SIGSETXID to be defined.
1725         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1726         SIGSETXID cannot be blocked.
1728         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1729         Add __extension__ to long long types.
1730         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1731         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1732         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1733         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1734         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1735         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1736         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1738 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1740         * descr.h (struct pthread): Add stopped_start field.
1741         * sysdeps/pthread/createthread.c (create_thread): Set
1742         start_stopped flag in descriptor for new thread appropriately.
1743         * pthread_create.c (start_thread): Only take lock to be stopped on
1744         startup if stopped_start flag says so.
1746 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1748         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1749         is created detached and if yes, do not try to free the stack in case
1750         the thread creation failed.
1751         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1752         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1753         case there has been no error.  [BZ #405]
1755         * pthread_create.c (start_thread): Don't wait for scheduler data
1756         etc to be set at the beginning of the function.  The cancellation
1757         infrastructure must have been set up.  And enable async
1758         cancellation before potentially going to sleep.  [BZ #401]
1760 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1762         * Versions: Remove exports for pthread_set*id_np functions.
1763         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1764         for now.
1765         * Makefile: Don't build pthread_set*id code for now.
1767 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1769         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1770         internal use.
1771         * allocatestack.c (__nptl_setxid): New function.
1772         * descr.h (struct xid_command): Define type.
1773         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1774         (sighandler_setxid): New function.
1775         (__pthread_initialize_minimal): Register sighandler_setxid for
1776         SIGCANCEL.
1777         * pt-allocrtsig.c: Update comment.
1778         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1779         Declare __nptl_setxid.
1780         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1781         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1782         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1783         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1784         and pthread_setresuid_np.
1785         * pthread_setgid_np.c: New file.
1786         * pthread_setuid_np.c: New file.
1787         * pthread_setegid_np.c: New file.
1788         * pthread_seteuid_np.c: New file.
1789         * pthread_setregid_np.c: New file.
1790         * pthread_setreuid_np.c: New file.
1791         * pthread_setresgid_np.c: New file.
1792         * pthread_setresuid_np.c: New file.
1793         * Versions [libpthread, GLIBC_2.3.4]: Add 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         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1798         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1799         pthread_setregid, and pthread_setresgid.
1801 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1803         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1804         ENOMEM when out of memory.
1806 2004-09-10  Roland McGrath  <roland@redhat.com>
1808         [BZ #379]
1809         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1810         code, since we don't try to use the broken CLONE_STOPPED any more.
1811         * pthread_create.c (start_thread): Likewise.
1813 2004-09-15  Richard Henderson  <rth@redhat.com>
1815         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1817 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1819         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1820         (__libc_unwind_longjmp): Delete macro and declare as function.
1821         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1822         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1823         nptl directory.
1824         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1825         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1826         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1828 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1830         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1831         for __USE_XOPEN2K.
1832         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1833         types also for __USE_XOPEN2K.
1834         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1835         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1836         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1837         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1838         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1839         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1840         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1841         [BZ #320]
1843 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1845         * sysdeps/pthread/pthread.h
1846         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1847         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1848         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1849         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1850         [BZ #375]
1852 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1854         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1855         PSEUDO to be used with . prefix.
1857         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1858         Use atomic_increment instead of atomic_exchange_and_add.
1859         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1860         Likewise.
1861         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1862         Likewise.
1863         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1864         Likewise.
1866         * allocatestack.c (allocate_stack): Use atomic_increment_val
1867         instead of atomic_exchange_and_add.
1868         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1869         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1870         Likewise.
1871         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1872         Likewise.
1874         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1875         the initialization function might throw.
1877 2005-09-05  Richard Henderson  <rth@redhat.com>
1879         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1880         Move definition inside libpthread, libc, librt check.  Provide
1881         definition for rtld.
1883 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1885         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1886         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1887         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1888         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1889         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1890         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1891         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1892         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1893         * unwind.c: Use it.
1895         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1896         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1897         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1898         Likewise.
1899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1900         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1901         this is the last waiter, signal pthread_cond_destroy caller and
1902         avoid using the pthread_cond_t structure after unlock.
1903         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1905         Read clock type from the least significant bits of __nwaiters instead
1906         of __clock.
1907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1908         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1910 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1912         [BZ #342]
1913         * Makefile (tests): Add tst-cond20 and tst-cond21.
1914         * tst-cond20.c: New test.
1915         * tst-cond21.c: New test.
1916         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1917         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1918         it unsigned int.
1919         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1920         Likewise.
1921         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1922         (pthread_cond_t): Likewise.
1923         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1924         Likewise.
1925         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1926         Likewise.
1927         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1928         Likewise.
1929         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1930         (cond_nwaiters): New.
1931         (clock_bits): New.
1932         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1933         if there are waiters not signalled yet.
1934         Wait until all already signalled waiters wake up.
1935         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1936         __nwaiters.  If pthread_cond_destroy has been called and this is the
1937         last waiter, signal pthread_cond_destroy caller and avoid using
1938         the pthread_cond_t structure after unlock.
1939         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1940         decrement it when leaving.  If pthread_cond_destroy has been called
1941         and this is the last waiter, signal pthread_cond_destroy caller.
1942         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1943         Likewise.  Read clock type from the least significant bits of
1944         __nwaiters instead of __clock.
1945         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1946         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1947         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1948         clock type just from the last COND_CLOCK_BITS bits of value.
1949         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1950         instead of __clock, just from second bit of condattr's value.
1952 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1954         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1955         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1956         != 64.
1957         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1959 2004-08-15  Roland McGrath  <roland@frob.com>
1961         * pthread_atfork.c: Update copyright terms including special exception
1962         for these trivial files, which are statically linked into executables
1963         that use dynamic linking for the significant library code.
1965 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1967         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1968         pthread_rwlock_rdlock.
1969         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1970         Decrease __nr_readers_queued after reacquiring lock.
1971         * sysdeps/pthread/pthread_rwlock_timedrdlock
1972         (pthread_rwlock_timedrdlock): Likewise.
1973         Reported by Bob Cook <bobcook47@hotmail.com>.
1975 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1977         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1978         before pthread_barrier_wait.
1980 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1982         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1983         Remove unnecessary exception handling data.
1985 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1987         [BZ #284]
1988         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1989         instead of clockid_t.
1991 2004-07-21  Roland McGrath  <roland@redhat.com>
1993         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1995 2004-07-19  Roland McGrath  <roland@redhat.com>
1997         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1999 2004-07-02  Roland McGrath  <roland@redhat.com>
2001         * configure: Don't exit.
2003 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2005         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2006         (__pthread_cond_timedwait): Check for invalid nanosecond in
2007         timeout value.
2009 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2011         * Makefile: Add rules to build and run tst-fini1.
2012         * tst-fini1.c: New file.
2013         * tst-fini1mod.c: New file.
2015 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2017         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2018         if no cancellation support is needed.
2019         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2020         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2021         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2022         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2023         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2024         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2025         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2026         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2027         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2029         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2030         only if not already defined.
2032 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2034         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2035         constraint "m" instead of "0" for futex.
2037         * shlib-versions: Add powerpc64-.*-linux.*.
2039 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2041         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2042         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2043         for valid tv_nsec.
2044         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2045         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2046         bits.
2048 2004-06-29  Roland McGrath  <roland@redhat.com>
2050         * Banner: NPTL no longer has its own version number.
2051         * Makefile (nptl-version): Variable removed.
2052         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2053         using $(version), the glibc version number.
2055 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2057         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2058         Fix branch offset for a PLT entry.
2059         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2060         Likewise.
2061         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2062         Likewise.
2063         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2064         Likewise.
2065         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2066         Likewise.
2068 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2070         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2071         unconditionally.
2073 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2075         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2076         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2077         instead of tv_sec.
2078         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2079         (pthread_rwlock_timedrdlock): Likewise.
2081 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2083         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2084         Set __r7 to val, not mutex.
2086 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2088         * Makefile: Add rules to build tst-rwlock14.
2089         * tst-rwlock14.c: New file.
2091 2004-06-24  Boris Hu  <boris.hu@intel.com>
2093         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2094         check.
2095         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2097 2004-06-19  Andreas Jaeger  <aj@suse.de>
2099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2100         assembler in last patch.
2102 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2104         * sysdeps/pthread/pthread_cond_timedwait.c
2105         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2107         (__pthread_cond_timedwait): Check for invalid nanosecond in
2108         timeout value.
2109         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2110         * tst-cond19.c: New file.
2111         * Makefile: Add rules to build and run tst-cond19.
2113 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2115         * tst-context1.c (GUARD_PATTERN): Defined.
2116         (tst_context_t): Define struct containing ucontext_t & guard words.
2117         (ctx): Declare as an array of tst_context_t.
2118         (fct): Verify uc_link & guard words are still valid.
2119         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2121 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2123         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2124         Add __data.__futex field, reshuffle __data.__clock.
2125         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2126         (__pthread_cond_signal): Increment __futex at the same time as
2127         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2128         address of low 32-bits of __wakeup_seq to futex syscall.
2129         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2130         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2131         releasing internal lock to FUTEX_WAIT.
2132         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2133         (__pthread_cond_timedwait): Likewise.
2134         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2135         (FUTEX_CMP_REQUEUE): Define.
2136         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2137         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2138         Pass __futex value from before the unlock and __futex address instead
2139         of address of low 32-bits of __wakeup_seq to futex syscall.
2140         Fallback to FUTEX_WAKE all on any errors.
2142 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2144         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2145         comment typo.
2146         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2147         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2148         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2149         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2150         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2152 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2154         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2155         Add memory clobber to inline assembly.
2156         (__lll_mutex_trylock): Likewise.
2157         (__lll_mutex_cond_trylock): Likewise.
2159 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2161         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2162         Pass val argument as 6th system call argument in %r7.
2164 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2166         * Makefile (tests): Add tst-cond16.
2167         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2168         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2169         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2170         Add __data.__futex field, reshuffle __data.__clock.
2171         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2172         (__pthread_cond_signal): Increment __futex at the same time as
2173         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2174         address of low 32-bits of __wakeup_seq to futex syscall.
2175         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2176         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2177         releasing internal lock to FUTEX_WAIT.
2178         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2179         (__pthread_cond_timedwait): Likewise.
2180         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2181         (FUTEX_CMP_REQUEUE): Define.
2182         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2183         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2184         Pass __futex value from before the unlock and __futex address instead
2185         of address of low 32-bits of __wakeup_seq to futex syscall.
2186         Fallback to FUTEX_WAKE all on any errors.
2187         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2188         Define.
2189         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2190         internally.  Return non-zero if error, zero if success.
2191         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2192         Add __data.__futex field, reshuffle __data.__clock.
2193         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2194         Define.
2195         (lll_futex_requeue): Add val argument, return 1 unconditionally
2196         for the time being.
2197         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2198         Add __data.__futex field, reshuffle __data.__clock.
2199         * sysdeps/unix/sysv/linux/powerpc/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/powerpc/bits/pthreadtypes.h
2204         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2205         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2206         Define.
2207         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2208         internally.  Return non-zero if error, zero if success.
2209         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2210         Add __data.__futex field, reshuffle __data.__clock.
2211         * sysdeps/unix/sysv/linux/ia64/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/ia64/bits/pthreadtypes.h (pthread_cond_t):
2216         Add __data.__futex field, reshuffle __data.__clock.
2217         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2218         Add __data.__futex field, reshuffle __data.__clock.
2219         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2220         Increment __futex at the same time as __wakeup_seq or __total_seq.
2221         Pass address of __futex instead of address of low 32-bits of
2222         __wakeup_seq to futex syscall.
2223         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2224         Pass __futex value from before releasing internal lock
2225         to FUTEX_WAIT.
2226         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2227         Likewise.  Avoid unnecessary shadowing of variables.
2228         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2229         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2230         unlock and __futex address instead of address of low 32-bits of
2231         __wakeup_seq to futex_requeue macro, adjust for new return value
2232         meaning.
2233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2234         (__pthread_cond_signal): Increment __futex at the same time as
2235         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2236         address of low 32-bits of __wakeup_seq to futex syscall.
2237         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2238         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2239         releasing internal lock to FUTEX_WAIT.
2240         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2241         (__pthread_cond_timedwait): Likewise.
2242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2243         (FUTEX_CMP_REQUEUE): Define.
2244         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2245         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2246         Pass __futex value from before the unlock and __futex address instead
2247         of address of low 32-bits of __wakeup_seq to futex syscall.
2248         Fallback to FUTEX_WAKE all on any errors.
2250 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2252         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2253         Add nop to align the end of critical section.
2254         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2256 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2258         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2259         Add __broadcast_seq field.
2260         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2261         all waiters as woken with woken_seq and bump broadcast counter.
2262         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2263         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2264         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2265         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2267 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2270         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2271         Reported by Kaz Kojima.
2273 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2275         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2277 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2279         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2280         __broadcast_seq with bc_seq after acquiring internal lock instead of
2281         before it.
2283 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2285         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2286         compilation.
2287         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2288         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2289         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2290         (pthread_cond_t): Add __data.__broadcast_seq field.
2291         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2292         (FRAME_SIZE): Define.
2293         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2294         Comment typo fixes.
2295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2296         Define.
2297         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2298         typo fixes.
2299         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2300         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2301         fixes.
2303 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2305         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2306         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2307         Add __broadcast_seq field.
2308         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2309         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2310         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2311         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2312         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2314         all waiters as woken with woken_seq and bump broadcast counter.
2315         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2317         __broadcast_seq field.
2318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2319         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2320         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2321         * pthread_cond_init.c: Initialize __broadcast_seq field.
2322         * Makefile (tests): Add tst-cond17 and tst-cond18.
2323         Add .NOTPARALLEL goal.
2324         * tst-cond16.c: New file.  From Jakub.
2325         * tst-cond17.c: New file.  From Jakub.
2326         * tst-cond18.c: New file.  From Jakub.
2328 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2330         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2331         unwind info.
2333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2334         Parametrize frame size.  Correct some unwind info.
2335         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2337 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2339         * tst-stack3.c: Note testing functionality beyond POSIX.
2341 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2343         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2344         Change conditional from ifdef to if.
2346 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2348         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2349         SYSDEP_CANCEL_ERROR): Define.
2350         (PSEUDO): Use it.
2352 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2354         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2356 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2358         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2360 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2362         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2363         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2364         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2365         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2367 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2369         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2370         thread has all signals blocked.
2372 2004-04-18  Andreas Jaeger  <aj@suse.de>
2374         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2375         (SEM_VALUE_MAX): Add missing brace.
2377 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2379         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2380         in rt subdir.
2381         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2382         * sysdeps/pthread/tst-mqueue8x.c: New test.
2383         * tst-cancel4.c: Update comment about message queues.
2385         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2386         return it_value { 0, 0 }.
2387         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2388         like SIGEV_SIGNAL.
2389         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2390         assertion for SIGEV_NONE.
2391         (thread_attr_compare): Compare all attributes, not just a partial
2392         subset.
2394 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2396         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2398 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2400         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2401         Just use a plain number.
2402         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2403         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2404         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2405         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2406         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2407         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2408         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2410 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2412         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2413         frame info.
2414         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2416 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2418         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2419         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2420         of calling sigwaitinfo.
2422 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2424         * allocatestack.c (allocate_stack): Set reported_guardsize
2425         unconditionally.
2426         * pthread_getattr_np.c (pthread_getattr_np): Use
2427         reported_guardsize instead of guardsize.
2428         * descr.h (struct pthread): Add reported_guardsize field.
2430 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2432         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2434 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2436         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2438 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2440         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2441         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2442         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2443         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2444         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2445         Define.
2446         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2447         (_POSIX_MESSAGE_PASSING): Define.
2448         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2449         (_POSIX_MESSAGE_PASSING): Define.
2450         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2451         (_POSIX_MESSAGE_PASSING): Define.
2453 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2455         * tst-context1.c (fct): Check whether correct stack is used.
2457 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2459         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2460         matching constraints for asm mem parameters.
2462         * tst-clock2.c (tf): Don't define unless needed.
2464 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2466         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2467         $(gnulib).
2469 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2471         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2472         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2473         * pthreadP.h: Declare __nptl_deallocate_tsd.
2474         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2475         Adjust caller.
2477         * Makefile (tests): Add tst-tsd5.
2478         * tst-tsd5.c: New file.
2480 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2482         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2483         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2484         is SHLIB_COMPAT check.
2485         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2486         (__pthread_attr_getaffinity_old): Likewise.
2487         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2488         (__pthread_getaffinity_old): Likewise.
2489         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2490         (__pthread_setaffinity_old): Likewise.
2492 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2494         * allocatestack.c (_make_stacks_executable): Call
2495         _dl_make_stack_executable first.
2497 2004-03-24  Roland McGrath  <roland@redhat.com>
2499         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2500         constraint instead of "0".
2502 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2504         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2505         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2507         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2508         code to avoid warning.
2510 2004-03-24  Andreas Jaeger  <aj@suse.de>
2512         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2513         (__pthread_attr_setaffinity_old): Remove const.
2515 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2517         * sysdeps/unix/sysv/linux/smp.h: New file.
2518         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2519         * init.c: Define __is_smp.
2520         (__pthread_initialize_minimal_internal): Call is_smp_system to
2521         initialize __is_smp.
2522         * pthreadP.h: Declare __is_smp.
2523         Define MAX_ADAPTIVE_COUNT is necessary.
2524         * pthread_mutex_init.c: Add comment regarding __spins field.
2525         * pthread_mutex_lock.c: Implement adaptive mutex type.
2526         * pthread_mutex_timedlock.c: Likewise.
2527         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2528         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2529         Add __spins field.
2530         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2531         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2532         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2533         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2534         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2535         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2536         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2537         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2538         lll_mutex_cond_trylock.
2539         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2540         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2541         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2542         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2543         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2544         Define BUSY_WAIT_NOP.
2545         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2546         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2548         * tst-mutex5.c: Add support for testing adaptive mutexes.
2549         * tst-mutex7.c: Likewise.
2550         * tst-mutex5a.c: New file.
2551         * tst-mutex7a.c: New file.
2552         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2554         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2555         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2556         vgettimeofday call might destroy the content.
2558         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2559         @pause in the loop.
2561         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2562         No need to restrict type of ret.  Make it int.  Add comment.
2564         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2565         Remove unnecessary setne instruction.
2567 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2569         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2570         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2571         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2572         If realloc fails, break out of the loop.
2574 2004-03-20  Andreas Jaeger  <aj@suse.de>
2576         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2577         (__pthread_setaffinity_old): Fix interface.
2578         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2579         (__pthread_getaffinity_old): Likewise.
2581         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2582         (__pthread_setaffinity_new): Remove duplicate declaration.
2584 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2586         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2587         the return value to a safe register.
2588         (CDISABLE): Set the function argument correctly.
2590 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2592         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2593         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2594         Rewrite so that only one locked memory operation per round is needed.
2595         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2596         (pthread_barrier_wait): After wakeup, release lock only when the
2597         last thread stopped using the barrier object.
2598         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2599         (__pthread_cond_wait): Don't store mutex address if the current
2600         value is ~0l.  Add correct cleanup support and unwind info.
2601         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2602         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2603         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2604         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2605         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2606         Add correct cleanup support and unwind info.
2607         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2608         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2609         information for syscall wrappers.
2611 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2613         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2614         cpusetsize field, remove next.
2615         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2616         parameter for size of the CPU set.
2617         (pthread_setaffinity_np): Likewise.
2618         (pthread_attr_getaffinity_np): Likewise.
2619         (pthread_attr_setaffinity_np): Likewise.
2620         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2621         interface change, keep compatibility code.
2622         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2623         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2624         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2625         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2626         __pthread_getaffinity_np.
2627         * Versions: Add version for changed interfaces.
2628         * tst-attr3.c: Adjust test for interface change.
2629         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2630         increasing buffer sizes.
2631         * pthread_attr_destroy.c: Remove unused list handling.
2632         * pthread_attr_init.c: Likewise.
2634 2004-03-17  Roland McGrath  <roland@redhat.com>
2636         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2637         first argument to clock_getres so we ever enable kernel timers.
2639 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2641         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2643 2004-03-12  Richard Henderson  <rth@redhat.com>
2645         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2646         oldvalue from CENABLE to CDISABLE.
2648 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2650         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2651         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2652         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2653         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2655 2004-03-11  Richard Henderson  <rth@redhat.com>
2657         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2658         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2659         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2661 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2663         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2664         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2665         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2667 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2669         * forward.c (__pthread_cond_broadcast_2_0,
2670         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2671         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2672         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2674 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2676         * sysdeps/sh/tcb-offsets.sym: Add PID.
2677         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2678         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2680 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2682         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2683         include <sysdep-cancel.h>, vfork is no cancellation point.
2684         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2685         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2686         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2688 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2690         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2691         libc_hidden_def.
2692         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2693         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2694         Likewise.
2695         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2696         Likewise.
2697         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2698         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2699         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2700         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2701         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2703         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2704         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2705         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2706         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2707         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2708         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2710         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2711         a local register for saving old PID.  Negate PID in parent upon exit.
2713         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2714         tcb-offsets.h.
2715         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2716         before syscall, set to the old value in the parent afterwards.
2717         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2718         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2719         tcb-offsets.h.
2720         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2721         before syscall, set to the old value in the parent afterwards.
2722         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2723         * sysdeps/s390/tcb-offsets.sym: Add PID.
2725         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2726         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2727         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2728         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2729         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2730         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2732 2004-03-10  Andreas Schwab  <schwab@suse.de>
2734         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2735         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2736         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2738 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2740         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2741         * tst-cancel21.c (do_one_test): Likewise.
2742         Reported by Gordon Jin <gordon.jin@intel.com>.
2744 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2746         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2747         if non-zero and set to INT_MIN if zero.
2748         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2749         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2750         (SAVE_PID, RESTORE_PID): Define.
2751         (__vfork): Use it.
2752         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2753         Use relative path to avoid including NPTL i386/vfork.S.
2754         (SAVE_PID, RESTORE_PID): Define.
2755         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2756         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2757         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2758         tst-vfork2x.
2759         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2760         * tst-vfork1.c: New test.
2761         * tst-vfork2.c: New test.
2762         * tst-vfork1x.c: New test.
2763         * tst-vfork2x.c: New test.
2765 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2767         * sysdeps/i386/tcb-offsets.sym: Add PID.
2768         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2769         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2770         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2772 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2774         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2776 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2778         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2779         _rtld_global_ro.
2781 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2783         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2784         _rtld_global_ro.
2786         * tst-once4.c: Remove unnecessary macro definition.
2788         * tst-mutex7.c (do_test): Limit thread stack size.
2789         * tst-once2.c (do_test): Likewise.
2790         * tst-tls3.c (do_test): Likewise.
2791         * tst-tls1.c (do_test): Likewise.
2792         * tst-signal3.c (do_test): Likewise.
2793         * tst-kill6.c (do_test): Likewise.
2794         * tst-key4.c (do_test): Likewise.
2795         * tst-join4.c (do_test): Likewise.
2796         * tst-fork1.c (do_test): Likewise.
2797         * tst-context1.c (do_test): Likewise.
2798         * tst-cond2.c (do_test): Likewise.
2799         * tst-cond10.c (do_test): Likewise.
2800         * tst-clock2.c (do_test): Likewise.
2801         * tst-cancel10.c (do_test): Likewise.
2802         * tst-basic2.c (do_test): Likewise.
2803         * tst-barrier4.c (do_test): Likewise.
2805 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2807         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2809 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2811         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2812         (__pthread_cond_timedwait): Optimize wakeup test.
2813         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2814         (__pthread_cond_wait): Likewise.
2815         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2816         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2817         Likewise.
2819 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2821         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2822         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2823         the atomic instruction needed.
2824         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2825         (__lll_mutex_lock_wait): Likewise.
2827 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2829         * Makefile (tests): Add tst-cond14 and tst-cond15.
2830         * tst-cond14.c: New file.
2831         * tst-cond15.c: New file.
2833 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2835         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2836         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2837         needs to be implemented differently to be useful.
2839 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2841         * pthread_attr_setschedparam.c: Don't test priority against limits
2842         here.  Set ATTR_FLAG_SCHED_SET flag.
2843         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2844         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2845         from parent thread to child.  If attribute is used and scheduling
2846         parameters are not inherited, copy parameters from attribute or
2847         compute them.  Check priority value.
2848         * pthread_getschedparam.c: If the parameters aren't known yet get
2849         them from the kernel.
2850         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2851         ATTR_FLAG_POLICY_SET flag for thread.
2852         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2853         and ATTR_FLAG_POLICY_SET.
2855         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2857         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2858         fail if stack address hasn't been set.  Just return 0.
2860 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2862         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2863         libpthread for the files in this list.
2864         (CFLAGS-tst-unload): Removed.
2865         * tst-unload.c (do_test): Don't use complete path for
2866         LIBPHREAD_SO.
2868         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2869         tst-_res1mod2.
2871 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2873         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2874         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2875         operation per round is needed.
2876         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2877         (__lll_mutex_lock_wait): Likewise.
2879 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2881         * tst-cancel9.c (cleanup): Don't print to stderr.
2883 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2885         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2887 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2889         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2890         (__syscall_error_handler2): Call CDISABLE.
2891         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2892         (__syscall_error_handler2): Call CDISABLE.
2894         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2895         Release lock before the loop, don't reacquire it.
2897         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2899 2004-02-19  Andreas Schwab  <schwab@suse.de>
2901         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2902         Fix last change.
2904 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2906         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2907         (pthread_barrier_wait): After wakeup, release lock only when the
2908         last thread stopped using the barrier object.
2909         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2910         (pthread_barrier_wait): Likewise.
2911         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2912         Likewise.
2913         * Makefile (tests): Add tst-barrier4.
2914         * tst-barrier4.c: New file.
2916         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2917         (__pthread_cond_timedwait): Perform timeout test while holding
2918         internal lock to prevent wakeup race.
2919         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2920         * sysdeps/pthread/pthread_cond_timedwait.c
2921         (__pthread_cond_timedwait): Likewise.
2922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2923         (__pthread_cond_timedwait): Likewise.
2925 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2927         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2928         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2929         * Makefile (tests): Add tst-rwlock13.
2930         * tst-rwlock13.c: New test.
2932 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2934         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2935         (__condvar_tw_cleanup): Little optimization.
2936         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2938 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2940         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2941         libpthread as "lib" parameter to SHLIB_COMPAT.
2942         (__novmx_siglongjmp): Fix typo in function name.
2943         (__novmx_longjmp): Fix typo in function name.
2945 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2947         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2948         __builtin_expect.
2950         * sysdeps/generic/pt-longjmp.c: Moved to...
2951         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2953 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2955         * Makefile (libpthread-routines): Add pt-cleanup.
2956         * pt-longjmp.c: Removed.
2957         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2958         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2959         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2960         Version longjmp, siglongjmp for GLIBC_2.3.4.
2961         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2963 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2965         * sysdeps/pthread/pthread_cond_timedwait.c
2966         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2967         Reuse code.  Add __builtin_expects.
2969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2970         (__pthread_cond_timedwait): Get internal lock in case timeout has
2971         passed before the futex syscall.
2972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2974 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2976         * allocatestack.c: Pretty printing.
2978         * sysdeps/pthread/createthread.c (create_thread): Don't add
2979         CLONE_DETACHED bit if it is not necessary.
2981 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2983         * pthread_getattr_np.c: Include ldsodefs.h.
2985 2004-01-16  Richard Henderson  <rth@redhat.com>
2987         * allocatestack.c: Don't declare __libc_stack_end.
2988         * init.c (__pthread_initialize_minimal_internal): Likewise.
2989         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2991 2004-01-15  Richard Henderson  <rth@redhat.com>
2993         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2994         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2995         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2996         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2997         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2998         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2999         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3000         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3002 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3004         * init.c (pthread_functions): Make array const.
3006 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3008         * allocatestack.c (__make_stacks_executable): Change interface.
3009         Check parameters.  Pass parameter on to libc counterpart.
3010         * pthreadP.h: Change declaration.
3012 2004-01-13  Richard Henderson  <rth@redhat.com>
3014         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3015         prototype form.
3016         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3017         Likewise.
3019         * sysdeps/alpha/Makefile: New file.
3020         * sysdeps/alpha/tcb-offsets.sym: New file.
3021         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3022         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3024         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3025         on powerpc version.
3027 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3029         * Makefile (tests): Add tst-backtrace1.
3030         * tst-backtrace1.c: New test.
3032 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3034         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3035         register as second parameter to the REGISTER macro.
3036         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3037         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3038         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3039         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3040         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3041         of thread register as second parameter to REGISTER macro in 64 case.
3043 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3045         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3046         (CFLAGS-getpid.o): Defined.
3047         (CFLAGS-getpid.os): Defined.
3049 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3051         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3052         returned for main thread does not overlap with any other VMA.
3053         Patch by Jakub Jelinek.
3055 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3057         * tst-raise1.c: Include stdio.h.
3059 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3061         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3062         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3063         If pid is 0, set it to selftid.
3064         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3065         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3066         != 0, return self->tid without doing a syscall.
3067         * descr.h (struct pthread): Move pid field after tid.
3069         * Makefile (tests): Add tst-raise1.
3070         * tst-raise1.c: New file.
3072 2003-12-23  Roland McGrath  <roland@redhat.com>
3074         * tst-oddstacklimit.c: New file.
3075         * Makefile (tests): Add it.
3076         (tst-oddstacklimit-ENV): New variable.
3078         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3079         value up to page size for __default_stacksize.
3081 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3083         * Makefile (tests): Add tst-eintr5.
3084         * tst-eintr5.c: New file.
3086         * eintr.c (eintr_source): Prevent sending signal to self.
3088         * tst-eintr2.c (tf1): Improve error message.
3090 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3092         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3093         * sysdeps/unix/sysv/linux/getpid.c: New file.
3094         * pthread_cancel.c: Add comment explaining use of PID field.
3095         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3096         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3097         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3098         temporarily to signal the field must not be relied on and updated
3099         by getpid().
3100         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3101         temporarily negative.
3102         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3104 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3106         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3107         (eintr_source): If ARG != NULL, use pthread_kill.
3108         * tst-eintr1.c: Adjust for this change.
3109         * tst-eintr2.c: Likewise.
3110         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3111         * tst-eintr3.c: New file.
3112         * tst-eintr4.c: New file.
3114 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3116         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3117         if CANCELSTATE_BITMASK is set.
3118         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3119         Likewise.
3121         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3122         (tests-reverse): Add tst-cancel23.
3123         * tst-cancel22.c: New test.
3124         * tst-cancel23.c: New test.
3126 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3128         * tst-eintr1.c: Better error messages.
3130         * Makefile (tests): Add tst-eintr2.
3131         * tst-eintr2.c: New file.
3133 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3135         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3136         (CFLAGS-tst-cancelx21.c): Set.
3137         * tst-cancel21.c: New test.
3138         * tst-cancelx21.c: New test.
3140         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3141         comparison operand.
3142         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3143         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3144         * pt-longjmp.c: Include jmpbuf-unwind.h.
3145         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3146         _JMPBUF_UNWINDS.  Adjust compared pointers.
3147         * init.c (__pthread_initialize_minimal_internal): Initialize
3148         pd->stackblock_size.
3149         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3150         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3151         * sysdeps/i386/jmpbuf-unwind.h: New file.
3152         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3153         * sysdeps/s390/jmpbuf-unwind.h: New file.
3154         * sysdeps/sh/jmpbuf-unwind.h: New file.
3155         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3156         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3157         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3158         (_JMPBUF_CFA_UNWINDS): Remove.
3159         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3161 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3163         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3164         (CFLAGS-tst-cancelx20.c): Set.
3165         * tst-cancel20.c: New test.
3166         * tst-cancelx20.c: New test.
3168 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3170         * init.c (__pthread_initialize_minimal_internal): Don't treat
3171         architectures with separate register stack special here when
3172         computing default stack size.
3174 2003-12-17  Roland McGrath  <roland@redhat.com>
3176         * Makefile (tst-cancelx7-ARGS): New variable.
3177         Reportd by Greg Schafer <gschafer@zip.com.au>.
3179 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3181         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3182         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3183         (tst-stack3-ENV): Set.
3184         ($(objpfx)tst-stack3-mem): New.
3185         * tst-stack3.c: New test.
3187 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3189         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3190         Add unwind directives.  Drop unused .regstk directive.
3191         (_fini_EPILOG_BEGINS): Add unwind directives.
3193 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3195         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3196         Assume parameter is a pointer.
3197         (lll_futex_wake): Likewise.
3198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3199         Likewise.
3200         (lll_futex_wake): Likewise.
3201         Reported by Boris Hu.
3202         * sysdeps/unix/sysv/linux/unregister-atfork.c
3203         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3205         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3207 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3209         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3210         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3211         __rtld_lock_initialize for ld.so lock.
3212         Patch in part by Adam Li <adam.li@intel.com>.
3214 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3216         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3217         in $(gnulib).  Also, remove stale comment.
3219 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3221         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3222         advantage of new syscall stub and optimize accordingly.
3224         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3225         from SYS_futex, to match expectations of
3226         sysdep.h:DO_INLINE_SYSCALL.
3227         (lll_futex_clobbers): Remove.
3228         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3229         (lll_futex_wake): Likewise.
3230         (lll_futex_requeue): Likewise.
3231         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3232         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3233         Jelinek).
3234         (__lll_mutex_lock): Likewise.
3235         (__lll_mutex_cond_lock): Likewise.
3236         (__lll_mutex_timed_lock): Likewise.
3237         (__lll_mutex_unlock): Likewise.
3238         (__lll_mutex_unlock_force): Likewise.
3240         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3241         comes before the include of <sysdep.h>.
3242         (THREAD_SELF_SYSINFO): New macro.
3243         (THREAD_SYSINFO): Likewise.
3244         (INIT_SYSINFO): New macro.
3245         (TLS_INIT_TP): Call INIT_SYSINFO.
3247         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3249         * sysdeps/pthread/createthread.c (create_thread): Use
3250         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3251         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3252         THREAD_SELF_SYSINFO instead of open code.
3253         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3254         (THREAD_SYSINFO): Likewise.
3256         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3258         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3260 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3262         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3263         instead of .init.  Patch by David Mosberger.
3265 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3267         * sysdeps/pthread/configure.in: Remove broken declaration in C
3268         cleanup handling check.
3270 2003-11-30  Andreas Jaeger  <aj@suse.de>
3272         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3273         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3274         Likewise.
3276 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3278         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3279         * pthread_attr_destroy.c: Include shlib-compat.h.
3280         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3281         is set in iattr->flags.
3282         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3284 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3286         * Makefile (distribute): Add tst-cleanup4aux.c.
3288         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3289         include.
3291 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3293         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3294         pthread_cond_signal.
3296         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3297         store mutex address if the current value is ~0l.
3298         * sysdeps/pthread/pthread_cond_timedwait.c
3299         (__pthread_cond_timedwait): Likewise.
3300         * sysdeps/pthread/pthread_cond_broadcast.c
3301         (__pthread_cond_broadcast): Don't use requeue for pshared
3302         condvars.
3304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3305         (__pthread_cond_wait): Don't store mutex address if the current
3306         value is ~0l.
3307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3308         (__pthread_cond_timedwait): Likewise.
3309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3310         (__pthread_cond_broadcast): Don't use requeue for pshared
3311         condvars.
3313         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3314         element with ~0l for pshared condvars, with NULL otherwise.
3316         * sysdeps/unix/sysv/linux/i386/i486/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/i386/i486/pthread_cond_timedwait.S
3320         (__pthread_cond_timedwait): Likewise.
3321         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3322         (__pthread_cond_broadcast): Don't use requeue for pshared
3323         condvars.
3325         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3326         * tst-cond12.c: New file.
3327         * tst-cond13.c: New file.
3329 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3331         * sysdeps/pthread/configure.in: Make missing forced unwind support
3332         fatal.
3334 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3336         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3338 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3340         * Makefile: Add magic to clean up correctly.
3342 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3344         * unwind.c (FRAME_LEFT): Define.
3345         (unwind_stop): Handle old style cleanups here.
3346         (__pthread_unwind): Handle old style cleanups only if
3347         !HAVE_FORCED_UNWIND.
3348         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3349         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3350         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3351         ($(objpfx)tst-cleanupx4): Likewise.
3352         * tst-cleanup4.c: New test.
3353         * tst-cleanup4aux.c: New.
3354         * tst-cleanupx4.c: New test.
3356 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3358         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3359         lll_mutex_*lock macros to skip atomic operations on some archs.
3361 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3363         * sysdeps/pthread/tst-timer.c (main): Initialize
3364         sigev2.sigev_value as well.
3366 2003-10-15  Roland McGrath  <roland@redhat.com>
3368         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3369         is missing.
3370         * sysdeps/pthread/configure: Regenerated.
3372 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3374         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3375         locking macros.  No distinction between normal and mutex locking
3376         anymore.
3377         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3378         Merge bits from lowlevelmutex.S we still need.
3379         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3380         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3381         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3382         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3383         new mutex implementation.
3384         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3385         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3386         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3387         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3388         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3389         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3390         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3392         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3393         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3394         symbol for entry point to avoid cancellation.
3396 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3398         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3399         changes.
3400         (SAVE_OLDTYPE_0): Fix a typo.
3402 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3404         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3405         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3407 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3409         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3410         correct offset.
3412 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3414         * Makefile (tests): Add tst-cancel19.
3415         * tst-cancel19.c: New test.
3417 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3419         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3420         restoring of the old cancellation type.
3422 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3424         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3426 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3428         * sysdeps/pthread/malloc-machine.h: New file
3430 2003-09-24  Roland McGrath  <roland@redhat.com>
3432         * allocatestack.c (__make_stacks_executable): Don't ignore return
3433         value from _dl_make_stack_executable.
3435 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3437         * allocatestack.c (__make_stacks_executable): Also change
3438         permission of the currently unused stacks.
3440         * allocatestack.c (change_stack_perm): Split out from
3441         __make_stacks_executable.
3442         (allocate_stack): If the required permission changed between the time
3443         we started preparing the stack and queueing it, change the permission.
3444         (__make_stacks_executable): Call change_stack_perm.
3446         * Makefile: Build tst-execstack-mod locally.
3447         * tst-execstack-mod.c: New file.
3449 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3451         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3453 2003-09-23  Roland McGrath  <roland@redhat.com>
3455         * tst-execstack.c: New file.
3456         * Makefile (tests): Add it.
3457         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3458         (LDFLAGS-tst-execstack): New variable.
3460         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3461         whether to use PROT_EXEC for stack mmap.
3462         (__make_stacks_executable): New function.
3463         * pthreadP.h: Declare it.
3464         * init.c (__pthread_initialize_minimal_internal): Set
3465         GL(dl_make_stack_executable_hook) to that.
3467 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3469         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3470         recommendation from AMD re avoidance of lock prefix.
3472 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3474         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3475         lll_futex_timed_wait instead of lll_futex_wait.
3476         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3477         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3478         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3479         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3480         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3481         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3482         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3483         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3484         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3485         Completely revamp the locking macros.  No distinction between
3486         normal and mutex locking anymore.
3487         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3488         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3489         __lll_lock_timedwait): Fix prototypes.
3490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3491         __lll_lock_timedwait): Likewise.
3492         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3493         macros, add __builtin_expect.
3494         (lll_mutex_timedlock): Likewise.  Fix return value.
3495         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3496         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3497         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3498         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3499         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3500         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3501         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3502         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3504 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3506         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3507         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3508         operation if possible.
3510         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3511         like jumping over the lock prefix.
3513 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3515         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3516         locking macros.  No distinction between normal and mutex locking
3517         anymore.
3518         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3519         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3520         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3521         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3522         locking.  Merge bits from lowlevelmutex.S we still need.
3523         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3524         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3525         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3526         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3527         * Makefile (routines): Remove libc-lowlevelmutex.
3528         (libpthread-rountines): Remove lowlevelmutex.
3529         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3530         for new mutex implementation.
3531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3535         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3536         Likewise.
3537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3538         Likewise.
3539         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3541         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3542         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3544         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3545         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3546         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3547         Likewise.
3548         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3549         Likewise.
3550         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3551         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3553         Don't use requeue.
3554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3555         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3557 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3559         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3560         in parameters of asm with output parameters.
3562         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3563         type of DECR parameter to int.
3564         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3566 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3568         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3569         guardsize for each thread.
3571 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3573         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3574         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3575         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3577         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3578         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3579         NULL.
3580         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3581         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3582         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3583         (pthread_getaffinity_np): Add hidden_def.
3585         * Makefile (tests): Add tst-attr3.
3586         * tst-attr3.c: New test.
3588         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3590 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3592         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3593         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3595 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3597         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3598         * tst-align.c: Include tst-stack-align.h.
3599         (tf, do_test): Use TEST_STACK_ALIGN macro.
3601 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3603         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3604         variable.
3606 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3608         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3609         stack-related values for the initial thread.
3611 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3613         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3615 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3617         * pthread_mutex_lock.c: Minor code rearrangements.
3619 2003-09-05  Roland McGrath  <roland@redhat.com>
3621         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3622         Instead, include ../nptl_db/db_info.c to do its magic.
3623         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3624         (__pthread_pthread_key_2ndlevel_size): Likewise.
3625         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3626         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3627         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3628         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3629         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3630         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3631         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3632         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3633         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3634         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3635         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3636         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3637         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3638         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3639         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3640         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3641         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3643 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3645         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3646         of pthread_t to be compatible with LT.
3647         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3648         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3649         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3650         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3651         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3652         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3653         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3655 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3657         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3659 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3661         * unwind-forcedunwind.c: Move to...
3662         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3663         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3664         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3665         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3666         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3667         * unwind.c: Include jmpbuf-unwind.h.
3668         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3670 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3672         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3673         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3674         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3675         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3676         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3677         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3678         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3679         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3680         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3681         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3682         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3683         function.
3684         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3685         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3686         * Makefile (tests): Add tst-stack2.
3687         * tst-stack2.c: New test.
3688         * tst-stack1.c: Include limits.h and sys/param.h.
3689         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3691         * pthread_condattr_setpshared.c: Include errno.h.
3692         (pthread_condattr_setpshared): Return EINVAL if pshared
3693         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3695         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3696         defined symbol for entry point to avoid cancellation.
3697         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3698         Likewise.
3699         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3700         Likewise.
3701         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3702         Likewise.
3703         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3704         Likewise.
3705         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3706         Likewise.
3707         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3708         __close_nocancel, __read_nocancel, __write_nocancel,
3709         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3710         libpthread.so or librt.so, define to corresponding function
3711         without _nocancel suffix.
3712         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3713         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3714         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3716         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3718 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3720         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3721         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3723         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3724         in subsections has a symbol associated with it.
3726         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3727         defined symbol for entry point to avoid cancellation.
3728         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3730 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3732         * Makefile (tests): Add tst-tls5.
3733         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3734         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3735         ($(objpfx)tst-tls5): New.
3736         ($(objpfx)tst-tls6.out): Likewise.
3737         (tests): Depend on $(objpfx)tst-tls6.out.
3738         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3739         (do_test): Check pthread_self () return value alignment.
3740         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3741         (tf): Check pthread_self () return value alignment.
3742         * tst-tls5.c: New test.
3743         * tst-tls5.h: New.
3744         * tst-tls5mod.c: New.
3745         * tst-tls5moda.c: New.
3746         * tst-tls5modb.c: New.
3747         * tst-tls5modc.c: New.
3748         * tst-tls5modd.c: New.
3749         * tst-tls5mode.c: New.
3750         * tst-tls5modf.c: New.
3751         * tst-tls6.sh: New test.
3753         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3754         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3755         * init.c (pthread_functions): Initialize them.
3756         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3757         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3758         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3759         pthread_cond_timedwait@@GLIBC_2.3.2.
3761 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3763         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3764         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3765         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3766         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3767         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3768         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3770         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3772         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3773         _POSIX_THREAD_PRIORITY_SCHEDULING.
3774         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3776 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3778         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3779         nested function, use static inline function from libio.h.
3780         Code by Richard Henderson.
3782         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3783         weak.
3785 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3787         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3788         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3789         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3790         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3791         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3792         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3793         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3794         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3795         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3796         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3797         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3798         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3799         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3800         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3801         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3802         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3803         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3804         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3805         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3806         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3807         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3808         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3809         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3810         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3811         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3812         * sysdeps/sparc/tls.h: New file.
3813         * sysdeps/sparc/tcb-offsets.sym: New file.
3814         * sysdeps/sparc/Makefile: New file.
3815         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3816         * init.c [__sparc__] (__NR_set_tid_address): Define.
3818 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3820         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3821         _IO_release_lock): Define.
3823 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3825         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3826         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3828 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3830         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3831         (__pthread_cleanup_class): Add missing return types of member
3832         functions.
3834 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3836         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3837         (lll_mutex_unlock_force): Add memory barrier between store and futex
3838         syscall.
3840 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3842         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3843         tempmsg in first loop.
3845 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3847         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3848         _POSIX_THREAD_PRIORITY_SCHEDULING.
3849         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3851 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3853         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3854         (__rtld_lock_default_lock_recursive,
3855         __rtld_lock_default_unlock_recursive): Define.
3856         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3857         __rtld_lock_unlock_recursive): Define using
3858         GL(_dl_rtld_*lock_recursive).
3859         * init.c (__pthread_initialize_minimal_internal): Initialize
3860         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3861         Lock GL(_dl_load_lock) the same number of times as
3862         GL(_dl_load_lock) using non-mt implementation was nested.
3864         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3865         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3867 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3869         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3870         PIPE_BUF.
3872 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3874         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3876 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3878         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3879         to first syscall error check.  Move syscall error check for tkill
3880         into __ASSUME_CLONE_STOPPED #ifdef.
3882 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3884         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3885         is not defined, do explicit synchronization.
3886         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3887         is not defined also unlock pd->lock for non-debugging case in case
3888         it is necessary.
3889         * pthread_create.c (start_thread): Always get and release pd->lock
3890         if __ASSUME_CLONE_STOPPED is not defined.
3891         (start_thread_debug): Removed.  Adjust users.
3892         * allocatestack.c (allocate_stack): Always initialize lock if
3893         __ASSUME_CLONE_STOPPED is not defined.
3894         * Makefile (tests): Add tst-sched1.
3895         * tst-sched1.c: New file.
3897         * sysdeps/pthread/createthread.c (do_clone): Only use
3898         sched_setschduler and pass correct parameters.
3900 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3902         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3903         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3904         PTHREAD_STACK_MIN in comments.
3906 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3908         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3909         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3910         argument.
3911         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3912         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3913         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3914         (__pthread_cleanup_upto): Fix prototype.
3915         (_longjmp_unwind): Adjust caller.
3916         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3917         Change second argument to const struct pointer.
3918         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3919         * tst-sem9.c (main): Likewise.
3920         * unwind.c: Include string.h for strlen prototype.
3922 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3924         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3925         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3926         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3927         Define HAVE_CMOV.
3928         Patch by Nicholas Miell <nmiell@attbi.com>.
3930 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3932         * init.c (__pthread_initialize_minimal_internal): Initialize
3933         GL(dl_init_static_tls).
3934         * pthreadP.h (__pthread_init_static_tls): New prototype.
3935         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3936         New functions.
3937         * Makefile (tests): Add tst-tls4.
3938         (modules-names): Add tst-tls4moda and tst-tls4modb.
3939         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3940         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3941         tst-tls4modb.so.
3942         * tst-tls4.c: New file.
3943         * tst-tls4moda.c: New file.
3944         * tst-tls4modb.c: New file.
3946 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3948         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3949         before __timer_dealloc.
3950         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3951         Don't call list_unlink.
3953 2003-07-29  Roland McGrath  <roland@redhat.com>
3955         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3957 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3959         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3960         Don't reuse struct aiocb A if it failed.
3961         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3962         not just one byte, as that does not block.
3964 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3966         * sysdeps/pthread/unwind-resume.c: New file.
3967         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3968         unwind-resume in csu subdir.
3969         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3970         exceptions.
3971         (librt-sysdep_routines, librt-shared-only-routines): Add
3972         rt-unwind-resume.
3973         * sysdeps/pthread/rt-unwind-resume.c: New file.
3974         * unwind-forcedunwind.c: New file.
3975         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3976         (libpthread-shared-only-routines): Likewise.
3977         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3978         * pthreadP.h (pthread_cancel_init): New prototype.
3979         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3981         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3982         attr argument const struct pthread_attr *.
3984         * res.c (__res_state): Return __resp.
3985         * descr.h: Include resolv.h.
3986         (struct pthread): Add res field.
3987         * pthread_create.c: Include resolv.h.
3988         (start_thread): Initialize __resp.
3989         * Makefile (tests): Add tst-_res1.
3990         (module-names): Add tst-_res1mod1, tst-_res1mod2.
3991         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3992         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3993         libpthread.
3994         * tst-_res1.c: New file.
3995         * tst-_res1mod1.c: New file.
3996         * tst-_res1mod2.c: New file.
3998 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
4000         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4002         * Makefile: Define various *-no-z-defs variables for test DSOs
4003         which has undefined symbols.
4005 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
4007         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4008         Retry if the stwcx fails to store once_control.
4010 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
4012         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4013         pthread_attr_setaffinity.
4014         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4015         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4016         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4017         * pthread_attr_destroy.c: Free cpuset element if allocated.
4018         * pthread_create.c: Pass iattr as additional parameter to
4019         create_thread.
4020         * sysdeps/pthread/createthread.c: If attribute is provided and
4021         a new thread is created with affinity set or scheduling parameters,
4022         start thread with CLONE_STOPPED.
4023         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4024         pthread_attr_setaffinity.
4025         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4026         cpuset element.
4028 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
4030         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4032 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
4034         * sysdeps/pthread/configure.in: Require CFI directives also for
4035         ppc and s390.
4037 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
4039         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4040         Add cfi directives.
4042 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4044         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4045         CLEANUP_JMP_BUF.
4046         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4047         registers as variables.  Call __pthread_mutex_unlock_usercnt.
4048         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4049         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4050         not self pointer in __writer.  Compare with TID to determine
4051         deadlocks.
4052         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4053         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4054         Likewise.
4055         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4056         Likewise.
4057         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4058         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4059         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4060         macros also when compiling librt.
4062 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
4064         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4065         -fasynchronous-unwind-tables.
4066         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4067         (PSEUDO): Add cfi directives.
4068         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4069         Likewise.
4070         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4071         Likewise.
4073 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
4075         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4076         __pthread_unregister_cancel): Add prototypes and hidden_proto.
4077         * unwind.c (__pthread_unwind_next): Add hidden_def.
4078         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4079         Likewise.
4080         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4081         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4082         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4083         Likewise.
4084         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4085         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4086         Likewise.
4087         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4088         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4089         __pthread_unregister_cancel and __pthread_unwind_next.
4091 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
4093         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4094         different symbol for the cancellation syscall wrapper and
4095         non-cancellation syscall wrapper.
4096         (PSEUDO_END): Define.
4098 2003-07-05  Richard Henderson  <rth@redhat.com>
4100         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4101         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4102         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4103         return actual return value from the syscall, not 0.
4105 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
4107         * descr.h (struct pthread): Add pid field.
4108         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4109         (__reclaim_stacks): Likewise.
4110         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4111         also check for PID of the signal source.
4112         (__pthread_initialize_minimal_internal): Also initialize pid field
4113         of initial thread's descriptor.
4114         * pthread_cancel.c: Use tgkill instead of tkill if possible.
4115         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4116         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4117         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4118         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4120 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
4122         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4123         Fix use of parameter.
4124         (__libc_cleanup_pop): Likewise.
4126 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
4128         * init.c (sigcancel_handler): Change parameters to match handler
4129         for SA_SIGACTION.  Check signal number and code to recognize
4130         invalid invocations.
4132 2003-07-03  Roland McGrath  <roland@redhat.com>
4134         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4135         Apply sizeof (struct pthread) bias to r13 value.
4137 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
4139         * sysdeps/pthread/configure.in: Require CFI directives.
4141         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4142         definition.
4143         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4144         libpthread compilation.
4145         * unwind.c (__pthread_unwind): Add hidden_def.
4146         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4148 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4150         * libc-cancellation.c (__libc_cleanup_routine): Define.
4151         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4152         (__pthread_cleanup_pop): Define.
4154 2003-07-01  Richard Henderson  <rth@redhat.com>
4156         * sysdeps/alpha/elf/pt-initfini.c: New file.
4157         * sysdeps/alpha/pthread_spin_lock.S: New file.
4158         * sysdeps/alpha/pthread_spin_trylock.S: New file.
4159         * sysdeps/alpha/pthreaddef.h: New file.
4160         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4161         * sysdeps/alpha/tls.h: New file.
4162         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4163         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4164         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4165         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4166         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4167         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4168         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4169         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4170         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4171         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4173 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
4175         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4176         cleanup support and unwind info.
4178 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
4180         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4181         Use correct cleanup handler registration.  Add unwind info.
4182         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4183         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4184         * tst-once3.c: Add cleanup handler and check it is called.
4185         * tst-once4.c: Likewise.
4186         * tst-oncex3.c: New file.
4187         * tst-oncex4.c: New file.
4188         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4190 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
4192         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4194 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
4196         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4197         (tf_msgsnd): Likewise.
4199         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4200         premature returns a bit more.
4202 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
4204         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4205         definition to the front.
4207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4208         the cleanup functions to make the names unique.  Fix dwarf opcode
4209         un unwind table.
4210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4211         functions to make the names unique.  Fix CFA offset for two blocks.
4213 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
4215         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4216         missing closing braces.
4217         Patch by Christophe Saout <christophe@saout.de>.
4219 2003-06-24  Roland McGrath  <roland@redhat.com>
4221         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4223 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
4225         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4226         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4228         * pthreadP.h: Declare __find_thread_by_id.
4229         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4230         * pthread_clock_gettime.c: Allow using other thread's clock.
4231         * pthread_clock_settime.c: Likewise.
4232         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4233         * Makefile: Add rules to build and run tst-clock2.
4234         * tst-clock2.c: New file.
4236 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
4238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4239         to use exception-based cleanup handler.
4240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4242         * tst-cond8.c (ch): Announce that we are done.
4244         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4246         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4247         Also test aio_suspend with timeout value.
4249 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
4251         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4252         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4253         attribute_hidden.
4255         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4256         (__pthread_mutex_lock_internal): Likewise.
4257         (__pthread_mutex_unlock_internal): Likewise.
4258         (__pthread_mutex_unlock_usercnt): Declare.
4259         * pthread_mutex_destroy.c: Always fail if used in any way.
4260         * pthread_mutex_init.c: Update comment.
4261         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4262         * pthread_mutex_timedlock.c: Adjust __nusers.
4263         * pthread_mutex_trylock.c: Adjust __nusers.
4264         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4265         and public interfaces are wrapper with pass additional parameter.
4266         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4267         parameter zero.
4268         * tst-mutex8.c: New file.
4269         * Makefile (tests): Add tst-mutex8.
4270         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4271         __pthread_mutex_unlock_usercnt.
4272         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4275         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4277         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4278         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4279         Add __nusers.
4280         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4281         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4282         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4283         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4284         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4286         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4287         * pthread_mutex_timedlock.c: Likewise.
4288         * pthread_mutex_trylock.c: Adjust __nusers.
4289         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4290         * tst-mutex9.c: New file.
4291         * Makefile (tests): Add tst-mutex9.
4292         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4293         * sysdeps/ia64/tls.h: Likewise.
4294         * sysdeps/powerpc/tls.h: Likewise.
4295         * sysdeps/s390/tls.h: Likewise.
4296         * sysdeps/sh/tls.h: Likewise.
4297         * sysdeps/x86_64/tls.h: Likewise.
4298         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4299         Change type of __owner.
4300         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4301         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4302         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4303         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4304         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4306 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4308         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4309         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4311         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4312         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4313         instead of nr to lll_futex_wake.  Only set errno and return -1
4314         if err < 0.
4316         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4317         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4318         return actual return value from the syscall, not 0.
4320 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4322         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4323         find a random value.
4324         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4325         errno==EIDRM.
4327         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4328         compat_timer_settime.
4329         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4330         compat_timer_gettime.
4331         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4332         compat_timer_getoverrun.
4333         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4334         compat_timer_delete.
4336         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4337         error-checking mutex detect busy mutexes.
4339 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4341         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4342         Add ax to clobber list.
4343         (lll_mutex_cond_lock): Likewise.
4344         (lll_mutex_unlock): Likewise.
4345         (lll_lock): Likewise.
4346         (lll_unlock): Likewise.
4348         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4349         * tst-cancel18.c: New file.
4350         * tst-cancelx18.c: New file.
4352         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4353         and tcdrain.
4355         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4356         * tst-cancel17.c: New file.
4357         * tst-cancelx17.c: New file.
4359         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4360         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4361         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4363         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4365 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4367         * sysdeps/pthread/createthread.c (create_thread): Set
4368         header.multiple_threads unconditionally.
4369         * allocatestack.c (allocate_stack): Likewise.
4370         * descr.h (struct pthread): Add header.multiple_threads
4371         unconditionally.
4372         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4373         Define for librt.  #error if neither libpthread, libc nor librt.
4374         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4375         Likewise.
4376         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4377         CDISABLE): Likewise.
4378         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4379         CDISABLE): Likewise.
4380         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4381         CDISABLE): Likewise.
4382         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4383         CDISABLE): Likewise.  Access header.multiple_threads outside of
4384         libc and libpthread.
4385         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4386         Likewise.
4387         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4388         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4390 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4392         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4393         Also test early cancellation before the thread reaches the cancellation
4394         point.
4396         * Makefile: Compile forward.c with exceptions.
4398         * sysdeps/unix/sysv/linux/sleep.c: New file.
4400 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4402         * Makefile: Add CFLAGS definition to compile function wrappers
4403         duplicated from libc with exceptions.
4404         * tst-cancel4.c: Also check cancellation handlers.
4406         * Makefile: Add rules to build and run tst-cancel16 and
4407         tst-cancelx16.  Add missing CFLAGS definitions.
4408         * tst-cancel16.c: New file.
4409         * tst-cancelx16.c: New file.
4411 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4413         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4414         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4415         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4416         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4418         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4419         (LIBC_CANCEL_RESET): Likewise.
4420         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4421         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4422         librt-cancellation.
4423         (CFLAGS-libcrt-cancellation.c): Define.
4424         * sysdeps/pthread/librt-cancellation.c: New file.
4425         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4426         macros also when compiling librt.
4427         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4428         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4429         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4430         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4431         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4432         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4433         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4435         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4436         compat_timer_create.
4438 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4440         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4442         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4443         __register_atfork.
4444         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4445         Add libc_hidden_def.
4447 2003-06-13  Roland McGrath  <roland@redhat.com>
4449         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4450         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4452 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4454         * allocatestack.c (queue_stack): Always inline.
4455         * ptreadhP.h (__do_cancel): Likewise.
4457 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4459         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4460         a typo.
4462 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4464         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4465         (__pthread_cond_signal): Remove incorrect second addition for
4466         cond_lock!=0.
4468 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4470         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4471         (__pthread_cond_signal): Use correct futex pointer in
4472         __lll_mutex_lock_wait call.
4474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4475         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4477 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4479         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4480         cancelable.
4481         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4482         Likewise.
4484         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4485         hand-written CFI generation code.  Since ENTRY/END also initiated
4486         CFI frames this caused two CFI sets to be generated.
4488 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4490         * cleanup_routine.c: New file.
4491         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4492         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4493         cleanup handling.
4494         * Makefile (libpthread-routines): Add cleanup_routine.
4495         Add more CFLAGS variables to compile with exceptions.  Add comments
4496         why which file needs unwind tables.
4497         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4498         tests.
4499         * tst-cancelx1.c: New file.
4500         * tst-cancelx2.c: New file.
4501         * tst-cancelx3.c: New file.
4502         * tst-cancelx4.c: New file.
4503         * tst-cancelx5.c: New file.
4504         * tst-cancelx6.c: New file.
4505         * tst-cancelx7.c: New file.
4506         * tst-cancelx8.c: New file.
4507         * tst-cancelx9.c: New file.
4508         * tst-cancelx10.c: New file.
4509         * tst-cancelx11.c: New file.
4510         * tst-cancelx12.c: New file.
4511         * tst-cancelx13.c: New file.
4512         * tst-cancelx14.c: New file.
4513         * tst-cancelx15.c: New file.
4514         * tst-cleanupx0.c: New file.
4515         * tst-cleanupx0.expect: New file.
4516         * tst-cleanupx1.c: New file.
4517         * tst-cleanupx2.c: New file.
4518         * tst-cleanupx3.c: New file.
4520         * tst-cleanup0.c: Make standard compliant.
4521         * tst-cleanup1.c: Likewise.
4523         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4524         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4525         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4526         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4527         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4528         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4529         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4530         CLEANUP_JMP_BUF.
4531         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4532         * tst-cancel12.c: New file.
4533         * tst-cancel13.c: New file.
4534         * tst-cancel14.c: New file.
4535         * tst-cancel15.c: New file.
4536         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4537         and tst-cancel15.
4539         * tst-cancel1.c: Add some comments.
4541         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4542         timeout correctly.
4544 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4546         * Makefile (CFLAGS-pthread_cancel.c): Define.
4548 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4550         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4551         Change type of __writer element to int.
4552         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4553         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4554         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4555         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4556         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4557         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4558         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4559         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4560         Compare with TID to determine deadlocks.
4561         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4562         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4563         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4564         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4565         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4566         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4567         Likewise.
4568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4569         Likewise.
4570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4571         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4572         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4573         Likewise.
4574         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4575         Likewise.
4576         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4577         * Makefile (tests): Add tst-rwlock12.
4578         * tst-rwlock12.c: New file.
4580 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4582         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4583         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4584         Remove bogus hidden_proto.
4585         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4586         Likewise.
4587         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4588         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4589         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4590         ___lll_mutex_timedlock): Likewise.
4592 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4595         (__pthread_cond_signal): Add some code to eventually handle
4596         cond_lock!=0.
4598 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4600         * Makefile (tests): Add tst-exec4.
4601         (tst-exec4-ARGS): Define.
4602         * tst-exec4.c: New file.
4604 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4606         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4607         Also fail if tv_nsec < 0.
4608         (__lll_timedwait_tid): Likewise.
4609         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4610         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4611         Likewise.
4612         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4613         Likewise.
4614         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4615         Likewise.
4616         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4617         Likewise.
4618         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4619         Likewise.
4620         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4621         Likewise.
4623         * Makefile (tests): Add tst-sem8 and tst-sem9.
4624         * tst-sem8.c: New file.
4625         * tst-sem9.c: New file.
4626         * sem_open.c: Fix creation of in_use record if the file exists but
4627         no internal record.
4629         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4630         definitions.
4632         * sysdeps/pthread/timer_create.c (timer_create): In case
4633         evp==NULL, assign timer ID to sival_ptr.
4635         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4636         struct pthread_unwind_buf *.
4637         (struct pthread): Likewise for cleanup_jmp_buf element.
4639         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4640         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4641         * unwind.c (__pthread_unwind_next): Likewise.
4643 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4645         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4646         (lll_futex_timed_wait): Use int for futex value parameter.
4647         (lll_futex_wake): Likewise.
4648         (lll_futex_requeue): Likewise.
4650         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4651         Replace one memory operation with one register operation.
4653         * tst-join4.c (do_test): Fix error message.
4655         * tst-rwlock6.c (do_test): Use correct format specifier.
4657         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4658         (__lll_mutex_lock_wait): Replace one memory operation with one
4659         register operation.
4660         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4661         (__lll_mutex_lock_wait): Likewise.
4663         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4664         (__lll_mutex_cond_lock): Add one to value parameter of
4665         __lll_lock_wait to reflect reality in the futex syscall.
4666         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4667         (lll_mutex_cond_lock): Likewise.
4669 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4671         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4672         New function.
4673         (lll_mutex_cond_lock): Define.
4675 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4677         * Makefile (tests): Add tst-signal6.
4678         * tst-signal6.c: New file.
4680         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4681         (__lll_mutex_unlock_force): New function
4682         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4684         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4685         (__lll_mutex_unlock_force): New function.
4686         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4688         * tst-rwlock7.c (do_test): Use correct format specifier.
4690         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4691         Find break parameter in correct asm argument.
4693 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4695         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4696         Remove out4.
4697         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4698         error occured.
4699         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4700         Add __mutex.
4701         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4702         lll_futex_requeue, lll_mutex_unlock_force): Define.
4704 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4706         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4707         (pthread_cond_t): Add __mutex.
4708         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4709         lll_futex_requeue, lll_mutex_unlock_force): Define.
4711 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4713         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4714         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4715         Add __mutex field.
4716         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4717         Define.
4718         (lll_futex_wait, lll_futex_wake): Define.
4719         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4720         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4721         FUTEX_REQUEUE instead of FUTEX_WAIT.
4722         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4723         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4724         mutex which was used in condvar structure.  Call
4725         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4726         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4728         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4729         include tcb-offsets.h.  Read wakeup value in locked region.
4730         Use the value of gbr register as THREAD_ID.
4731         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4732         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4733         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4735         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4736         macros.
4738 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4740         * sysdeps/pthread/pthread_cond_broadcast.c
4741         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4743 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4745         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4746         typo in register name.
4747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4748         correctly.  Actually use requeue.  Little optimization.
4749         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4750         mutex address early.  Handle cancellation state as 32-bit value.
4751         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4752         Remove unnecessary label.
4754 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4756         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4757         instead of FUTEX_WAIT.
4758         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4759         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4761         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4762         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4763         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4764         used in condvar structure.  Call __pthread_mutex_cond_lock instead
4765         of __pthread_mutex_lock_internal.
4766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4768         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4769         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4772         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4773         Add pthread_mutex_cond_lock.
4774         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4775         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4776         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4777         lll_mutex_cond_lock.
4778         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4779         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4780         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4781         Add __mutex field.
4782         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4783         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4785         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4786         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4788         * pthreadP.h: Declare __pthread_mutex_cond_lock.
4789         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4790         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
4791         macro don't define aliases.
4793         * cancellation.c: Remove __pthread_enable_asynccancel_2.
4794         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4795         * sysdeps/pthread/pthread_cond_timedwait.c: Use
4796         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4797         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4798         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4799         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4800         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4803 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
4805         * sem_open.c: Fix one endless loop.  Implement correct semantics
4806         wrt opening the same semaphore more then once.
4807         * sem_close.c: Adjust for sem_open change.
4808         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
4809         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4810         * Makefile (tests): Add tst-sem7.
4811         * tst-sem7.c: New file.
4813 2003-05-16  Roland McGrath  <roland@redhat.com>
4815         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4816         uninitialized variable braino.
4818 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
4820         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4821         test for syscall availability.
4823         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4824         __no_posix_timers to -1 if the syscalls don't exist.
4826         * pthread_join.c (pthread_join): Set tid field of the joined
4827         thread to -1.  This isn't necessary but helps to recognize some
4828         error conditions with almost no cost.
4830         * allocatestack.c (FREE_P): Also negative values indicate an
4831         unused stack.
4833         * unwind.c: Include <unistd.h>.
4835 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
4837         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4839 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
4841         * Makefile (crti-objs, crtn-objs): New variables.
4842         (omit-deps, extra-objs): Add crtn.
4843         ($(objpfx)libpthread.so): Depend on both crti and crtn
4844         and links to them in multidir.
4845         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4847 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
4849         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4850         (lll_mutex_unlock): Use atomic_exchange_rel.
4852 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
4854         * cond-perf.c (cons): Add missing locking around setting of alldone.
4856 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
4858         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4859         related macros.
4860         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4862 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
4864         * tst-sem6.c: New file.
4865         * Makefile (tests): Add tst-sem6.
4867         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4868         Use atomic_exchange_rel instead of atomic_exchange.
4869         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4870         Likewise.
4872         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4873         code for lll_futex_wait and lll_futex_wake in static apps.  Use
4874         vsyscall is possible.
4876         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4877         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4878         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4879         pthread_setaffinity_np.
4880         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4881         and pthread_setaffinity_np.
4882         * Makefile (libpthread-routines): Add pthread_getaffinity and
4883         pthread_setaffinity.
4885         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4886         use it in case mmap to allocate the stack fails.
4887         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4888         ARCH_MAP_FLAGS here.
4889         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4890         ARCH_RETRY_MMAP.
4892 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
4894         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4895         handler implementation.  It is now lockless in fork().
4896         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4897         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4898         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
4899         declare the __fork_*_lists.
4900         (struct fork_handler): Include pointers to all three functions.
4901         Add next, refcntr and need_signal elements.
4902         (__fork_handlers): New declaration.
4903         (__register_atfork_malloc): Remove declaration.
4904         (HAVE_register_atfork_malloc): Remove definition.
4905         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4906         __pthread_child_handler variable.
4907         (__libc_pthread_init): Use __register_atfork instead of explicitly
4908         adding to the list.
4909         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4910         and lll_futex_wake.
4911         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4913         * unwind.c (unwind_cleanup): Print error message and then abort.  This
4914         function must never be reached.
4916         * cond-perf.c: New file.
4918 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
4920         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4922 2003-05-04  Roland McGrath  <roland@redhat.com>
4924         * Makefile ($(objpfx)../libc.so): New target.
4926 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
4928         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4929         (pthread_condattr_t): Size is only an int, don't use long for
4930         alignment.
4931         (pthread_mutexattr_t): Likewise.
4932         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4933         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4934         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4936 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
4938         * sysdeps/i386/tls.h: Define THREAD_ID.
4939         * sysdeps/ia64/tls.h: Likewise.
4940         * sysdeps/powerpc/tls.h: Likewise.
4941         * sysdeps/s390/tls.h: Likewise.
4942         * sysdeps/sh/tls.h: Likewise.
4943         * sysdeps/x86_64/tls.h: Likewise.
4944         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4945         record ownership.
4946         * pthread_mutex_timedlock.c: Likewise.
4947         * pthread_mutex_trylock.c: Likewise.
4948         * pthread_mutex_unlock.c: Likewise.
4949         * pthread_rwlock_trywrlock.c: Likewise.
4950         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4951         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4952         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4953         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4955         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4956         flag.
4958 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
4960         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4961         (__SIZEOF_PTHREAD_COND_T): Define to 48.
4962         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4963         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4964         Make __align long long instead of long.
4965         (pthread_rwlock_t): Formatting.
4966         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4967         (pthread_rwlock_t): Formatting.
4968         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4969         (pthread_cond_t): Make __align long long instead of long.
4970         (pthread_rwlock_t): Move __flags field to the same position as in
4971         linuxthreads.
4973 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
4975         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4976         * tst-rwlock7.c (do_test): Likewise.
4978 2003-04-26  Roland McGrath  <roland@redhat.com>
4980         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4982 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
4984         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4985         sizeof (struct pthread).
4986         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4987         1 struct pthread.
4988         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4989         to 0.
4990         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4991         struct pthread.
4992         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4993         to 32-bit bytes.
4994         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4995         tcbp.
4996         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4997         unneccessarily.
4998         (NO_TLS_OFFSET): Define.
4999         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5000         add TLS_TCB_SIZE unnecessarily.
5002 2003-04-22  Roland McGrath  <roland@redhat.com>
5004         * Makeconfig (shared-thread-library): Reverse link order to work
5005         around linker bug.
5007 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
5009         * semaphore.h: Fix typo in comment.
5011 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
5013         * sysdeps/pthread/sigfillset.c: New file.
5015         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5016         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5017         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5018         * sysdeps/pthread/sigaction.c: Likewise.
5019         * sysdeps/pthread/sigprocmask.c: New file.
5020         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5021         __SIGRTMIN+1.
5022         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5023         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
5024         in this case.
5026 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
5028         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5029         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5031         * sysdeps/unix/sysv/linux/unregister-atfork.c
5032         (__unregister_atfork): Don't free memory not allocated dynamically.
5034         * semaphore.h: Remove __THROW marker from cancellation points.
5035         * nptl/sysdeps/pthread/pthread.h: Likewise.
5037 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
5039         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5040         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5041         __THROW.
5043 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
5045         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5047 2003-04-15  Roland McGrath  <roland@redhat.com>
5049         * forward.c (__pthread_unwind): Tweak to avoid warning.
5051 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
5053         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5055 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
5057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5058         overflow CFA advance instructions.
5059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5061 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
5063         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5064         * sysdeps/i386/pthread_spin_lock.c: Likewise.
5065         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
5066         defined.
5068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5069         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5071         DW_CFA_advance_loc for .Laddl-.Lsubl.
5073 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
5075         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5076         position-independent unwind data for static libraries.
5077         Add missing unwind info.  Add comments.
5079         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5080         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5082         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5084 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
5086         * Makefile: Make sure all cancellation points are compiled with
5087         exception and asynchronous unwind tables.
5089         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5090         which mishandles loading of global object addresses in PIC.
5091         (THREAD_SETMEM_NC): Likewise.
5093 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5095         * pthread.h: Define new data structure for cleanup buffer.  Declare
5096         new cleanup handler interfaces.
5097         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
5098         (struct pthread): Add cleanup_jmp_buf pointer.  Define
5099         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5100         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
5101         it.  Declare old cleanup handler installation functions.
5102         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
5103         handling.
5104         * cleanup_defer.c: Likewise.
5105         * cleanup_compat.c: New file.  Old cleanup code.
5106         * cleanup_def_compat.c: New file.  Old cleanup code.
5107         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5108         if own thread descriptor.
5109         * unwind.c: New file.
5110         * forward.c: Add __pthread_unwind.
5111         * init.c (pthread_functions): Add __pthread_unwind.
5112         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5113         Add ptr___pthread_unwind.
5114         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5115         and unwind function.
5116         * Makefile (libpthread-routines): Add cleanup_compat,
5117         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
5118         table generation if necessary.
5119         * version.c: Record whether unwind support is compiled in.
5120         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5121         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5122         handler interfaces.
5123         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5124         complication to generate unwind information for syscall wrappers.
5125         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5126         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5127         __cleanup_fct_attribute.
5129         * Makefile: Add rules to build and run tst-cleanup0.
5130         * tst-cleanup0.c: New file.
5131         * tst-cleanup0.expect: New file.
5133         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
5134         caller.  Optimize to avoid often unecessary local variable.
5136 2003-04-11  Roland McGrath  <roland@redhat.com>
5138         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5139         sets variable `multidir'; include that.
5140         (generated): Add it.
5141         ($(objpfx)$(multidir)/crti.o): New target.
5142         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5144 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
5146         * tst-attr2.c (do_test): Add cast to avoid warning.
5147         * tst-mutex4.c (do_test): Likewise.
5149 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
5151         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5152         in child.
5154 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
5156         * Makefile (tests): Add tst-detach1.
5157         * tst-detach1.c: New file.
5159 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
5161         * sysdeps/pthread/pthread.h: Remove duplicate
5162         pthread_cleanup_{push,pop} definitions.
5164         * tst-barrier2.c: Eliminate warnings.
5165         * tst-cancel4.c: Likewise.
5166         * tst-cond4.c: Likewise.
5167         * tst-cond6.c: Likewise.
5168         * tst-detach1.c: Likewise.
5169         * tst-rwlock4.c: Likewise.
5170         * tst-rwlock6.c: Likewise.
5171         * tst-rwlock7.c: Likewise.
5172         * tst-sem3.c: Likewise.
5173         * tst-spin2.c: Likewise.
5174         * tst-umask1.c: Likewise.
5176 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
5178         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5180 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
5182         * descr.h (struct pthread): Move cancelhandling member to the front.
5184 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
5186         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5187         malloc_parent, and malloc_child statically.
5188         (__register_atfork_malloc): New function.
5189         (free_mem): Don't free any of the malloc_* variables on the list.
5190         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5191         Define HAVE_register_atfork_malloc.
5193 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
5195         * sysdeps/pthread/createthread.c (create_thread): Add some more
5196         comments explaining when to set multiple_threads and when not.
5198         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5199         THREAD_ATOMIC_BIT_SET if not already defined.
5200         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5201         THREAD_ATOMIC_BIT_SET:
5202         * sysdeps/x86_64/tls.h: Likewise.
5203         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5204         THREAD_ATOMIC_CMPXCHG_VAL.
5205         (_pthread_cleanup_pop_restore): Likewise.
5206         * cancellation.c (__pthread_enable_asynccancel): Likewise.
5207         (__pthread_enable_asynccancel_2): Likewise.
5208         (__pthread_disable_asynccancel): Likewise.
5209         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5210         (__libc_disable_asynccancel): Likewise.
5211         * init.c (sigcancel_handler): Likewise.
5212         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5213         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5215 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
5217         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5218         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5219         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5220         * Makefile (tests): Add tst-cancel11.
5221         * tst-cancel11.c: New file.
5223 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
5225         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5226         round, not the first.  Use specific_used flag instead of local
5227         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
5228         (__free_tcb): Don't call deallocate_tsd here.
5229         (start_thread): Call deallocate_tsd here.
5230         * pthread_setspecific.c: Set specific_used flag really only when
5231         needed.
5232         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5233         * tst-tsd3.c: New file.
5234         * tst-tsd4.c: New file.
5236 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5238         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5239         Use atomic_exchange_and_add instead of __lll_add.
5240         (__lll_mutex_timedlock): Likewise.
5241         Patch by Ian Wienand.
5243 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
5245         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5246         (SINGLE_THREAD_P): Fix typo.
5247         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5249 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5251         * Makefile (tests): Add tst-align.
5252         * tst-align.c: New file.
5253         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5255         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5256         function correctly.
5258         * tst-tsd2.c: Add casts to avoid warnings.
5260 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
5262         * descr.h (struct pthread): Move most often used elements to the front.
5264 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
5266         * Makefile (libpthread-routines): Add pthread_atfork.
5267         (libpthread-static-only-routines): Add pthread_atfork.
5269 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5271         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5272         of TLS_DTV_AT_TP.
5273         (INSTALL_DTV): Add parens.
5274         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5275         Use passed descr instead of THREAD_SELF.
5276         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5277         (__lll_mutex_timedlock_wait): Correct expected value after
5278         spurious wakeup.
5279         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5280         Release lock before waking up the waiters.
5281         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5282         criteria.  Reorderstruct passed to cleanup handler.  Fix
5283         handling of cancellation and failung pthread_mutex_unlock call.
5284         Use __pthread_enable_asynccancel_2 instead of
5285         __pthread_enable_asynccancel.
5286         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5287         Return result of lock re-get if it fails.
5288         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5289         for __pthread_cleanup_push.
5290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5291         completely broken rwlock implementation.
5292         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5293         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5294         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5295         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5297         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5298         versioned_symbol macro.
5299         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5300         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5302 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5304         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5305         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5306         and __helper_tid.
5307         (struct timer): Remove th and bar field.
5308         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5309         debugging code.  Create only one helper thread.
5310         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5311         helper thread.
5312         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5313         Renamed.  Define statically.  Use thread info from siginfo.
5314         (__helper_once): New variable.
5315         (__helper_tid): New variable.
5316         (__reset_helper_control): New function.
5317         (__start_helper_thread): New function.
5319         * pthread_create.c (start_thread): Don't use setjmp inside
5320         __builtin_expect to work around gcc bug.
5322         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5323         timer_delete syscall fails, but not with ENOSYS, set
5324         __no_posix_timers.
5326         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5327         (timer_settime): Fix typo.
5328         * sysdeps/unix/sysv/linux/timer_getoverr.c
5329         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5331 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5334         offset of cleanupbuf.__prev.
5336 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5338         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5339         of included file.
5341 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5343         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5344         NULL provide default definition to syscall.
5346 2003-03-25  Roland McGrath  <roland@redhat.com>
5348         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5349         (timer_id2ptr): Fix typo.
5351 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5353         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5354         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5355         * sysdeps/ia64/pthreaddef.h: Likewise.
5356         * sysdeps/powerpc/pthreaddef.h: Likewise.
5357         * sysdeps/s390/pthreaddef.h: Likewise.
5358         * sysdeps/sh/pthreaddef.h: Likewise.
5359         * sysdeps/x86_64/pthreaddef.h: Likewise.
5360         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5361         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5362         being changed.
5363         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5364         SIGTIMER is not unblocked.
5365         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5366         RT signal taken.
5367         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5368         be send.
5369         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5370         pass pointer through as ID.
5371         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5372         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5373         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5374         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5375         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5376         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5377         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5378         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5379         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5380         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5381         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5382         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5383         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5384         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5385         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5386         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5387         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5388         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5389         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5390         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5391         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5392         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5393         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5394         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5395         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5396         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5397         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5398         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5399         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5400         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5401         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5402         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5403         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5405         * pthreadP.h: Remove FRAME_LEFT definition.
5406         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5407         already left frame.  Programs which have this problem are not POSIX
5408         compliant.
5409         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5411 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5413         * sysdeps/pthread/tst-timer.c: Check return values of the
5414         functions we test.
5416 2003-03-23  Roland McGrath  <roland@redhat.com>
5418         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5419         * tst-tls3mod.c: Likewise.
5420         * tst-tls1.c: Likewise.
5421         * tst-tls2.c: Likewise.
5423         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5424         undefined behavior.
5426         * tst-join5.c (tf1, tf2): Add a cast.
5428         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5430         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5431         Don't test anything.
5432         * tst-cond4.c: Likewise.
5433         * tst-cond6.c: Likewise.
5434         * tst-flock2.c: Likewise.
5435         * tst-mutex4.c: Likewise.
5436         * tst-rwlock4.c: Likewise.
5437         * tst-signal1.c: Likewise.
5438         * tst-spin2.c: Likewise.
5439         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5441         * tst-mutex4.c: Use test-skeleton.c.
5442         * tst-spin2.c: Likewise.
5443         * tst-sysconf.c: Likewise.
5444         * tst-barrier2.c: Likewise.
5445         * tst-cond4.c: Likewise.
5446         * tst-cond6.c: Likewise.
5447         * tst-rwlock4.c: Likewise.
5448         * tst-unload.c: Likewise.
5449         * tst-flock2.c (do_test): Use return instead of exit.
5451 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5453         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5455 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5457         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5458         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5459         instead of __lll_compare_and_swap.
5460         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5461         Likewise.
5462         Removed definition if __lll_compare_and_swap.
5464         * cancellation.c: Adjust for new form of compare&exchange macros.
5465         * cleanup_defer.c: Likewise.
5466         * init.c: Likewise.
5467         * libc-cancellation.c: Likewise.
5468         * old_pthread_cond_broadcast.c: Likewise.
5469         * old_pthread_cond_signal.c: Likewise.
5470         * old_pthread_cond_timedwait.c: Likewise.
5471         * old_pthread_cond_wait.c: Likewise.
5472         * pthread_cancel.c: Likewise.
5473         * pthread_create.c: Likewise.
5474         * pthread_detach.c: Likewise.
5475         * pthread_join.c: Likewise.
5476         * pthread_key_delete.c: Likewise.
5477         * pthread_setcancelstate.c: Likewise.
5478         * pthread_setcanceltype.c: Likewise.
5479         * pthread_timedjoin.c: Likewise.
5480         * pthread_tryjoin.c: Likewise.
5481         * sysdeps/pthread/createthread.c: Likewise.
5483 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5485         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5486         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5487         definitions.  Replace uses with calls to atomic_* functions.
5488         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5489         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5490         __lll_test_and_set calls with atomic_exchange_and_add and
5491         atomic_exchange calls respectively.
5492         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5493         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5494         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5495         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5496         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5497         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5498         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5500         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5501         returns the old value.
5503 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5505         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5506         int for variable OLDVAL and correct inline assembler contraint.
5507         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5508         type int for variable OLD.
5510         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5511         only for s390-32.
5512         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5513         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5514         instead of multiple_threads field in the TCB.
5516 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5518         * sysdeps/i386/i686/bits/atomic.h: Removed.
5519         * sysdeps/i386/i586/bits/atomic.h: Removed.
5520         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5521         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5522         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5523         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5524         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5525         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5526         * atomic.h: Removed.  Moved to glibc.
5528         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5529         support for clock selection.
5531         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5532         signalling waiters.
5534 2003-03-18  Roland McGrath  <roland@redhat.com>
5536         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5537         Add __lll_rel_instr first.  Add memory clobber.
5538         (lll_mutex_unlock): Use __lll_test_and_set.
5539         From Paul Mackerras <paulus@samba.org>.
5541         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5542         unconditionally.
5543         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5544         (SINGLE_THREAD_P):  Add `header.' prefix.
5545         From Paul Mackerras <paulus@samba.org>.
5547         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5548         pthread_timedjoin_np to ...
5549         (libpthread: GLIBC_2.3.3): ... here.
5550         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5552         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5553         Avoid shadowing VAL variable.
5555         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5556         New macro.
5558 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5560         * Makefile (tests): Add tst-cond11.
5561         * tst-cond11.c: New file.
5563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5564         struct passed to cleanup handler to eliminate one more
5565         instruction.
5566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5568         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5569         (pthrad_cond_t): Replace __unused field with __clock.
5571         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5572         waken all waiters in cleanup handler.
5573         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5576         * pthread_condattr_getclock.c: New file.
5577         * pthread_condattr_setclock.c: New file.
5578         * sysdeps/pthread/pthread.h: Declare these new functions.
5579         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5580         * Makefile (libpthread-routines): Add the new functions.
5581         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5582         Renamed field to value.  Document use of the bits.
5583         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5584         change.
5585         * pthread_condattr_setpshared.c: Likewise.
5586         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5587         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5588         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5589         Add __clock field.
5590         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5591         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5592         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5593         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5595         Implement clock selection.
5596         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5597         * pthread-errnos.sym: Add ENOSYS.
5598         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5599         _POSIX_CLOCK_SELECTION.
5600         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5603         invalid .size directive.
5605 2003-03-17  Roland McGrath  <roland@redhat.com>
5607         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5608         Formatting tweaks.
5610 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5612         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5613         Use __lll_add instead of spelling it out.  Use protected symbol names.
5614         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5615         Use __lll_add.
5616         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5617         Renamed from lll_compare_and_swap.  Use new name where necessary.
5618         (__lll_add): Defined.
5619         (__lll_dec_if_positive): Defined.
5620         (__lll_test_and_set): Defined.
5621         * sysdeps/ia64/pthread_spin_init.c: Removed.
5622         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5623         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5624         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5626         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5627         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5628         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5629         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5630         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5631         __sync_lock_release_si.
5632         Patch by Jakub Jelinek.
5634         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5635         Fix timeout handling.
5636         (__lll_timedwait_tid): Likewise.
5637         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5638         Patch by Jakub Jelinek.
5640         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5642 2003-03-17  Roland McGrath  <roland@redhat.com>
5644         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5645         * sysdeps/pthread/pthread_spin_init.c: New file.
5646         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5647         * sysdeps/powerpc/Makefile: New file.
5648         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5649         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5650         * sysdeps/powerpc/pthreaddef.h: New file.
5651         * sysdeps/powerpc/tcb-offsets.sym: New file.
5652         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5653         * sysdeps/powerpc/tls.h: New file.
5654         * sysdeps/powerpc/bits/atomic.h: New file.
5655         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5656         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5657         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5659         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5660         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5661         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5662         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5663         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5664         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5665         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5666         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5667         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5668         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5669         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5670         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5671         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5672         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5673         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5675         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5676         not gettimeofday.
5677         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5678         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5679         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5680         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5681         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5683 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5685         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5686         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5689         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5691 2003-03-16  Roland McGrath  <roland@redhat.com>
5693         * tst-fork4.c: Include <string.h>.
5694         * tst-signal2.c: Likewise.
5695         * tst-mutex5.c (do_test): exit -> return.
5696         * tst-mutex2.c: Include <stdlib.h>.
5698 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5700         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5701         (__lll_mutex_timedlock_wait): Correct expected value after
5702         spurious wakeup.  Otherwise we would never wait again.
5704         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5705         zone versus inline asm stupidity.  Use correct instructions.
5707         * tst-rwlock6.c: Add some more status output.
5709 2003-03-15  Roland McGrath  <roland@redhat.com>
5711         * sysdeps/pthread/configure.in: New file.
5712         * sysdeps/pthread/configure: New file (generated).
5714 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5716         * allocatestack.c (allocate_stack): Store the exact stack size of
5717         user allocated stacks.
5719 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5721         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5722         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5723         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5724         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5725         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5726         Use `header.' prefix.
5727         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5729 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5731         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5732         __builtin_frame_address, use stack pointer.
5734         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5735         instead of __builtin_frame_pointer.
5737 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5739         * tst-basic1.c (do_test): Add cast to avoid warning.
5740         * tst-basic2.c (do_test): Likewise.
5742         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5743         amount of stack correction.
5745         * tst-fork4.c: Use test-skeleton.c.
5747 2003-03-14  Roland McGrath  <roland@redhat.com>
5749         * init.c: Fix typo "#eli" for "#else".
5751 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5753         * allocatestack.c (__stack_user): Use hidden_data_def.
5754         * pthread_create.c (__pthread_keys): Likewise.
5756         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5758 2003-03-14  Roland McGrath  <roland@redhat.com>
5760         * tst-fork4.c: New file.
5761         * Makefile (tests): Add it.
5763         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5764         we always define the padding space.
5765         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5766         stopped supporting its own extensions fully.
5767         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5768         struct also called `header', so `header.multiple_threads' is the field
5769         name to use on all machines.
5770         * allocatestack.c (allocate_stack): Use `header.' prefix.
5771         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5772         * pthread_create.c (__pthread_create_2_1): Likewise.
5773         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5774         (THREAD_SELF): Likewise.
5775         * sysdeps/x86_64/tls.h: Likewise.
5776         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5777         (SINGLE_THREAD_P): Likewise.
5778         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5779         (SINGLE_THREAD_P): Likewise.
5780         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5781         (SINGLE_THREAD_P): Likewise.
5783         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5784         value directly.
5786 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5788         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5789         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5791         * pthread_create.c (start_thread): setjmp is expected to return 0.
5793         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5794         (THREAD_GETMEM_NC): Likewise.
5796 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
5798         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5799         and the size of the stack which must be allocated is a multiple,
5800         allocate one more page.
5801         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5802         MULTI_PAGE_ALIASING.
5804 2003-03-13  Roland McGrath  <roland@redhat.com>
5806         * pthread_create.c (start_thread): Set EXITING_BIT after the
5807         event-reporting (and destructors), not before.
5809 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
5811         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5812         lll_futex_wake): Declare register variables as long int instead of
5813         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5814         Make syscall arguments clobbered by the syscall.
5815         (lll_futex_wait): Define using lll_futex_timed_wait.
5817         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5818         to void *.
5820         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5821         PPID if [! NDEBUG].
5823         * allocatestack.c (nptl_ncreated): Only declare if
5824         COLORING_INCREMENT != 0.
5826         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5827         (__libc_enable_asynccancel_2): Remove prototype.
5829         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5830         ctid to match kernel.
5832 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5834         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5835         libc_multiple_threads.
5836         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5837         __libc_multiple_threads to...
5838         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
5840         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5841         versioning.
5842         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5843         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5845         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5846         (__pthread_once_internal): Define.
5848         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5849         macros instead of .symver directly.
5850         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5851         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5853         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5854         * sysdeps/x86_64/tcb-offsets.sym: New file.
5855         * sysdeps/x86_64/Makefile: New file.
5857         * sysdeps/i386/tcb-offsets.sym: Add SELF.
5858         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5859         to access own pthread_t in TCB.
5860         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5861         Likewise.
5862         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5863         Likewise.
5864         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5866 2003-03-12  Roland McGrath  <roland@redhat.com>
5868         * pthread-errnos.sym: New file.
5869         * Makefile (gen-as-const-headers): New variable, list that file.
5870         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5871         header <pthread-errnos.h> instead of defining errno values here.
5872         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5873         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5874         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5877         Likewise.
5878         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5879         Likewise.
5880         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5882         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5883         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5884         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5885         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5886         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5887         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5889         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5890         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5891         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5892         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5893         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5894         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5895         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5896         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5897         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5898         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5899         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5900         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5901         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5902         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5903         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5904         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5905         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5906         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5908         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5909         CLONE_CHILD_SETTID worked.
5911 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5913         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5914         file.
5915         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5916         file.
5918         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5919         (pthread_cond_t): Add padding.
5921         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5922         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5923         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5925         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5926         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5927         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5928         (__pthread_rwlock_timedrdlock): Likewise.
5929         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5930         (__pthread_rwlock_wrlock): Likewise.
5931         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5932         (__pthread_rwlock_rdlock): Likewise.
5934         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5937         result of lock re-get if it fails.
5939 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5941         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5942         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5943         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5946         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5947         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5948         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5949         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5950         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5952         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5953         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5955         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5956         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5957         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5958         (create_thread): Likewise.
5959         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5960         * init.c (__pthread_initialize_minimal_internal): Initialize
5961         __libc_multiple_threads_ptr if necessary.
5962         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
5963         __pthread_multiple_threads and __libc_multiple_threads_ptr.
5964         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5965         __libc_multiple_threads.
5966         (__libc_pthread_init): Return pointer to __libc_pthread_init if
5967         necessary.
5969         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5970         (THREAD_SETMEM_NC): Likewise.
5972         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5973         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5974         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5975         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5977         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5978         Eliminate one entire instruction.
5980         * cancellation.c (__pthread_enable_asynccancel_2): New function.
5981         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5982         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5983         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5984         instead of __pthread_enable_asynccancel.
5985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5986         (__pthread_cond_wait): Likewise.
5987         * sysdeps/pthread/pthread_cond_timedwait.c
5988         (__pthread_cond_timedwait): Likewise.
5989         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5992         (__condvar_cleanup): Wake up all waiters in case we got signaled
5993         after being woken up but before disabling asynchronous
5994         cancellation.
5995         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5996         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5997         (__condvar_cleanup): Likewise.
5999         * init.c (__NR_set_tid_address): If already defined, don't redefine.
6000         Make it an error if architecture has no #if case.  Add x86-64.
6002         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6003         pt-initfini.s generation.
6005         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6006         (TLS_INIT_TP): Fix typo.
6008 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6010         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6011         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6013         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6014         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6015         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6016         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6017         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6018         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6019         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6020         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6022 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6024         * sysdeps/pthread/pthread_cond_timedwait.c
6025         (__pthread_cond_timedwait): Return the result of the final
6026         locking.  If it succeeds, the regular function return value.
6028         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6029         Return result of the final locking.
6030         * version.c (__nptl_main): Work around problems with the strange
6031         INTERNAL_SYSCALL macro on ppc32.
6032         * init.c (__pthread_initialize_minimal_internal): Unblock
6033         SIGCANCEL in case the parent blocked it.
6034         Reported by Paul Mackerras <paulus@samba.org>.
6036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6037         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6040 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6042         * sysdeps/pthread/pthread_cond_timedwait.c
6043         (__pthread_cond_timedwait): Unlock and fail if
6044         __pthread_mutex_unlock_internal failed.
6046         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6047         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6048         Use ARCH_CLONE.
6049         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6050         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6051         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6052         ALLOCATE_STACK): New macros.
6053         (TLS_TPADJ): New macro.
6054         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6055         (allocate_stack): Handle TLS_DTV_AT_TP and
6056         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
6057         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6058         Don't set PD->self.
6059         * init.c [__ia64__] (__NR_set_tid_address): Define.
6061         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6062         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6063         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6064         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6065         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6066         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6067         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6068         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6069         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6070         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6071         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6072         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6073         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6074         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6075         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6076         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6077         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6078         * sysdeps/ia64/bits/atomic.h: New file.
6079         * sysdeps/ia64/Makefile: New file.
6080         * sysdeps/ia64/pthread_spin_init.c: New file.
6081         * sysdeps/ia64/pthread_spin_lock.c: New file.
6082         * sysdeps/ia64/pthread_spin_trylock.c: New file.
6083         * sysdeps/ia64/pthread_spin_unlock.c: New file.
6084         * sysdeps/ia64/pthreaddef.h: New file.
6085         * sysdeps/ia64/tcb-offsets.sym: New file.
6086         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6087         * sysdeps/ia64/tls.h: New file.
6089         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6090         to syscall instead of no arguments.
6092 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
6094         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6095         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6096         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6097         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6099         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6100         unused code.
6102         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6104         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6105         lowlevelbarrier.sym.
6106         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6107         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6108         Include lowlevelbarrier.h and don't define offsets locally.
6109         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6111         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6112         (__lll_mutex_lock_wait): Reverse order of first two parameters.
6113         (__lll_mutex_timedlock_wait): Likewise.
6114         (lll_mutex_lock): Adjust asm for that.
6115         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
6116         (lll_lock): Adjust asm for operand order change.
6117         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6118         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6120         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6121         Reverse order of parameters.
6122         (__lll_timedwait_tid): Remove regparms attribute.
6123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6124         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6126         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6127         (__lll_timedwait_tid): Remove one unnecessary instruction.
6129         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6130         __lll_mutex_timedlock_wait only for NOT_IN_libc.
6131         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6132         lowlevelmutex.S.
6134         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6135         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6136         for NOT_IN_libc.
6137         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6138         lowlevellock.S.
6140         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6141         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
6142         for libc.so.
6143         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6144         define LOCK here (if UP is not defined).  The actual code is in
6145         lowlevelmutex.S.
6147         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6148         LOCK is already defined.  Don't define lll_unlock_wake_cb and
6149         __lll_timedwait_tid for libc.so.
6150         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6151         define LOCK here (if UP is not defined).  The actual code is in
6152         lowlevellock.S.
6154         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6155         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6156         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6157         instead of lowlevelsem.h.
6158         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6159         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6160         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6162         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6163         lowlevelrwlock.sym.
6164         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6165         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6166         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6168         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6169         register loading.
6170         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6171         last changed.  D'oh.
6173         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6175         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6176         of __libc_locking_needed.
6177         (lll_trylock): Initialize %eax to zero.
6179         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6180         pthread_cond_t definition.
6182 2003-03-10  Roland McGrath  <roland@redhat.com>
6184         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6185         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6186         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6187         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6188         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6190         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6191         Instead of setting PD->multiple_threads, set globals
6192         __pthread_multiple_threads and __libc_multiple_threads.
6193         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6194         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6195         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6197         * descr.h (struct pthread): Conditionalize first member on
6198         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
6199         containing an anonymous tcbhead_t.  Move `list' member out.
6200         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6201         * allocatestack.c: Remove use of `header.data.' prefix.
6202         * pthread_create.c: Likewise.
6203         * init.c (__pthread_initialize_minimal_internal): Likewise.
6204         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6205         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6206         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6207         * sysdeps/x86_64/tls.h: Likewise.
6208         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6209         (SINGLE_THREAD_P): Likewise.
6210         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6211         (SINGLE_THREAD_P): Likewise.
6212         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6213         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6215 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
6217         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6219         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6220         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6222         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6223         leftovers from the ia32 code.
6225         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6226         memory load.
6227         (clear_once_control): Don't load %esi.
6229         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6230         handling.
6232         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6234         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6235         * sysdeps/unix/sysv/linux/createthread.c: ...here.
6237         * Makefile (tests): Add tst-cond10.
6238         * tst-cond10.c: New file.
6240 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
6242         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6243         * tst-signal3.c (do_test): Likewise.
6244         * tst-sem5.c (do_test): Likewise.
6245         * tst-kill6.c (do_test): Likewise.
6246         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
6248         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6249         of inc/dec.
6250         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6251         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6252         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6253         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6255         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6257         Likewise.
6258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6259         Likewise.
6260         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6265         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6266         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6267         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6269         * allocatestack.c (allocate_stack): If mprotect() fails free the
6270         TLS memory.
6272 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6274         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6276         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6277         lll_wake_tid.  This was used only to work around kernel limits in
6278         the early days.
6279         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6280         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6284         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6285         (__pthread_initialize_minimal_internal): Change initialization of
6286         __static_tls_align_m1 appropriately.
6287         * pthreadP.h (__static_tls_align_m1): Renamed from
6288         __static_tls_align.
6289         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6290         instead of __static_tls_align-1.
6292 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6294         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6296         * pthread_create.c: Define __pthread_keys using nocommon
6297         attribute, not by placing it explicitly in bss.
6298         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6300         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6301         Use it in mmap call to allocate stacks.
6303         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6305         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6306         result of the thread function.
6308 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6310         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6311         version is just fine.
6313         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6314         (__pthread_child_handler): Renamed from pthread_child_handler,
6315         exported, and marked hidden.  Change all users.
6316         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6317         free __pthread_child_handler from child list.
6319 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6321         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6323         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6324         Fix handling of cancellation and failing pthread_mutex_unlock call.
6325         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6326         (__pthread_cond_wait): Likewise.
6328         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6329         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6330         lll_futex_timed_wait call.
6331         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6332         (pthread_rwlock_timedwrlock): Likewise.
6334         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6335         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6336         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6338         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6339         check of lll_futex_wake return value.
6341 2003-03-03  Roland McGrath  <roland@redhat.com>
6343         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6345         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6346         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6347         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6349 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6351         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6352         error for CPU clocks.
6354         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6355         _POSIX_MONOTONIC_CLOCK.
6356         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6358         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6359         recent kernels.
6361 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6363         * descr.h (struct pthread): Move cleanup field to the front.
6365 2003-03-01  Roland McGrath  <roland@redhat.com>
6367         * sem_open.c (sem_open): Braino fix.
6369 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6371         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6373         __pthread_cleanup_pop functionality.
6374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6376         * descr.h (struct pthread): Move tid field to the front now that
6377         it is often used.
6379         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6380         (__lll_mutex_timedlock_wait): Remove.
6381         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6382         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6383         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6384         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6385         (lll_unlock_wake_cb): Don't save and restore %esi.
6386         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6387         %esi.
6388         (__lll_timedwait_tid): Add alignment.
6389         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6390         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6391         %esi.
6392         (__lll_timedwait_tid): Removed.
6393         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6394         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6395         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6396         (pthread_barrier_wait): Don't save, load, and restore %esi for
6397         last thread.
6398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6399         (__pthread_cond_signal): Don't save, load, and restore %esi.
6400         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6401         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6402         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6403         Don't save, load, and restore %esi.
6405 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6408         Release lock before waking up the waiters.
6410         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6412         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6413         (reader_thread): Likewise.
6415         * sysdeps/pthread/pthread_rwlock_unlock.c
6416         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6417         to wake up readers if there are none.
6419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6420         Release internal lock before wake threads.
6422 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6424         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6425         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6426         predefined.
6427         * tst-rwlock9.c: Likewise.
6428         * tst-rwlock10.c: New file.
6429         * tst-rwlock11.c: New file.
6431         * Makefile (tests): Add tst-dlsym1.
6432         * tst-dlsym1.c: New file.
6434         * init.c (__pthread_initialize_minimal_internal): Set
6435         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6436         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6438 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6440         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6442         * tst-cond2.c: Fix sychronization with child.
6444         * tst-rwlock8.c (reader_thread): Remove unused variable.
6446         * Makefile: Add rules to build and run tst-tls3.
6447         * tst-tls3.c: New file.
6448         * tst-tls3mod.c: New file.
6450         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6451         * tst-rwlock8.c: New file.
6452         * tst-rwlock9.c: New file.
6453         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6454         complete broken rwlock implementation.
6455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6456         Likewise.
6457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6458         Likewise.
6459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6461         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6462         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6463         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6464         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6465         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6467 2003-02-23  Roland McGrath  <roland@redhat.com>
6469         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6471 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6473         * Makefile (tests): Add tst-context1.
6474         * tst-context1.c: New file.
6476         * Makefile (tests): Add tst-tls1 and tst-tls2.
6477         * tst-tls1.c: New file.
6478         * tst-tls2.c: New file.
6480         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6481         for failed cmpxchg.
6483         * pthread_create.c (start_thread): Set EXITING_BIT early.
6485         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6486         (THREAD_GETMEM_NC): Likewise.
6488 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6490         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6491         off 3 more bytes by using offset-less instructions when possible.
6493         * Makefile: Add dependency for $(objpfx)version.d.
6495         * eintr.c (eintr_source): Add unnecessary return but the compiler
6496         insists.
6498         * tst-kill3.c: Include <unistd.h>.
6500 2003-02-21  Roland McGrath  <roland@redhat.com>
6502         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6504 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6506         * Makefile (tests): Add tst-eintr1.
6507         (distribute): Add eintr.c.
6508         * tst-eintr1.c: New file.
6509         * eintr.c: New file.
6511         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6513         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6514         Disallow sending SIGCANCEL.
6516         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6517         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6518         * tst-kill1.c: New file.
6519         * tst-kill2.c: New file.
6520         * tst-kill3.c: New file.
6521         * tst-kill5.c: New file.
6522         * tst-kill6.c: New file.
6523         * tst-basic7.c: Renamed to...
6524         * tst-kill4.c: ...this.
6526 2003-02-21  Roland McGrath  <roland@redhat.com>
6528         * Makefile (install-lib-ldscripts): New variable.
6530 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6532         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6533         * pthread_cancel.c: Use INVALID_TD_P.
6534         * pthread_detach.c: Likewise.
6535         * pthread_getschedparam.c: Likewise.
6536         * pthread_setschedparam.c: Likewise.
6537         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6538         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6539         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6540         * pthread_timedjoin.c: Likewise.
6542         * tst-basic7.c: Include <signal.h>.
6544         * pthread_join.c (pthread_join): Limited checking for invalid
6545         descriptors.
6546         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6548 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6550         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6551         beginning of the loop.  Clear the entire first block of TSD.
6552         * Makefile (tests): Add tst-key4.
6553         * tst-key4.c: New file.
6555 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6557         * Makefile (tests): Add tst-basic7.
6558         * tst-basic7.c: New file.
6560         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6561         Add some more __builtin_expect.
6563         * pthreadP.h: Define dummy version of DEBUGGING_P.
6565 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6567         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6568         _POSIX_THREAD_PRIORITY_SCHEDULING.
6569         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6570         _XOPEN_REALTIME_THREADS.
6571         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6573         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6574         kernel returns EINVAL for PID <= 0, work around it.
6576         * Makefile (tests): Add tst-signal5.
6577         * tst-signal5.c: New file.
6579         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6580         and LOGIN_NAME_MAX.
6582         * tst-cancel1.c (tf): Block all signals.
6584         * Makefile (tests): Add tst-basic6.
6585         * tst-basic6.c: New file.
6587         * tst-basic1.c: Add test for process ID.
6589         * Makefile (tests): Add tst-cancel10.
6590         * tst-cancel10.c: New file.
6592         * Makefile (tests): Add tst-signal4.
6593         * tst-signal4.c: New file.
6595         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6596         __sigismember instead of sigismember.  Add __builtin_expect.
6598 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6600         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6601         pthread_setcancelstate, and pthread_rwlock_setpshared.
6603         * tst-cancel7.c (do_test): Make sure the pid file exists before
6604         canceling the thread.
6606         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6607         pthread_rwlock_timedrdlock tests.
6608         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6609         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6610         Check for invalid tv_nsec field.
6611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6612         Likewise.
6614         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6615         recursive mutex of overflow.
6617         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6619         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6620         going into an endless loop.
6621         * Makefile (tests): Add tst-cancel9.
6622         * tst-cancel9.c: New file.
6624         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6626 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6628         * tst-mutex5.c (do_test): Add more timedlock tests.
6630         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6631         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6633         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6634         use INLINE_SYSCALL.  Error number is returned, not -1.
6636         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6637         and __deallocate_stack with internal_function.
6638         * pthread_create.c: Adjust definitions appropriately.
6639         * allocatestack.c: Likewise.
6641         * pthread_join.c: Add one more __builtin_expect.
6642         * pthread_timedjoin.c: Likewise.
6644         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6645         not data of sequence number does not match.
6646         Add one __builtin_expect.
6648         * Makefile (tests): Add tst-clock1.
6649         * tst-clock1.c: New file.
6651         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6652         negative arguments.
6653         * Makefile (tests): Add tst-basic5.
6654         * tst-basic5.c: New file.
6656 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6658         * Makefile (tests): Add tst-basic4.
6659         * tst-basic4.c: New file.
6661         * pthreadP.h: Add declaraction for __nptl_nthreads.
6662         * pthread_create.c: Define __nptl_nthreads
6663         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6664         after thread is done.  If then zero, call exit(0).
6665         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6666         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6667         * init.c (pthread_functions): Initialize ptr_nthreads.
6668         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6669         (__reclaim_stacks): Decrement __nptl_nthreads.
6670         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6671         Define.
6672         * Makefile (tests): Add tst-basic3.
6673         * tst-basic3.c: New file.
6675         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6676         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6677         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6678         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6679         if asynchronous canceling is enabled.
6680         * pthread_join.c (pthread_join): When recognizing circular joins,
6681         take into account the other thread might be already canceled.
6682         * Makefile (tests): Add tst-join5.
6683         * tst-join5.c: New file.
6685         * Makefile (tests): Add tst-join4.
6686         * tst-join4.c: New file.
6688 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6690         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6692 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6694         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6695         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6696         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6697         warning.
6698         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6699         to avoid warning.
6700         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6701         error if lll_futex_wake failed.
6703 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6706         handling of cancellation and failung pthread_mutex_unlock call.
6707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6708         * Makefile (tests): Add tst-cond8 and tst-cond9.
6709         * tst-cond8.c: New file.
6710         * tst-cond9.c: New file.
6712         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6714         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6715         non-standard initializers with __USE_GNU.
6717         * Makefile (tests): Add tst-cleanup3.
6718         * tst-cleanup3.c: New file.
6720 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6722         * Makefile (tests): Add tst-attr1 and tst-attr2.
6723         * tst-attr1.c: New file.
6724         * tst-attr2.c: New file.
6726         * Makefile: Add rules to build and run tst-atfork2 test.
6727         * tst-atfork2.c: New file.
6728         * tst-atfork2mod.c: New file.
6730         * sysdeps/unix/sysv/linux/unregister-atfork.c
6731         (__unregister_atfork): Free the memory allocated for the handlers
6732         after removing them from the lists.
6734         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6735         cleanup function.
6737         * tst-atfork1.c (do_test): Wait for the child we forked.
6738         Report error in child.
6740         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6742         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6744 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6746         * Makefile (tests): Add tst-cancel8.
6747         * tst-cancel8.c: New file.
6749         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6750         clearing of control variable.
6751         * Makefile (tests): Add tst-once3 and tst-once4.
6752         * tst-once3.c: New file.
6753         * tst-once4.c: New file.
6755 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6757         * sysdeps/sh/Makefile: New file.
6758         * sysdeps/sh/bits/atomic.h: New file.
6759         * sysdeps/sh/pthread_spin_init.c: New file.
6760         * sysdeps/sh/pthread_spin_lock.c: New file.
6761         * sysdeps/sh/pthread_spin_trylock.S: New file.
6762         * sysdeps/sh/pthread_spin_unlock.S: New file.
6763         * sysdeps/sh/pthreaddef.h: New file.
6764         * sysdeps/sh/tcb-offsets.sym: New file.
6765         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6766         * sysdeps/sh/tls.h: New file.
6767         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6768         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6769         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6770         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6771         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6772         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6773         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6774         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6775         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6776         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6777         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6778         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6779         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6780         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6781         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6782         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6783         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6784         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6785         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6786         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6788         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6789         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6790         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6791         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6792         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6793         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6794         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6795         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6796         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6798 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
6800         * tst-cond2.c: Rearrange code to not rely on behavior undefined
6801         according to POSIX.
6803         * tst-basic2.c (do_test): Lock mutex before creating the thread.
6805 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
6807         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6808         (TLS_GET_FS): New #define.
6809         (TLS_SET_FS): New #define.
6810         Correct value of __NR_set_thread_area.
6812         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6814 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
6816         * Makefile (tests): Add tst-popen1.
6817         * tst-popen1.c: New file.
6819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6820         but inactive generalization.
6821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6823         Minor optimization, remove one instruction.
6824         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6826 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6828         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6830 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6832         * init.c (__NR_set_tid_address): Add #ifdef for s390.
6833         * sysdeps/pthread/pthread_barrier_wait.c: New file.
6834         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6835         * sysdeps/pthread/pthread_cond_signal.c: New file.
6836         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6837         * sysdeps/pthread/pthread_cond_wait.c: New file.
6838         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6839         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6840         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6841         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6842         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6843         * sysdeps/s390/Makefile: New file.
6844         * sysdeps/s390/bits/atomic.h: New file.
6845         * sysdeps/s390/pthread_spin_init.c: New file.
6846         * sysdeps/s390/pthread_spin_lock.c: New file.
6847         * sysdeps/s390/pthread_spin_trylock.c: New file.
6848         * sysdeps/s390/pthread_spin_unlock.c: New file.
6849         * sysdeps/s390/pthreaddef.h: New file.
6850         * sysdeps/s390/tcb-offsets.sym: New file.
6851         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6852         * sysdeps/s390/tls.h: New file.
6853         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6854         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6855         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6856         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6857         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6858         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6859         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6860         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6861         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6862         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6863         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6864         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6865         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6866         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6867         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6868         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6869         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6870         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6871         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6872         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6873         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6874         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6875         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6877 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
6879         * atomic.h: Add a couple more default implementations.
6880         (atomic_compare_and_exchange_acq): Use
6881         __arch_compare_and_exchange_32_acq in return value definition.  It
6882         always exists.
6883         (atomic_bit_set): Renamed from atomic_set_bit.
6884         Add missing atomic_ prefixes.
6886         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6887         thread library is available, use correct value to mark initialized
6888         once variable.
6890 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
6892         * allocatestack.c (allocate_stack): Use __getpagesize instead of
6893         __sysconf to determine pagesize.
6895         * pthread_create.c: Include <atomic.h>.
6896         * allocatestack.c (allocate_stack): Implement coloring of the
6897         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
6898         size minus one.  Adjust users.
6899         * sysdeps/i386/i686/Makefile: New file.
6901 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
6903         * allocatestack.c: Improve comment throughout the file.
6905         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6906         (__lll_lock_wait): Add branch prediction.
6907         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6908         (__lll_lock_wait): Likewise.
6909         (lll_unlock_wake_cb): Removed.
6911 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
6913         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6914         _POSIX_THREAD_PRIORITY_SCHEDULING.
6916 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
6918         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6919         Fix return type of ptr___pthread_getspecific.
6921 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
6923         * Makefile (tests): Add tst-umask1.
6924         (tst-umask1-ARGS): Define.
6925         * tst-umask1.c: New file.
6927 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
6929         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
6930         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6931         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6932         pthread_rwlock_unlock.
6933         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6934         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6935         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6936         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6937         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6938         New file.
6939         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6940         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6941         New file.
6942         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6943         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6944         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6945         New file.
6946         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6947         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6948         New file.
6949         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6950         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6951         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6952         New file.
6953         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6954         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6955         New file.
6956         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6958         * Makefile (libpthread-routines): Remove lowlevelcond and
6959         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6960         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6961         and pthread_cond_broadcast.
6962         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6963         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6964         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6965         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6966         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6967         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6968         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6969         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6970         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6971         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6976         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6977         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6978         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6979         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6980         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6981         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6982         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6983         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6984         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6985         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6986         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6987         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6988         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6989         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6990         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6991         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6992         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6994         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6995         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
6996         of the code is moved to ...
6997         * sysdeps/pthread/createthread.c: ...here.  New file.
6999 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
7001         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7002         (__new_sem_post): Clear %eax before returning.
7003         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7005         * Makefile (tests): Add tst-cleanup2.
7006         * tst-cleanup2.c: New file.
7008         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7009         Interpret first parameter correctly.
7011 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
7013         * Makefile (headers): Add bits/semaphore.h.
7015 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
7017         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7018         if not SHARED.
7020 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
7022         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7023         must be used and mapping failed.
7024         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7026         * Makefile (CFLAGS-pthread_self.os): Define this, not
7027         CFLAGS-pthread_self.c.
7029 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7031         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7032         lll_unlock_wake_cb.
7034         * Makefile (libpthread-routines): Add version.  Add rules to build
7035         version.os and banner.h.
7036         * version.c: New file.
7038 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
7040         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7041         the alias unconditional.
7042         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
7044 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7046         * Makefile (CFLAGS-pthread_self.c): New definition.
7048 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7050         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7051         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7052         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7053         * init.c (__pthread_initialize_minimal_internal): Likewise.
7055 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
7057         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7059         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7060         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7061         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7062         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7063         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7064         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7066 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7068         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7069         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7070         * tst-cancel-wrappers.sh: Remove all exceptions.
7072 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
7074         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7075         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
7077         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7078         Use __libc_pthread_functions array if SHARED.
7080         * pthreadP.h: Move pthread_cond_2_0_t definition to...
7081         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7083         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7084         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7085         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7086         __libc_ptf_call instead of __libc_maybe_call.
7087         (PTF): New #define.
7088         (__libc_cleanup_region_start): Wrap function name with PTF call.
7089         (__libc_cleanup_region_end): Likewise.
7090         (__libc_cleanup_end): Likewise.
7092         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7093         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7094         * pthread_key_create.c: Add __pthread_key_create_internal alias.
7095         * pthreadP.h: Add prototypes.
7097         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7098         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7099         __pthread_rwlock_unlock aliases.
7100         * pthreadP.h: Add prototypes for new aliases.
7102         * pthreadP.h (struct pthead_functions): Moved to...
7103         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
7104         * init.c (pthread_functions): Add initializers for new elements.
7106         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7107         __pthread_cleanup_pop_restore aliases.
7108         * pthreadP.h: Add prototypes.
7110         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7111         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7112         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7113         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7114         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7115         * pthreadP.h: Adjust prototypes and callers.
7117 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
7119         * Makefile (tests): Add tst-cancel7.
7120         (tst-cancel7-ARGS): New variable.
7121         * tst-cancel7.c: New file.
7123         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7124         around gcc defficiencies.
7125         * old_pthread_cond_signal.c: Likewise.
7126         * old_pthread_cond_timedwait.c: Likewise.
7127         * old_pthread_cond_wait.c: Likewise.
7129         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7131 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7133         * Makefile (tests): Add tst-cond7.
7134         * tst-cond7.c: New file.
7136         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7137         (condvar_cleanup): Get condvar address from the right place.
7139         * atomic.h: Correct definitions of atomic_full_barrier,
7140         atomic_read_barrier, atomic_write_barrier.
7142         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7143         race-free.
7144         * old_pthread_cond_signal.c: Likewise.
7145         * old_pthread_cond_timedwait.c: Likewise.
7146         * old_pthread_cond_wait.c: Likewise.
7148 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
7150         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7152 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
7154         * pthreadP.h (pthread_cond_2_0_t): New type.
7155         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7156         Use new type for the 2.0 condvar function prototypes.
7157         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7158         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7159         parameter.
7160         * old_pthread_cond_destroy.c: Likewise.
7161         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
7162         * old_pthread_cond_signal.c: Likewise.
7163         * old_pthread_cond_timedwait.c: Likewise.
7164         * old_pthread_cond_wait.c: Likewise.
7166         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7167         (__pthread_cond_wait): Don't save cancellation mode and seq value
7168         in same location.
7170         * herrno.c (__h_errno_location): Don't define as weak.
7172 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7174         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7175         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7176         and pthread_cond_wait.
7177         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7178         Renamed to...
7179         (__pthread_cond_broadcast_2_0): ... this.
7180         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7181         Renamed to...
7182         (__pthread_cond_destroy_2_0): ... this.
7183         * old_pthread_cond_init.c (__old_pthread_cond_init):
7184         Renamed to...
7185         (__pthread_cond_init_2_0): ... this.
7186         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7187         Renamed to...
7188         (__pthread_cond_signal_2_0): ... this.
7189         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7190         Renamed to...
7191         (__pthread_cond_wait_2_0): ... this.
7192         * pthread_cond_destroy.c: Include shlib-compat.h.
7193         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7194         * pthread_cond_init.c: Include shlib-compat.h.
7195         (pthread_cond_init): Change strong_alias into versioned_symbol.
7196         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7197         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7198         fields.
7199         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7200         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7201         __pthread_cond_wait_2_0): New prototypes.
7202         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7203         __old_pthread_cond_init, __old_pthread_cond_signal,
7204         __old_pthread_cond_wait): Removed.
7205         * init.c: Include shlib-compat.h.
7206         (pthread_functions): Guard ptr___pthread_attr_init_2_0
7207         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7208         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7209         ptr___pthread_cond_*_2_0 fields.
7210         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7211         pthread_cond_*@GLIBC_2.0 compatibility symbols.
7213         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7214         LIBC_SIGACTION was not yet defined.
7215         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7216         [!defined LIBC_SIGACTION] (__sigaction): New function and
7217         libc_hidden_weak.
7218         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7219         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7221 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7223         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7225 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
7227         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7228         New, larger type definition.
7229         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7230         implementation.
7231         * Versions [libpthread]: Add definitions for new pthread_cond_*
7232         interfaces for version GLIBC_2.3.2.
7233         * pthread_cond_init.c: Update initialization for new type definition.
7234         * Makefile (libpthread-routines): Remove pthread_cond_wait,
7235         pthread_cond_timedwait, pthread_cond_signal, and
7236         pthread_cond_broadcast.  Add old_pthread_cond_init,
7237         old_pthread_cond_destroy, old_pthread_cond_wait,
7238         old_pthread_cond_timedwait, old_pthread_cond_signal, and
7239         old_pthread_cond_broadcast.
7240         * old_pthread_cond_broadcast.c: New file.
7241         * old_pthread_cond_destroy.c: New file.
7242         * old_pthread_cond_init.c: New file.
7243         * old_pthread_cond_signal.c: New file.
7244         * old_pthread_cond_timedwait.c: New file.
7245         * old_pthread_cond_wait.c: New file.
7246         * pthreadP.h: Add prototypes for the compatibility interfaces.
7248         * pthread_cond_destroy.c: Don't include <errno.h>.
7250 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
7252         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7253         unnecessary zero offset when addressing MUTEX.
7255 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7257         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7258         __register_atfork.
7259         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7260         for __register_atfork.
7262 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7264         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7265         instead of ASSEMBLER test macro.
7267         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7268         __libc_current_sigrtmax): Add libc_hidden_def.
7270         * sysdeps/pthread/list.h: Remove assert.h include.
7272 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7274         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7275         __pthread_initialize_minimal_internal not
7276         __pthread_initialize_minimal.
7278 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7280         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7281         __pthread_initialize_minimal as hidden.
7283         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7284         constructor.
7286 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7288         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7289         $(common-objpfx)format.lds, include that into the output script.
7290         Fix comment.
7291         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7293 2002-12-28  Andreas Jaeger  <aj@suse.de>
7295         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7296         nsec resolution changes.
7297         (xstat64_conv): Likewise.
7298         (xstat32_conv): Likewise.
7299         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7300         struct kernel_stat.
7301         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7302         structs stat and stat64.
7303         * time/time.h (__timespec_defined): Define for __USE_MISC.
7304         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7306 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7308         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7309         argument.
7310         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7311         (pthread_exit): Use strong_alias to avoid warnings.
7312         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7313         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7314         ptr___pthread_attr_init_2_*.
7315         * init.c (pthread_functions): Adjust.
7317 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7319         * forward.c: Make all functions available by default again.  It
7320         caused too much trouble.
7322         * pt-siglongjmp.c: Removed.
7324 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7326         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7327         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7328         * sysdeps/i386/Makefile: New file.
7329         * sysdeps/i386/tcb-offsets.sym: New file.
7330         * sysdeps/pthread/tcb-offsets.h: New file.
7331         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7332         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7334         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7335         __register_atfork...
7336         (GLIBC_2.3.2): ...here.
7338 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7340         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7341         pthread_attr_setstackaddr with __attribute_deprecated__.
7343 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7345         * pt-system.c (system): Remove cancellation handling.
7346         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7347         cancellation routines.
7349 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7351         * descr.h: Include <dl-sysdep.h>.
7352         (struct pthread): Move header.data.list to the back of the struct.
7353         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7354         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7355         (SYSINFO_OFFSEET): Likewise.
7357 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7359         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7360         Define.
7361         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7362         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7363         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7364         (USE_DL_SYSINFO): Undef.
7366 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7368         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7369         $(common-objpfx)libc.so.
7370         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7371         it is bigger than pipe buffer size even on arches with bigger
7372         page size.
7373         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7375 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7377         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7378         correct errno access for case that USE___THREAD is not defined.
7380 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7382         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7383         Patch by Marijn Ros <marijn@mad.scientist.com>.
7385 2002-12-22  Roland McGrath  <roland@redhat.com>
7387         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7389 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7391         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7393 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7395         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7396         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7397         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7399         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7400         of int $0x80.
7401         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7402         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7403         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7404         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7405         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7406         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7407         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7408         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7410         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7411         sysenter.
7412         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7414         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7416         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7417         in new TCB.
7418         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7419         that sysinfo is properly initialized.
7420         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7421         to 1 only for ld.so.
7423         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7424         RTLD_CORRECT_DYNAMIC_WEAK.
7426 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7428         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7429         Use return 0 as 6th argument to FORWARD4.
7430         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7432 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7434         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7435         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7436         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7437         (INIT_SYSINFO): New #define.
7438         (TLS_TP_INIT): Use INIT_SYSINFO.
7439         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7440         At test to make sure SYSINFO_OFFSET value is correct.
7441         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7443 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7445         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7446         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7447         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7448         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7449         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7450         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7451         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7453 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7455         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7456         macro instead of using int $0x80 directly.
7458         * sysdeps/pthread/bits/stdio-lock.h: New file.
7459         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7460         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7461         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7462         * Makefile (routines): Add libc-lowlevelmutex.
7464         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7465         __i686.get_pc_thunk.dx.
7467 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7469         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7470         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7471         ($(objpfx)tst-cancel-wrappers.out): New rule.
7472         * tst-cancel-wrappers.sh: New test.
7473         * tst-locale1.c: Include signal.h.
7474         (uselocale): Test static linking of __libc_current_sigrt*.
7476 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7478         * Makefile (tests): Add tst-cancel6.
7479         * tst-cancel6.c: New file
7481 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7483         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7484         Define meaningfully for assembler as well.
7485         * pthreadP.h (struct pthread_functions): Remove
7486         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7487         and ptr_pthread_attr_init_2_1 fields.
7488         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7489         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7490         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7491         (FORWARD3): Define using FORWARD4.
7492         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7493         versions.
7494         * pt-system.c: Remove duplicate stdlib.h include.
7496 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7498         * sem_init.c: Define sem_init@GLIBC_2.0.
7499         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7500         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7502         * flockfile.c: Moved to...
7503         * sysdeps/pthread/flockfile.c: ...here.  New file.
7504         * funlockfile.c: Moved to...
7505         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7506         * ftrylockfile.c: Moved to...
7507         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7509 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7511         * libc-cancellation.c: Guard both function with
7512         #if !defined NOT_IN_libc.
7513         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7514         automatically provided pthread wrappers.
7515         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7516         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7517         nor in libpthread.
7518         * pt-open.c: Removed.
7519         * pt-fcntl.c: Removed.
7520         * pt-fsync.c: Removed.
7521         * pt-lseek.c: Removed.
7522         * pt-msgrcv.c: Removed.
7523         * pt-msgsnd.c: Removed.
7524         * pt-msync.c: Removed.
7525         * pt-nanosleep.c: Removed.
7526         * pt-open64.c: Removed.
7527         * pt-pause.c: Removed.
7528         * pt-pread.c: Removed.
7529         * pt-pread64.c: Removed.
7530         * pt-pwrite.c: Removed.
7531         * pt-pwrite64.c: Removed.
7532         * pt-read.c: Removed.
7533         * pt-recv.c: Removed.
7534         * pt-recvfrom.c: Removed.
7535         * pt-recvmsg.c: Removed.
7536         * pt-send.c: Removed.
7537         * pt-sendto.c: Removed.
7538         * pt-sigtimedwait.c: Removed.
7539         * pt-sigwait.c: Removed.
7540         * pt-wait.c: Removed.
7541         * pt-waitpid.c: Removed.
7542         * pt-write.c: Removed.
7543         * pt-accept.c: Removed.
7544         * pt-close.c: Removed.
7545         * pt-connect.c: Removed.
7546         * pt-lseek64.c: Removed.
7547         * pt-sendmsg.c: Removed.
7548         * pt-tcdrain.c: Removed.
7550 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7552         * init.c (__pthread_initialize_minimal_internal): Renamed from
7553         __pthread_initialize_minimal.  Make old name an alias.  This
7554         converts a normal relocation into a relative relocation.
7556         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7558         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7559         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7560         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7561         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7562         pt-sigwaitinfo, pt-waitid, and pt-writev.
7563         * pt-creat.c: Removed.
7564         * pt-poll.c: Removed.
7565         * pt-pselect.c: Removed.
7566         * pt-readv.c: Removed.
7567         * pt-select.c: Removed.
7568         * pt-sigpause.c: Removed.
7569         * pt-sigsuspend.c: Removed.
7570         * pt-sigwaitinfo.c: Removed.
7571         * pt-waitid.c: Removed.
7572         * pt-writev.c: Removed.
7574         * init.c (pthread_functions): New variable.
7575         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7576         (or NULL) to __libc_pthread_init.
7577         * forward.c: Rewrite to use __libc:pthread_functions array to get
7578         function addresses.
7579         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7580         prototype.
7581         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7582         Take new parameter.  Copy content of variable pointed to by it
7583         to __libc_pthread_init.
7585         * pthreadP.h (struct pthread_functions): New type.
7586         (__libc_pthread_init): Declare.
7588         * pthread_attr_destroy.c: Add namespace protected alias.
7589         * pthread_attr_getdetachstate.c: Likewise.
7590         * pthread_attr_getinheritsched.c: Likewise.
7591         * pthread_attr_getschedparam.c: Likewise.
7592         * pthread_attr_getschedpolicy.c: Likewise.
7593         * pthread_attr_getscope.c: Likewise.
7594         * pthread_attr_setdetachstate.c: Likewise.
7595         * pthread_attr_setinheritsched.c: Likewise.
7596         * pthread_attr_setschedparam.c: Likewise.
7597         * pthread_attr_setschedpolicy.c: Likewise.
7598         * pthread_attr_setscope.c: Likewise.
7599         * pthread_cond_broadcast.c: Likewise.
7600         * pthread_cond_destroy.c: Likewise.
7601         * pthread_cond_init.c: Likewise.
7602         * pthread_cond_signal.c: Likewise.
7603         * pthread_cond_wait.c: Likewise.
7604         * pthread_condattr_destroy.c: Likewise.
7605         * pthread_condattr_init.c: Likewise.
7606         * pthread_equal.c: Likewise.
7607         * pthread_exit.c: Likewise.
7608         * pthread_getschedparam.c: Likewise.
7609         * pthread_self.c: Likewise.
7610         * pthread_setcancelstate.c: Likewise.
7611         * pthread_setschedparam.c: Likewise.
7612         * pthread_mutex_destroy.c: Likewise.
7613         * pthread_mutex_init.c: Likewise.
7614         * pthreadP.h: Add prototypes for the aliases.
7616         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7617         multiple_threads member in correct TCB to 1.
7619         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7620         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7621         member of thread decriptor, otherwise return unconditionally 1.
7623 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7625         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7626         regular Linux version.  Remove file.
7627         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7628         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7629         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7630         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7631         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7632         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7633         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7634         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7635         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7636         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7637         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7638         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7639         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7640         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7641         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7642         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7643         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7644         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7645         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7646         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7647         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7648         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7649         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7650         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7651         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7652         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7653         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7654         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7655         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7656         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7658 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7660         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7661         * sysdeps/unix/sysv/linux/open.c: Removed.
7662         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7663         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7664         * sysdeps/unix/sysv/linux/msync.c: Removed.
7665         * sysdeps/unix/sysv/linux/read.c: Removed.
7666         * sysdeps/unix/sysv/linux/close.c: Removed.
7667         * sysdeps/unix/sysv/linux/creat.c: Removed.
7668         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7669         * sysdeps/unix/sysv/linux/pause.c: Removed.
7670         * sysdeps/unix/sysv/linux/select.c: Removed.
7671         * sysdeps/unix/sysv/linux/write.c: Removed.
7673 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7675         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7676         element in TCB to see whether locking is needed.
7678         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7679         MULTIPLE_THREADS_OFFSET value is correct.
7681         * sysdeps/unix/sysv/linux/close.c: New file.
7682         * sysdeps/unix/sysv/linux/connect.S: New file.
7683         * sysdeps/unix/sysv/linux/creat.c: New file.
7684         * sysdeps/unix/sysv/linux/fsync.c: New file.
7685         * sysdeps/unix/sysv/linux/llseek.c: New file.
7686         * sysdeps/unix/sysv/linux/lseek.c: New file.
7687         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7688         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7689         * sysdeps/unix/sysv/linux/msync.c: New file.
7690         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7691         * sysdeps/unix/sysv/linux/open.c: New file.
7692         * sysdeps/unix/sysv/linux/open64.c: New file.
7693         * sysdeps/unix/sysv/linux/pause.c: New file.
7694         * sysdeps/unix/sysv/linux/poll.c: New file.
7695         * sysdeps/unix/sysv/linux/pread.c: New file.
7696         * sysdeps/unix/sysv/linux/pread64.c: New file.
7697         * sysdeps/unix/sysv/linux/pselect.c: New file.
7698         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7699         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7700         * sysdeps/unix/sysv/linux/readv.c: New file.
7701         * sysdeps/unix/sysv/linux/recv.S: New file.
7702         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7703         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7704         * sysdeps/unix/sysv/linux/select.c: New file.
7705         * sysdeps/unix/sysv/linux/send.S: New file.
7706         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7707         * sysdeps/unix/sysv/linux/sendto.S: New file.
7708         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7709         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7710         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7711         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7712         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7713         * sysdeps/unix/sysv/linux/system.c: New file.
7714         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7715         * sysdeps/unix/sysv/linux/wait.c: New file.
7716         * sysdeps/unix/sysv/linux/waitid.c: New file.
7717         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7718         * sysdeps/unix/sysv/linux/writev.c: New file.
7719         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7721         * pt-readv.c: Fix comment.
7723 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7725         * tst-cleanup1.c: Include stdlib.h.
7727         * tst-cancel5.c: New test.
7728         * Makefile (tests): Add tst-cancel5.
7729         (tst-cancel5): Link against libc.so libpthread.so in that order.
7731 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7733         * forward.c (test_loaded): Prevent recursive calls.
7735         * Makefile (routines): Add libc-cancellation.
7736         * libc-cancellation.c: New file.
7737         * descr.h (struct pthread): Add multiple_threads field.
7738         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7739         new thread descriptor to 1.
7740         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7741         Initialize multiple_thread field after successful thread creation.
7742         * cancellation.c (__do_cancel): Move to pthreadP.h.
7743         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7744         (__pthread_disable_asynccancel): Add internal_function attribute.
7745         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7746         * pthread_setcancelstate.c: Likewise.
7747         * pthread_setcanceltype.c: Likewise.
7748         * pthread_exit.c: Likewise.
7749         * pthreadP.h (CANCELLATION_P): Likewise.
7750         (__do_cancel): Define as static inline.
7751         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7752         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7753         declarations.
7754         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7755         fields.  Define MULTIPLE_THREADS_OFFSET.
7756         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7757         declaration.
7758         * sysdeps/unix/sysv/linux/accept.S: New file.
7759         * sysdeps/unix/sysv/linux/read.c: New file.
7760         * sysdeps/unix/sysv/linux/write.c: New file.
7761         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7762         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7763         initialization of __libc_locking_needed.
7764         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7765         __libc_locking_needed, use multiple_threads field in TCB.
7766         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7768 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7770         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7771         version.
7772         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7774         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7775         access to __libc_locking_needed for PIC.
7777 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
7779         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7780         declare for libc.so.
7781         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7782         expression.
7783         (__libc_lock_lock): Put into statement expression.
7784         (__libc_lock_unlock): Remove trailing semicolon.
7785         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7787 2002-12-12  Roland McGrath  <roland@redhat.com>
7789         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7790         "m" constraint to refer to __libc_locking_needed.  Declare it here.
7792 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7794         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7795         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7796         Initialize __libc_locking_needed.
7797         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7798         instead of __register_pthread_fork_handler.
7799         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7800         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7801         fork-gen with libc_pthread_init.
7802         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7803         of __register_pthread_fork_handler.
7804         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7805         of __register_pthread_fork_handler.
7806         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7807         __libc_locking_needed to determine whether lock prefix can be avoided.
7808         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7810 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
7812         * Makefile (tests): Add tst-cleanup1.
7813         * tst-cleanup1.c: New file.
7814         * cancellation.c (__cleanup_thread): Removed.
7815         (__do_cancel): Remove call to __cleanup_thread.
7816         * pthreadP.h: Remove __cleanup_thread prorotype.
7818         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7819         Remember function and argument even if cancellation handler
7820         function is not available.
7821         (__libc_cleanup_region_end): Execute registered function directly if
7822         pthread functions are not available.
7823         (__libc_cleanup_end): Likewise.
7825         * init.c (__pthread_initialize_minimal): Fix initialization in
7826         static lib by preventing gcc from being too clever.
7828 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
7830         * init.c (__pthread_initialize_minimal): Remove unneccesary
7831         sigaddset call.
7833         * Makefile (tests): We can run tst-locale2 now.
7835 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
7837         * Versions: Remove duplicated sigwait entry.
7839 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
7841         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7842         inside libpthread.
7844         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7846         * pthreadP.h: Declare __pthread_enable_asynccancel and
7847         __pthread_disable_asynccancel.
7848         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7849         (CANCEL_RESET): Use __pthread_disable_asynccancel.
7850         * cancellation.c (__pthread_enable_asynccancel): New function.
7851         (__pthread_disable_asynccancel): New function.
7852         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7853         * pt-close.c: Likewise.
7854         * pt-connect.c: Likewise.
7855         * pt-creat.c: Likewise.
7856         * pt-fcntl.c: Likewise.
7857         * pt-fsync.c: Likewise.
7858         * pt-lseek.c: Likewise.
7859         * pt-lseek64.c: Likewise.
7860         * pt-msgrcv.c: Likewise.
7861         * pt-msgsnd.c: Likewise.
7862         * pt-msync.c: Likewise.
7863         * pt-nanosleep.c: Likewise.
7864         * pt-open.c: Likewise.
7865         * pt-open64.c: Likewise.
7866         * pt-pause.c: Likewise.
7867         * pt-poll.c: Likewise.
7868         * pt-pread.c: Likewise.
7869         * pt-pread64.c: Likewise.
7870         * pt-pselect.c: Likewise.
7871         * pt-pwrite.c: Likewise.
7872         * pt-pwrite64.c: Likewise.
7873         * pt-read.c: Likewise.
7874         * pt-readv.c: Likewise.
7875         * pt-recv.c: Likewise.
7876         * pt-recvfrom.c: Likewise.
7877         * pt-recvmsg.c: Likewise.
7878         * pt-select.c: Likewise.
7879         * pt-send.c: Likewise.
7880         * pt-sendmsg.c: Likewise.
7881         * pt-sendto.c: Likewise.
7882         * pt-sigpause.c: Likewise.
7883         * pt-sigsuspend.c: Likewise.
7884         * pt-sigtimedwait.c: Likewise.
7885         * pt-sigwait.c: Likewise.
7886         * pt-sigwaitinfo.c: Likewise.
7887         * pt-system.c: Likewise.
7888         * pt-tcdrain.c: Likewise.
7889         * pt-wait.c: Likewise.
7890         * pt-waitid.c: Likewise.
7891         * pt-waitpid.c: Likewise.
7892         * pt-write.c: Likewise.
7893         * pt-writev.c: Likewise.
7894         * pthread_join.c: Likewise.
7895         * pthread_timedjoin.c: Likewise.
7897         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7898         (__xpg_sigpause): New function.
7899         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7901 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
7903         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7905         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7906         _GI_pthread_cleanup_pop to pthreadP.h.
7908         * ftrylockfile.c: Use _IO_lock_trylock instead of
7909         pthread_mutex_trylock.
7911         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7912         (CANCEL_RESET): Likewise.
7913         (__pthread_setcanceltype_): Declare.
7914         (__pthread_mutex_lock_internal): Declare.
7915         (__pthread_mutex_unlock_internal): Declare.
7916         (__pthread_once_internal): Declare.
7917         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7918         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7920         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7921         and pthread_mutex_unlock.
7922         * pthread_cond_wait.c: Likewise.
7923         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7924         * pthread_mutex_unlock.c: Likewise.
7926         * pthread_setcanceltype.c: Add additional alias
7927         __pthread_setcanceltype.
7929         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7930         * sem_open.c (sem_open): Likewise.
7931         Use __libc_open, __libc_write, and __libc_close instead of
7932         open, write, and close respectively.
7934         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7935         Rewrite as statement expression since it must return a value.
7937         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7938         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7939         __pthread_kill.
7941         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7942         alias __pthread_once_internal.
7944         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7946 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
7948         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7949         * tst-stdio1.c: New file.
7950         * tst-stdio2.c: New file.
7952         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7954         * Makefile (tests): Comment out tst-locale2 for now.
7955         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7957         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7958         -D_IO_MTSAFE_IO.
7959         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7960         Use _IO_lock_init instead of explicit assignment.
7962         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7963         Define __libc_lock_* and __libc_lock_recursive macros with
7964         lowlevellock macros, not pthread mutexes.
7966         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
7967         of pthread_mutex_lock.
7968         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
7969         instead of pthread_mutex_unlock.
7971 2002-12-06  Roland McGrath  <roland@redhat.com>
7973         * allocatestack.c (__stack_user): Use uninitialized defn.
7974         * init.c (__pthread_initialize_minimal): Initialize it here.
7976 2002-12-05  Roland McGrath  <roland@redhat.com>
7978         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7979         string.
7980         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7982         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7983         missing & here too.
7985 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
7987         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7988         lowlevellock.
7989         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7990         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7991         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7992         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7993         for __libc_lock_* macros.
7994         * Makefile (routines): Add libc-lowlevellock.
7996 2002-10-09  Roland McGrath  <roland@redhat.com>
7998         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7999         Under [__PIC__], call the function via the pointer fetched for
8000         comparison rather than a call by name that uses the PLT.
8001         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8002         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8003         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8004         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8005         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8007 2002-12-04  Roland McGrath  <roland@redhat.com>
8009         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8011         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8012         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8014         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8016 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8018         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8019         a completely opaque, non-integer type.
8020         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8022 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
8024         * sysdeps/i386/tls.h: Include stdlib.h.
8025         * sysdeps/x86_64/tls.h: Likewise.
8027 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8029         * Makefile (tests): Add tst-locale2.
8030         (tests-static): Likewise.
8031         * tst-locale2.c: New file.
8033         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8034         volatile and add memory clobbers to lock operations.
8036 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
8038         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8039         * sysdeps/i386/i486/bits/atomic.h: New file.
8040         * sysdeps/i386/i586/bits/atomic.h: New file.
8041         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8042         include i486 version.
8043         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8044         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8045         Patch by Marijn Ros <marijn@mad.scientist.com>.
8047         * allocatestack.c (get_cached_stack): Don't crash if we first
8048         found a stack with a larger size then needed.
8049         Reported by Hui Huang <hui.huang@sun.com>.
8051         * Makefile (tests): Add tst-sysconf.
8052         * tst-sysconf.c: New file.
8054         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8055         PTHREAD_THREADS_MAX.
8057 2002-12-02  Roland McGrath  <roland@redhat.com>
8059         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8060         Declare using hidden_proto instead of attribute_hidden, so there are
8061         non-.hidden static symbols for gdb to find.
8062         (__pthread_keys): Likewise.
8063         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8064         * allocatestack.c (__stack_user): Likewise.
8065         * pthread_create.c (__pthread_keys): Likewise.
8066         (__nptl_threads_events, __nptl_last_event): Make these static instead
8067         of hidden.
8068         * pthread_key_create.c (__pthread_pthread_keys_max,
8069         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8071 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
8073         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
8074         statically.
8075         * tst-locale1.c: New file.
8077         * pthread_cond_timedwait.c: Include <stdlib.h>.
8079         * Makefile (tests): Add tst-fork2 and tst-fork3.
8080         * tst-fork2.c: New file.
8081         * tst-fork3.c: New file.
8083 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
8085         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8087         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8088         require it to 200112L.
8090         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8091         instruction only if HAVE_CMOV is defined.
8092         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8094         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8096         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8098         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8100         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8102 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
8104         * sysdeps/x86_64/bits/atomic.h: New file.
8106         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8107         16-bit operations.
8109         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8110         possible since gettid cannot fail.
8112         * sysdeps/x86_64/pthreaddef.h: New file.
8114         * sysdeps/i386/pthreaddef.h (gettid): Removed.
8116         * sysdeps/x86_64/pthread_spin_init.c: New file.
8117         * sysdeps/x86_64/pthread_spin_lock.c: New file.
8118         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8119         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8121         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8122         Add missing lock prefix.  Minute optimization.
8124         * tst-spin2.c (main): Also check successful trylock call.
8126         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8127         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
8129         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8130         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
8132         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
8133         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8134         value in case of an error.  Add support for INTERNAL_SYSCALL.
8136         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8137         value in case of an error.
8139         * sysdeps/x86_64/tls.h: New file.
8141 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8143         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
8144         takes the array member name and the index as parameters.
8145         (THREAD_SETMEM_NC): Likewise.
8146         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8147         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8148         interfaces.
8150         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8151         to decide which code to use.
8152         (THREAD_SETMEM_NC): Likewise.
8154         * allocatestack.c (queue_stack): Don't remove stack from list here.
8155         Do it in the caller.  Correct condition to prematurely terminate
8156         loop to free stacks.
8157         (__deallocate_stack): Remove stack from list here.
8159 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
8161         * Makefile (tests): Add tst-stack1.
8162         * tst-stack1.c: New file.
8164         * allocatestack.c (allocate_stack): Initialize the TCB on a user
8165         provided stack.
8167         * pthread_attr_getstack.c: Return bottom of the thread area.
8169 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
8171         * Makefile (libpthread-routines): Add pt-allocrtsig and
8172         pthread_kill_other_threads.
8173         * pt-allocrtsig.c: New file.
8174         * pthread_kill_other_threads.c: New file.
8175         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8176         all three functions.
8177         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8178         allocrtsig.
8179         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8180         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8181         and __libc_allocate_rtsig_private.
8182         * Versions (libpthread): Export pthread_kill_other_threads_np,
8183         __libc_current_sigrtmin, and __libc_current_sigrtmax.
8185 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
8187         * allocatestack.c (allocate_stack): stackaddr in attribute points to
8188         the end of the stack.  Adjust computations.
8189         When mprotect call fails dequeue stack and free it.
8190         * pthread_attr_setstack.c: Store top of the stack in stackaddr
8191         attribute.
8192         * pthread_getattr_np.c: Likewise.
8194         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8195         surprises.
8197 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
8199         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8200         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8202 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
8204         * pthread_getspecific.c: Optimize access to first 2nd-level array.
8205         * pthread_setspecific.c: Likewise.
8207 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
8209         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8210         definitions.  Get them from the official place.
8211         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8213         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8214         Use new CLONE_ flags in clone() calls.
8216         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8217         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8219         * Versions: Add pthread_* functions for libc.
8220         * forward.c: New file.
8222         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8223         errno-loc.
8224         * herrno.c: New file.
8225         * res.c: New file.
8227         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8228         sem_trywait, and sem_timedwait.  Add herrno and res.
8229         * sem_init.c: Don't initialize lock and waiters members.
8230         * sem_open.c: Likewise.
8231         * sem_post.c: Removed.
8232         * sem_wait.c: Removed.
8233         * sem_trywait.c: Removed.
8234         * sem_timedwait.c: Removed.
8235         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8236         Includes full implementations of sem_post, sem_wait, sem_trywait,
8237         and sem_timedwait.
8238         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8239         for new implementation.
8240         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8241         and waiters fields.
8243         * tst-sem3.c: Improve error message.
8244         * tst-signal3.c: Likewise.
8246         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8247         to tell the kernel about the termination futex and to initialize tid
8248         member.  Don't initialize main_thread.
8249         * descr.h (struct pthread): Remove main_thread member.
8250         * cancelllation.c (__do_cancel): Remove code handling main thread.
8251         The main thread is not special anymore.
8253         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
8254         size of the stacks to stack_cache_actsize.
8256         * pt-readv.c: Add missing "defined".
8257         * pt-sigwait.c: Likewise.
8258         * pt-writev.c: Likewise.
8260 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
8262         * Versions: Export __connect from libpthread.
8263         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8265         * Makefile (libpthread-routines): Add pt-raise.
8266         * sysdeps/unix/sysv/linux/raise.c: New file.
8267         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8268         * sysdeps/generic/pt-raise.c: New file.
8270         * pthread_cond_init.c: Initialize all data elements of the condvar
8271         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8273         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8274         * pthread_create.c: Likewise.
8276         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8277         * tst-key1.c: New file.
8278         * tst-key2.c: New file.
8279         * tst-key3.c: New file.
8281         * Versions: Export pthread_detach for version GLIBC_2.0.
8282         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8284 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8286         * pthread_key_create.c: Terminate search after an unused key was found.
8287         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8289         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8290         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8292 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8294         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8295         dynamic lookup for errno in PIC.
8297         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8298         release the stack lock as soon as possible.
8299         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8300         the static TLS block.
8301         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8303         * cancellation.c: Renamed from cancelation.c.
8304         * Makefile: Adjust accordingly.
8305         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8306         * cleanup_defer.c: Use CANCELLATION_P.
8307         * pthread_testcancel.c: Likewise.
8308         * descr.h: Fix spelling in comments.
8309         * init.c: Likewise.
8310         * pthread_getattr_np.c: Likewise.
8311         * pthread_getschedparam.c: Likewise.
8312         * pthread_setschedparam.c: Likewise.
8313         * Versions: Likewise.
8315         * pt-pselect.c: New file.
8316         * Makefile (libpthread-routines): Add pt-pselect.
8317         * Versions: Add pselect.
8319         * tst-cancel4.c: New file.
8320         * Makefile (tests): Add tst-cancel4.
8322 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8324         * pthread_mutex_lock.c: Always record lock ownership.
8325         * pthread_mutex_timedlock.c: Likewise.
8326         * pthread_mutex_trylock.c: Likewise.
8328         * pt-readv.c: New file.
8329         * pt-writev.c: New file.
8330         * pt-creat.c: New file.
8331         * pt-msgrcv.c: New file.
8332         * pt-msgsnd.c: New file.
8333         * pt-poll.c: New file.
8334         * pt-select.c: New file.
8335         * pt-sigpause.c: New file.
8336         * pt-sigsuspend.c: New file.
8337         * pt-sigwait.c: New file.
8338         * pt-sigwaitinfo.c: New file.
8339         * pt-waitid.c: New file.
8340         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8341         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8342         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8343         * Versions: Add all the new functions.
8345         * tst-exit1.c: New file.
8346         * Makefile (tests): Add tst-exit1.
8348         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8350 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8352         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8354         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8355         call.  pthread_join is an official cancellation point.
8356         * pthread_timedjoin.c: Likewise.
8358         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8359         and the condvar's mutex are retrieved.
8360         * pthread_cond_timedwait.c: Likewise.
8361         Reported by dice@saros.East.Sun.COM.
8363 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8365         * pthreadP.h: Cut out all type definitions and move them...
8366         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8367         * pthreadP.h: Include <internaltypes.h>.
8369         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8370         performance tweaks.
8372         * sem_trywait.c: Shuffle #includes around to get right order.
8373         * sem_timedwait.c: Likewise.
8374         * sem_post.c: Likewise.
8375         * sem_wait.c: Likewise.
8377         * nptl 0.3 released.
8379         * Makefile (tests): Add tst-signal3.
8380         * tst-signal3.c: New file.
8382 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8384         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8385         the asms modify the sem object.
8386         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8388         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8389         the actual members.
8390         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8391         * semaphoreP.h: Include pthreadP.h.
8392         * sem_getvalue.c: Adjust to sem_t change.
8393         * sem_init.c: Likewise.
8394         * sem_open.c: Likewise.
8395         * sem_post.c: Likewise.
8396         * sem_timedwait.c: Likewise.
8397         * sem_trywait.c: Likewise.
8398         * sem_wait.c: Likewise.
8400 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8402         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8403         * tst-basic2.c: New file.
8404         * tst-exec1.c: New file.
8405         * tst-exec2.c: New file.
8406         * tst-exec3.c: New file.
8408         * tst-fork1.c: Remove extra */.
8410         * nptl 0.2 released.  The API for IA-32 is complete.